Problem with external journal and LVM snapshots

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a not so common setup that IMHO triggers a bug in the Ext4 journal code. I have the following setup:

- A mdadm RAID10 device with Bcache backing and LVM on top. This should actually not matter at all, but perhaps still worth mentioning.
- The Ext4 volume resides on a LVM VG, with an external journal on a NVMe drive.
- I use LVM snapshotting for that volume

Now, when I make the snapshot I do the following:

lvremove /dev/bcache/root-snap
lvcreate -c 512 -I 512 -n root-snap -L 250G -s /dev/bcache/root
tune2fs -O ^has_journal /dev/bcache/root-snap (to get rid of the external journal)
tune2fs -O has_journal /dev/bcache/root-snap (to create a new internal journal)

When finished, I can mount /dev/bcache/root-snap just fine, with the internal journal working. However, when I reboot it's a different issue. For whatever reason the kernel still sees both /dev/bcache/root and /dev/bcache/root-snap with an external journal! The kernel doesn't want to mount root anymore as there are two volumes with the same journal device. For now I've written a little script in the initrd to fix this stuff, but that shouldn't be necessary...





[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux