Discussion:
[linux-lvm] lvm thin provisioning snapshots and btrfs
Robb Walker
2014-09-16 23:10:07 UTC
Permalink
Has anyone used lvm thin prov + btrfs on rhel/cent6u5?


The build I am using off base iso with updates thru end feb 2014 so I have not yet applied all updates. However from rhel alerts I see no specific fixes for lvm or btrfs from that date forward. Unless I missed something.


With lvm thin prov + ext4 I get expected results. When I take a snapshot. I see the snapshot is the state of the lvm volume at the point of time of snapshot creation.


For btrfs, I am using a root subvolume mounted as @foo_root with a thinly provisioned lvm underneath. Same setup just using btrfs.

I take a thin snapshot

lvcreate -n lv_root_thin -s vg_thin/lv_root

snapshot is created

activate with lvchange -Kay /dev/vg_thin/lv_root_thin


I then mount the snap with mount -odefaults,subvol=@foo_root /dev/vg_thin/lv_root_thin /snaps

The contents match the origin lvm. Both lvms, origin and snap stay in sync with whatever changes I make.

At one point I thought that maybe it was snapping at the subv level so I decided a snapshot of the root vol. However the deletion also appeared in the thin snapshot


Also couple notes:

I never see in lvs that the thin snapshot goes -o- online as I do in ext4

chdir into the /snaps and running df -h . shows that I'm in the snapshot

chdir into /snaps/\@foo_root and running df -h . shows I'm in the origin vol. <this is where I thought it might be snapping at the "raw" brtfs subvolume level


Hopefully this is somewhat clear


Regards and TIA


Robb Walker
Linux/Unix Services
Desk (312)542-2361 ~ Mobile (312)804-6034
Email: ***@drw.com
DRW Holdings, LLC ~ 540 West Madison St. Chicago, IL 60661

This e-mail and any attachments may contain information that is confidential and proprietary and otherwise protected from disclosure. If you are not the intended recipient of this e-mail, do not read, duplicate or redistribute it by any means. Please immediately delete it and any attachments and notify the sender that you have received it in error. Unintended recipients are prohibited from taking action on the basis of information in this e-mail or any attachments. The DRW Companies make no representations that this e-mail or any attachments are free of computer viruses or other defects.
Robb Walker
2014-09-22 22:15:52 UTC
Permalink
Also see the same results on ubu 14.04.1 lvm thin provisioning + btrfs. haven't tried arch 3.16 kernel and tools yet

Robb Walker
Linux/Unix Services
Desk (312)542-2361 ~ Mobile (312)804-6034
Email: ***@drw.com
DRW Holdings, LLC ~ 540 West Madison St. Chicago, IL 60661


________________________________________
From: linux-lvm-***@redhat.com <linux-lvm-***@redhat.com> on behalf of Robb Walker <***@DRWHoldings.com>
Sent: Tuesday, September 16, 2014 6:10 PM
To: linux-***@redhat.com
Subject: [linux-lvm] lvm thin provisioning snapshots and btrfs

Has anyone used lvm thin prov + btrfs on rhel/cent6u5?


The build I am using off base iso with updates thru end feb 2014 so I have not yet applied all updates. However from rhel alerts I see no specific fixes for lvm or btrfs from that date forward. Unless I missed something.


With lvm thin prov + ext4 I get expected results. When I take a snapshot. I see the snapshot is the state of the lvm volume at the point of time of snapshot creation.


For btrfs, I am using a root subvolume mounted as @foo_root with a thinly provisioned lvm underneath. Same setup just using btrfs.

I take a thin snapshot

lvcreate -n lv_root_thin -s vg_thin/lv_root

snapshot is created

activate with lvchange -Kay /dev/vg_thin/lv_root_thin


I then mount the snap with mount -odefaults,subvol=@foo_root /dev/vg_thin/lv_root_thin /snaps

The contents match the origin lvm. Both lvms, origin and snap stay in sync with whatever changes I make.

At one point I thought that maybe it was snapping at the subv level so I decided a snapshot of the root vol. However the deletion also appeared in the thin snapshot


Also couple notes:

I never see in lvs that the thin snapshot goes -o- online as I do in ext4

chdir into the /snaps and running df -h . shows that I'm in the snapshot

chdir into /snaps/\@foo_root and running df -h . shows I'm in the origin vol. <this is where I thought it might be snapping at the "raw" brtfs subvolume level


Hopefully this is somewhat clear


Regards and TIA


Robb Walker
Linux/Unix Services
Desk (312)542-2361 ~ Mobile (312)804-6034
Email: ***@drw.com
DRW Holdings, LLC ~ 540 West Madison St. Chicago, IL 60661

This e-mail and any attachments may contain information that is confidential and proprietary and otherwise protected from disclosure. If you are not the intended recipient of this e-mail, do not read, duplicate or redistribute it by any means. Please immediately delete it and any attachments and notify the sender that you have received it in error. Unintended recipients are prohibited from taking action on the basis of information in this e-mail or any attachments. The DRW Companies make no representations that this e-mail or any attachments are free of computer viruses or other defects.

_______________________________________________
linux-lvm mailing list
linux-***@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
This e-mail and any attachments may contain information that is confidential and proprietary and otherwise protected from disclosure. If you are not the intended recipient of this e-mail, do not read, duplicate or redistribute it by any means. Please immediately delete it and any attachments and notify the sender that you have received it in error. Unintended recipients are prohibited from taking action on the basis of information in this e-mail or any attachments. The DRW Companies make no representations that this e-mail or any attachments are free of computer viruses or other defects.
Zdenek Kabelac
2014-09-22 23:02:24 UTC
Permalink
Post by Robb Walker
Also see the same results on ubu 14.04.1 lvm thin provisioning + btrfs. haven't tried arch 3.16 kernel and tools yet
It's likely btrfs problem that it is not reporting duplicity problem?

In lvm2 we try to detect duplicate PVs and report problem and pick one to use.

Btrfs needs to do the same - I'd expect some kernel messages about these kind
of problems?

Snapshot activation is skipped here for a reason.

It's upto user/admin to avoid system confusion.

So my best advice is - to ensure you do not have active origin & snapshot at
the same time - especially when manipulating with btrfs - since it most likely
ignore device UUID generated by lvm (and that should be unique)

You will need to check disk btrfs identifiers if you need to have active these
volumes at the same time.
Post by Robb Walker
Robb Walker
Linux/Unix Services
Desk (312)542-2361 ~ Mobile (312)804-6034
DRW Holdings, LLC ~ 540 West Madison St. Chicago, IL 60661
Regards

Zdenek
Robb Walker
2014-09-23 01:06:26 UTC
Permalink
Thanks for the response and insight!
I will try to manipulate sequentially/mutually exclusively as in making changes when only one is online/active
I have had a screen session open on ttyS1 and don't recall a flurry of concerning console messages, but will double check, unless you meant they, btrfs developers, should have this type of issue burble up as a kernel message.
I'll probably give a post to btrfs with your insight listed and see what they say as well

thanks and regards


________________________________________
From: linux-lvm-***@redhat.com <linux-lvm-***@redhat.com> on behalf of Zdenek Kabelac <***@redhat.com>
Sent: Monday, September 22, 2014 6:02 PM
To: LVM general discussion and development
Subject: Re: [linux-lvm] lvm thin provisioning snapshots and btrfs
Post by Robb Walker
Also see the same results on ubu 14.04.1 lvm thin provisioning + btrfs. haven't tried arch 3.16 kernel and tools yet
It's likely btrfs problem that it is not reporting duplicity problem?

In lvm2 we try to detect duplicate PVs and report problem and pick one to use.

Btrfs needs to do the same - I'd expect some kernel messages about these kind
of problems?

Snapshot activation is skipped here for a reason.

It's upto user/admin to avoid system confusion.

So my best advice is - to ensure you do not have active origin & snapshot at
the same time - especially when manipulating with btrfs - since it most likely
ignore device UUID generated by lvm (and that should be unique)

You will need to check disk btrfs identifiers if you need to have active these
volumes at the same time.
Post by Robb Walker
Robb Walker
Linux/Unix Services
Desk (312)542-2361 ~ Mobile (312)804-6034
DRW Holdings, LLC ~ 540 West Madison St. Chicago, IL 60661
Regards

Zdenek

_______________________________________________
linux-lvm mailing list
linux-***@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
This e-mail and any attachments may contain information that is confidential and proprietary and otherwise protected from disclosure. If you are not the intended recipient of this e-mail, do not read, duplicate or redistribute it by any means. Please immediately delete it and any attachments and notify the sender that you have received it in error. Unintended recipients are prohibited from taking action on the basis of information in this e-mail or any attachments. The DRW Companies make no representations that this e-mail or any attachments are free of computer viruses or other defects.
Loading...