* Q wrt LVM snapshot of ext4 w/ external journal
@ 2010-04-13 18:22 Larkin Lowrey
2010-04-13 19:22 ` tytso
0 siblings, 1 reply; 3+ messages in thread
From: Larkin Lowrey @ 2010-04-13 18:22 UTC (permalink / raw)
To: linux-ext4
Is it safe to mount an LVM2 snapshot of an ext4 fs that has an external
journal?
My googling has revealed only that the snapshot procedure will cause the
fs to checkpoint the journal (if that's the right term) but also that
the fs will want to replay the journal when mounted, even if -o ro. If
my journal is on an external device (NVRAM device in my case) I don't
want the snapshot instance to interfere with the main on-line fs's use
of the journal.
Is there any documentation, other than code, that describes this scenario?
If there is another, more appropriate, venue for my question please let
me know.
Thank you,
--Larkin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Q wrt LVM snapshot of ext4 w/ external journal
2010-04-13 18:22 Q wrt LVM snapshot of ext4 w/ external journal Larkin Lowrey
@ 2010-04-13 19:22 ` tytso
2010-04-13 21:06 ` Larkin Lowrey
0 siblings, 1 reply; 3+ messages in thread
From: tytso @ 2010-04-13 19:22 UTC (permalink / raw)
To: Larkin Lowrey; +Cc: linux-ext4
On Tue, Apr 13, 2010 at 01:22:35PM -0500, Larkin Lowrey wrote:
> Is it safe to mount an LVM2 snapshot of an ext4 fs that has an external
> journal?
>
> My googling has revealed only that the snapshot procedure will cause the
> fs to checkpoint the journal (if that's the right term) but also that
> the fs will want to replay the journal when mounted, even if -o ro. If
> my journal is on an external device (NVRAM device in my case) I don't
> want the snapshot instance to interfere with the main on-line fs's use
> of the journal.
It's safe to mount the LVM2 snapshot only if you use the mount option
noload. This will prevent it from using the journal, which is good,
since the journal is in use by the original file system. :-)
> Is there any documentation, other than code, that describes this scenario?
No, it's not documented. It probably should be.
Hopefully, mounting the snapshot without using noload _should_ fail,
since the journal is already in use, but I'm not sure we have that
check in place, so I don't recommend trying it on a production file
system.
- Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Q wrt LVM snapshot of ext4 w/ external journal
2010-04-13 19:22 ` tytso
@ 2010-04-13 21:06 ` Larkin Lowrey
0 siblings, 0 replies; 3+ messages in thread
From: Larkin Lowrey @ 2010-04-13 21:06 UTC (permalink / raw)
To: tytso; +Cc: linux-ext4
On 4/13/2010 2:22 PM, tytso@mit.edu wrote:
> It's safe to mount the LVM2 snapshot only if you use the mount option
> noload. This will prevent it from using the journal, which is good,
> since the journal is in use by the original file system. :-)
>
>
I was able to verify that mounting with noload worked as advertised.
Thank you. The exact message was "mounted filesystem without journal".
> Hopefully, mounting the snapshot without using noload _should_ fail,
> since the journal is already in use, but I'm not sure we have that
> check in place, so I don't recommend trying it on a production file
> system.
I also verified that mounting w/o noload causes the mount operation to
fail. The message was "failed to claim external journal device".
When I unmounted the original fs so that the journal device was not in
use and then tried to mount the snapshot w/o noload, the mounted
snapshot was able to claim the journal. Of course I would never do that
on purpose but I wanted to see what would happen. I believe this falls
under the "don't do that or bad things will happen" category.
Thank you very much for your response to my query.
--Larkin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-04-14 3:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-13 18:22 Q wrt LVM snapshot of ext4 w/ external journal Larkin Lowrey
2010-04-13 19:22 ` tytso
2010-04-13 21:06 ` Larkin Lowrey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).