All of lore.kernel.org
 help / color / mirror / Atom feed
From: Azat Khuzhin <a3at.mail@gmail.com>
To: Andreas Dilger <adilger@dilger.ca>
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu
Subject: Re: [PATCH 3/3] tune2fs: update journal super block when changing UUID for fs.
Date: Thu, 10 Jul 2014 10:03:06 +0400	[thread overview]
Message-ID: <20140710060306.GW4622@azat> (raw)
In-Reply-To: <F7FBA430-6337-40C9-BCD0-22503131FD3E@dilger.ca>

On Wed, Jul 09, 2014 at 02:38:19PM -0600, Andreas Dilger wrote:
> 
> On Jul 8, 2014, at 2:41 PM, Azat Khuzhin <a3at.mail@gmail.com> wrote:
> 
> > Using -U option you can change the UUID for fs, however it will not work
> > for journal device, since it have a copy of this UUID inside jsb (i.e.
> > journal super block). So copy UUID on change into that block.
> > 
> > Here is the initial thread:
> > http://comments.gmane.org/gmane.comp.file-systems.ext4/44532
> > 
> > You can reproduce this by executing following commands:
> > $ fallocate -l100M /tmp/dev
> > $ fallocate -l100M /tmp/journal
> > $ sudo /sbin/losetup /dev/loop1 /tmp/dev
> > $ sudo /sbin/losetup /dev/loop0 /tmp/journal
> > $ mke2fs -O journal_dev /tmp/journal
> > $ tune2fs -U da1f2ed0-60f6-aaaa-92fd-738701418523 /tmp/journal
> > $ sudo mke2fs -t ext4 -J device=/dev/loop0 /dev/loop1
> > $ dumpe2fs -h /tmp/dev | fgrep UUID
> > dumpe2fs 1.43-WIP (18-May-2014)
> > Filesystem UUID:          8a776be9-12eb-411f-8e88-b873575ecfb6
> > Journal UUID:             e3d02151-e776-4865-af25-aecb7291e8e5
> > $ sudo e2fsck /dev/vdc
> > e2fsck 1.43-WIP (18-May-2014)
> > External journal does not support this filesystem
> > 
> > /dev/loop1: ********** WARNING: Filesystem still has errors **********
> > 
> > Reported-by: Chin Tzung Cheng <chintzung@gmail.com>
> > Signed-off-by: Azat Khuzhin <a3at.mail@gmail.com>
> 
> It may be that the reverse problem also exists - if the UUID is changed
> on the filesystem, it probably is not updated in the journal "users" list?
> I'm not sure either way, but it is worthwhile to check.

You are right, it will not update the 'Journal users' field, there is no
code for U_flag in tune2fs for this (I also test it).
But to make patch clean I need more time, I will send it later.

> 
> Reviewed-by: Andreas Dilger <adilger@dilger.ca>

Thanks!


-- 
Respectfully
Azat Khuzhin

      reply	other threads:[~2014-07-10  6:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-08 20:41 [PATCH] e2fsprogs: journal code small cleanup and fixes Azat Khuzhin
2014-07-08 20:41 ` [PATCH 1/3] journal: use consts instead of 1024 and add helper for journal with 1k blocksize Azat Khuzhin
2014-07-08 23:30   ` Andreas Dilger
2014-07-09  3:51     ` Azat Khuzhin
2014-07-09  3:56     ` [PATCH 1/3 v2] " Azat Khuzhin
2014-07-09  4:46       ` Andreas Dilger
2014-07-09  4:54         ` Azat Khuzhin
2014-07-09 18:57           ` Darrick J. Wong
2014-07-09 19:36             ` Azat Khuzhin
2014-07-09 19:39             ` [PATCH 1/3 v3] " Azat Khuzhin
2014-07-09 20:33               ` Andreas Dilger
2014-07-08 20:41 ` [PATCH 2/3] tune2fs: remove_journal_device(): use the correct block to find jsb Azat Khuzhin
2014-07-09  4:48   ` Andreas Dilger
2014-07-08 20:41 ` [PATCH 3/3] tune2fs: update journal super block when changing UUID for fs Azat Khuzhin
2014-07-09 20:38   ` Andreas Dilger
2014-07-10  6:03     ` Azat Khuzhin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140710060306.GW4622@azat \
    --to=a3at.mail@gmail.com \
    --cc=adilger@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.