snapshots data
hi
i created a snapshot of a lvm, like this:
lvcreate -s -L +50G -p r -n backup /dev/mail/mail /dev/sda2
that is, a 50gb, read-only snapshot for /dev/mail/mail to the PV sda2. the i did a lvdisplay -v
--- Logical volume ---
LV Name /dev/mail/mail
VG Name mail
LV UUID jhjDsx-FvKT-zJer-uSc3-2rrb-eHaC-Af7jBq
LV Write Access read/write
LV snapshot status source of
/dev/mail/backup [active]
LV Status available
# open 1
LV Size 150.22 GB
Current LE 4807
Segments 1
Allocation next free (default)
Read ahead sectors 0
Block device 254:3--- Logical volume ---
LV Name /dev/mail/backup VG Name mail LV UUID nQrrrx-cTN8-4lqX-op9F-1vDO-VJ1V-hbQlTU LV Write Access read only LV snapshot status active destination for /dev/mail/mail LV Status available # open 0 LV Size 150.22 GB Current LE 4807 Segments 1 Snapshot chunk size 8.00 KB Allocated to snapshot 0.13% Allocation next free (default) Read ahead sectors 0 Block device 254:6
how can i tell, how big is that snapshot i created? i know that it's 50gb, but where can i see this information. and what is "Allocated to snapshot"? that percentage is from the 50gb a allocated for the snapshot? or from the origin LV ?
lvm> version
LVM version: 2.00.15 (2004-04-19)
Library version: 1.00.14-ioctl (2004-04-06)
Driver version: 4.4.0
i installed lvm from CVS too, and i noticed the output of lvdisplay is a bit different there. in fact, lvdisplay does not even show the snapshot LV i created... if i do a vgdisplay -v, only then appears:
--- Logical volume ---
LV Name /dev/test/root
VG Name test
LV UUID wqoG5m-X3Fn-Gsaj-8P9t-cSwS-AXi4-IJ5j2P
LV Write Access read/write
LV snapshot status source of
/dev/test/backup_root [active]
LV Status available
# open 1
LV Size 976.00 MB
Current LE 244
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:3--- Logical volume ---
LV Name /dev/test/backup_root VG Name test LV UUID cHs3wn-EUJl-f1wq-R8SJ-kpxZ-u9CG-L9Qhy1 LV Write Access read only LV snapshot status active destination for /dev/test/root LV Status available # open 0 LV Size 976.00 MB Current LE 244 COW-table size 1016.00 MB COW-table LE 254 Allocated to snapshot 2.05% Snapshot chunk size 8.00 KB Segments 1 Allocation inherit Read ahead sectors 0 Block device 253:2
lvm> version
LVM version: 2.01.13-cvs (2005-06-14)
Library version: 1.01.01 (2005-03-29)
Driver version: 4.4.0
what's COW? :)
thx.
COW = copy on write
so once a original block is going to be overwritten, its data is copied out and put into snapshot.
ming
Quoted 107 lines · Imre Gergely
hi
i created a snapshot of a lvm, like this:
lvcreate -s -L +50G -p r -n backup
/dev/mail/mail/dev/sda2that is, a 50gb, read-only snapshot for
/dev/mail/mailto the PV sda2. the i did a lvdisplay -v--- Logical volume ---
LV Name /dev/mail/mail VG Name mail LV UUID jhjDsx-FvKT-zJer-uSc3-2rrb-eHaC-Af7jBq LV Write Access read/write LV snapshot status source of /dev/mail/backup [active] LV Status available # open 1 LV Size 150.22 GB Current LE 4807 Segments 1 Allocation next free (default) Read ahead sectors 0 Block device 254:3--- Logical volume ---
LV Name /dev/mail/backup VG Name mail LV UUID nQrrrx-cTN8-4lqX-op9F-1vDO-VJ1V-hbQlTU LV Write Access read only LV snapshot status active destination for /dev/mail/mail LV Status available # open 0 LV Size 150.22 GB Current LE 4807 Segments 1 Snapshot chunk size 8.00 KB Allocated to snapshot 0.13% Allocation next free (default) Read ahead sectors 0 Block device 254:6how can i tell, how big is that snapshot i created? i know that it's 50gb, but where can i see this information. and what is "Allocated to snapshot"? that percentage is from the 50gb a allocated for the snapshot? or from the origin LV ?
lvm> version
LVM version: 2.00.15 (2004-04-19)
Library version: 1.00.14-ioctl (2004-04-06)
Driver version: 4.4.0i installed lvm from CVS too, and i noticed the output of lvdisplay is a bit different there. in fact, lvdisplay does not even show the snapshot LV i created... if i do a vgdisplay -v, only then appears:
--- Logical volume ---
LV Name /dev/test/root VG Name test LV UUID wqoG5m-X3Fn-Gsaj-8P9t-cSwS-AXi4-IJ5j2P LV Write Access read/write LV snapshot status source of /dev/test/backup_root [active] LV Status available # open 1 LV Size 976.00 MB Current LE 244 Segments 1 Allocation inherit Read ahead sectors 0 Block device 253:3--- Logical volume ---
LV Name /dev/test/backup_root VG Name test LV UUID cHs3wn-EUJl-f1wq-R8SJ-kpxZ-u9CG-L9Qhy1 LV Write Access read only LV snapshot status active destination for /dev/test/root LV Status available # open 0 LV Size 976.00 MB Current LE 244 COW-table size 1016.00 MB COW-table LE 254 Allocated to snapshot 2.05% Snapshot chunk size 8.00 KB Segments 1 Allocation inherit Read ahead sectors 0 Block device 253:2lvm> version
LVM version: 2.01.13-cvs (2005-06-14)
Library version: 1.01.01 (2005-03-29)
Driver version: 4.4.0what's COW? :)
thx.
_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/