can't use all VG free space for an LV stripe
hi all,
my volume group has 48396 PEs free using three disks. whenever i try to setup a striped LV using 48396 PEs it fails with "please check, if physical volumes are allocatable". if i issue the same command without the "-i 3" parameter the LV is successfully created. i tried specifying the LV size with -L instead of -l and it results in the same thing. i have 189.05GB PE free, i issue "-i 3 -L 180G" and it fails with the afformentioned message. oddly if i issue "-i 3 -L 170G" it will get created and there are still free PEs to be used.
why can't i use all of the free PEs on my VG in a single LV? i'm eventually going to use this setup with over a 1TB VG so if i can't use the full drive space then it would be a big loss i space. any ideas? appreciated guys and gals!
look below for a log of my activity, it's very straight forward and shows the problems i encounter. :)
-- snip snip --
root@iron-y:~# pvcreate --version pvcreate: Logical Volume Manager 1.0.4 Heinz Mauelshagen, Sistina Software 02/05/2002 (IOP 10)
root@iron-y:~# pvcreate /dev/hd[e-g] pvcreate -- physical volume "/dev/hde" successfully created pvcreate -- physical volume "/dev/hdf" successfully created pvcreate -- physical volume "/dev/hdg" successfully created
root@iron-y:~# vgcreate vg0 /dev/hd[e-g] vgcreate -- INFO: using default physical extent size 4 MB vgcreate -- INFO: maximum logical volume size is 255.99 Gigabyte vgcreate -- doing automatic backup of volume group "vg0" vgcreate -- volume group "vg0" successfully created and activated
root@iron-y:~# vgdisplay -v --- Volume group --- VG Name vg0 VG Access read/write VG Status available/resizable VG # 0 MAX LV 256 Cur LV 0 Open LV 0 MAX LV Size 255.99 GB Max PV 256 Cur PV 3 Act PV 3 VG Size 189.05 GB PE Size 4 MB Total PE 48396 Alloc PE / Size 0 / 0 Free PE / Size 48396 / 189.05 GB VG UUID 1EaNPQ-tf5q-YO17-icw0-Qe2V-y2Vc-hQ401T
--- No logical volumes defined in "vg0" ---
--- Physical volumes ---
PV Name (#) /dev/hdg (3) PV Status available / allocatable Total PE / Free PE 19078 / 19078
PV Name (#) /dev/hde (1) PV Status available / allocatable Total PE / Free PE 14659 / 14659
PV Name (#) /dev/hdf (2) PV Status available / allocatable Total PE / Free PE 14659 / 14659
root@iron-y:~# lvcreate -i 3 -l 48396 -n lv0 vg0 lvcreate -- INFO: using default stripe size 16 KB lvcreate -- not enough allocatable/free physical volume space in "vg0" lvcreate -- please check, if physical volumes are allocatable
root@iron-y:~# lvcreate -l 48396 -n lv0 vg0 lvcreate -- doing automatic backup of "vg0" lvcreate -- logical volume "/dev/vg0/lv0" successfully created
root@iron-y:~# lvremove /dev/vg0/lv0 lvremove -- do you really want to remove "/dev/vg0/lv0"? [y/n]: y lvremove -- doing automatic backup of volume group "vg0" lvremove -- logical volume "/dev/vg0/lv0" successfully removed
root@iron-y:~# vgdisplay | grep PE PE Size 4 MB Total PE 48396 Alloc PE / Size 0 / 0 Free PE / Size 48396 / 189.05 GB
root@iron-y:~# lvcreate -i 3 -L 180G -n lv0 vg0 lvcreate -- INFO: using default stripe size 16 KB lvcreate -- not enough allocatable/free physical volume space in "vg0" lvcreate -- please check, if physical volumes are allocatable
root@iron-y:~# lvcreate -i 3 -L 170G -n lv0 vg0 lvcreate -- INFO: using default stripe size 16 KB lvcreate -- rounding to stripe boundary size lvcreate -- doing automatic backup of "vg0" lvcreate -- logical volume "/dev/vg0/lv0" successfully created
root@iron-y:~# vgdisplay | grep PE PE Size 4 MB Total PE 48396 Alloc PE / Size 43521 / 170 GB Free PE / Size 4875 / 19.04 GB
root@iron-y:~# lvremove /dev/vg0/lv0 lvremove -- do you really want to remove "/dev/vg0/lv0"? [y/n]: y lvremove -- doing automatic backup of volume group "vg0" lvremove -- logical volume "/dev/vg0/lv0" successfully removed
root@iron-y:~# vgdisplay | grep PE PE Size 4 MB Total PE 48396 Alloc PE / Size 0 / 0 Free PE / Size 48396 / 189.05 GB
root@iron-y:~# lvcreate -L 180G -n lv0 vg0 lvcreate -- doing automatic backup of "vg0" lvcreate -- logical volume "/dev/vg0/lv0" successfully created
-- snip snip --
regards,
vahid
=====
< NPACI Education Center on Computational Science and Engineering > < http://edcenter.sdsu.edu >
"Career is great, but you can�t run your hands through its hair."
=====
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
Quoted 1 line
my volume group has 48396 PEs free using three disks. whenever i try to
setup
Quoted 1 line
a striped LV using 48396 PEs it fails with "please check, if physical
volumes
Quoted 1 line
are allocatable".
yes, I guess you can't stripe over a single disk. ;-) i.e of those 48396 PEs only 43977 are on 3 disks, the rest is on a single disk. With 43977 PEs you get around 171G.
christian
[linux-lvm] striped lvm must have identical PV sizes?
hi all,
based on my experience below i'm guessing that all PVs included in a VG must be identical in size if i want to stripe all of the PVs and take all of the VG free space? if so, is there a workaround so i can still write in parallel with different PV sizes? ala md-tools.
regards,
vahid
Quoted 14 lines · --- Christian Limpach
Quoted 1 line
my volume group has 48396 PEs free using three disks. whenever i try to
setup
Quoted 1 line
a striped LV using 48396 PEs it fails with "please check, if physical
volumes
Quoted 1 line
are allocatable".
yes, I guess you can't stripe over a single disk. ;-) i.e of those 48396 PEs only 43977 are on 3 disks, the rest is on a single disk. With 43977 PEs you get around 171G.
christian
Quoted 5 lines
_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
=====
< NPACI Education Center on Computational Science and Engineering > < http://edcenter.sdsu.edu >
"Career is great, but you can�t run your hands through its hair."
=====
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
hi Christian,
does this imply that all PV sizes in a VG must have the same size if i want to stripe along all of them, thus using 100% of the VG space?
ps. i'm no longer on the linux-lvm mail list.
regards,
vahid
Quoted 14 lines · --- Christian Limpach
Quoted 1 line
my volume group has 48396 PEs free using three disks. whenever i try to
setup
Quoted 1 line
a striped LV using 48396 PEs it fails with "please check, if physical
volumes
Quoted 1 line
are allocatable".
yes, I guess you can't stripe over a single disk. ;-) i.e of those 48396 PEs only 43977 are on 3 disks, the rest is on a single disk. With 43977 PEs you get around 171G.
christian
Quoted 5 lines
_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
=====
< NPACI Education Center on Computational Science and Engineering > < http://edcenter.sdsu.edu >
"Career is great, but you can�t run your hands through its hair."
=====
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
Quoted 4 lines · Vahid Pazirandeh
hi Christian,
does this imply that all PV sizes in a VG must have the same size if i want to stripe along all of them, thus using 100% of the VG space?
If you have 2 PVs in a striped LV then the maximum size of the LV is the size of the smallest of those PVs.
If the two PVs are of different sizes you can still use the remaining space in the larger of the two for another (non-striped) LV.
Signature · 1 line
patrick