On Mon, Apr 27, 2015 at 12:05:28PM +0000, sri wrote:
> Hi,
> 
> I would like to know if btrfs file system is created on LVM2 logical 
> volumes, does freeze and thaw operations takes place for btrfs to make 
> file system consistent??

   No, because the filesystem is *always* consistent, because of the
way that the CoW update mechanism works.

> If not is there a way (ioctl etc..) to run btrfs freeze/thaw before and 
> after creating LVM2 snapshot of a btrfs file system?

   As I said above, none is needed.

   HOWEVER, you shouldn't take LVM snapshots of a btrfs filesystem AT
ALL, if you have the original FS mounted on that system, or if you
plan on mounting the FS or its snapshots on that system. It's fine if
the only things mounting it are independent of the base system, and
don't see the snapshots (e.g. you're exporting LVs as block devices to
a VM host, and the snapshot is never seen by the VM; or you're
exporting LVs via NBD, and the remote system never sees the
snapshot).

   If, on the other hand, you're expecting to have /dev/mapper/foo
mounted, and then take a snapshot of it on the same system, you can
expect massive filesystem corruption, because the kernel can't
distinguish between the original block device and the snapshot, and
may try using the wrong one (or possibly both).

   Hugo.

-- 
Hugo Mills             | Someone's been throwing dead sheep down my Fun Well
hugo@... carfax.org.uk |
http://carfax.org.uk/  |
PGP: E2AB1DE4          |                                          Nick Gibbins

Attachment: signature.asc
Description: Digital signature

Reply via email to