I want to try the snapshot functionality but I don't understand all the picture.
I'm on Ubuntu server 11.10 and I've created two Volume Group and some Logical Volumes inside like this:
root@darwin:~# vgdisplay
--- Volume group ---
VG Name data
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 272.24 GiB
PE Size 4.00 MiB
Total PE 69694
Alloc PE / Size 69694 / 272.24 GiB
Free PE / Size 0 / 0
VG UUID YRDCLM-ZfZN-kCoi-PIse-qMdn-2MBm-OmegqH
--- Volume group ---
VG Name os
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size 67.75 GiB
PE Size 4.00 MiB
Total PE 17343
Alloc PE / Size 17343 / 67.75 GiB
Free PE / Size 0 / 0
VG UUID ZRX1mD-CyhV-7u9f-15bh-2rnT-Nbee-1QD20u
root@darwin:~# lvdisplay
--- Logical volume ---
LV Name /dev/data/var
VG Name data
LV UUID FuJlvb-NZ3H-YoaO-6Qsn-SYuz-QaHb-Ms2YtX
LV Write Access read/write
LV Status available
# open 1
LV Size 272.24 GiB
Current LE 69694
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0
--- Logical volume ---
LV Name /dev/os/boot
VG Name os
LV UUID HE0izv-zuXu-0cZT-L3o2-O9Cj-5wEX-R4O6SB
LV Write Access read/write
LV Status available
# open 1
LV Size 188.00 MiB
Current LE 47
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:1
--- Logical volume ---
LV Name /dev/os/swap
VG Name os
LV UUID 4hlke0-kl3r-xVbN-Myjz-dH6H-hkRI-Uh7ncl
LV Write Access read/write
LV Status available
# open 2
LV Size 1.86 GiB
Current LE 476
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:2
--- Logical volume ---
LV Name /dev/os/root
VG Name os
LV UUID 7qpM1B-DjHp-v6Ju-Ia4L-TPtP-5sCF-UR6Mr3
LV Write Access read/write
LV Status available
# open 1
LV Size 65.70 GiB
Current LE 16820
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:3
and this is the df -h:
root@darwin:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/os-root 65G 1.1G 61G 2% /
udev 2.0G 12K 2.0G 1% /dev
tmpfs 792M 244K 792M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 2.0G 0 2.0G 0% /run/shm
/dev/mapper/data-var 268G 528M 254G 1% /var
/dev/mapper/os-boot 183M 51M 123M 30% /boot
At this point I don't understand if I need to shirink one LV making space for a new partition that will contains the snapshot, 'cause I tried to create a new LV but it says that there isn't enougth space. Am I right? If so, what is the correct way to shrink? For now, I want to create a snapshot of /