[linux-lvm] Single snapshots do weird things?
Glen Harris
glen at gbrmpa.gov.au
Tue Sep 16 17:26:01 UTC 2003
Alasdair G Kergon wrote:
> On Tue, Sep 16, 2003 at 09:12:15AM +1000, Glen Harris wrote:
>
>>Is it mandatory to sync the filesystem before taking a snapshot?
>
>
> If you want the snapshot to be consistent: that's what the VFS lock patch
> attempts to do automatically whenever you take a snapshot: presumably you
> haven't applied that patch?
>
> Alasdair
Yes, I applied linux-2.4.21-VFS-lock.patch as well as the devmapper patch.
The behaviour is reproducable, I just did it again:
lvm:~# mount /dev/vg0/lv0 fs
[Several files/dirs exist, but not device-mapper.1.00.05.tgz]
lvm:~# lvcreate -s -L 8m --n snap0 /dev/vg0/lv0
lvm:~# mount /dev/vg0/snap0 snap/0
[Not there yet!]
lvm:~# cp /usr/src/device-mapper.1.00.05.tgz fs
lvm:~# lvcreate -s -L 8m --n snap1 /dev/vg0/lv0
lvm:~# mount /dev/vg0/snap1 snap/1
[Does *not* exist in the mounted snapshot filesystem]
lvm:~# sync
lvm:~# lvcreate -s -L 8m --n snap2 /dev/vg0/lv0
lvm:~# mount /dev/vg0/snap2 snap/2
[Ahhh! Now it exists in *this* mounted snapshot filesystem!]
Oh, and after the file appears in the final snapshot, it doesn't magically
appear in the previous one.
glen.
--
| Nine megs for the secretaries fair, | One disk to rule them all, |
| Seven megs for the hackers scarce, | One disk to bind them, |
| Five megs for the grads in smoky lairs, | One disk to hold the files |
| Three megs for system source; | And in the darkness grind 'em. |
-----------------------------------------------------------------------------
| Glen Harris | glen at gbrmpa.gov.au | 07 47500893 | http://www.gbrmpa.gov.au |
-----------------------------------------------------------------------------
=============================================================================
If you have received this transmission in error please notify us immediately
by return email and delete all copies. Any unauthorised use, disclosure or
distribution of this email is prohibited.
=============================================================================
More information about the linux-lvm
mailing list