Skip to contentSkip to conversation

partition strategy

linux-lvm Arshavir Grigorian 3 participants 7 messages Aug 25, 2004 – Sep 3, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

This is my first post, so please bear with me.

I have 2 free disk areas 230G and 231G. I hoping to take advantage of RAID-0.

Is it better to create 3 partitions 2 x230G + 1G - create a striped LV over the first 2, then add the third to the volume group, then extend the LV over to the new 1G extension (since LVM2 allows extending striped lv-s). And if so, does the non-striped area get used as a last resort (after the striped area is completely full)?

OR

Is it better to create 2 paritions 230G and 231G, put both in a vg, create a striped lv and lvm will take care of striping to the 230G mark, then writing linearly afterwards.

TIA for any advice.

Best,

Arshavir

#1 lore raw
Quoted 12 lines · Arshavir Grigorian

Hi,

This is my first post, so please bear with me.

I have 2 free disk areas 230G and 231G. I hoping to take advantage of RAID-0.

Is it better to create 3 partitions 2 x230G + 1G - create a striped LV over the first 2, then add the third to the volume group, then extend the LV over to the new 1G extension (since LVM2 allows extending striped lv-s). And if so, does the non-striped area get used as a last resort (after the striped area is completely full)?

OR

Is it better to create 2 paritions 230G and 231G, put both in a vg, create a striped lv and lvm will take care of striping to the 230G mark, then writing linearly afterwards.

Quoted 8 lines

TIA for any advice.

Best,

Arshavir

Hi,

I mailed the above message about a week ago and there have not been any reponses.
I am wondering whether there is a development list where I might have a better chance of getting an answer to my question (the HOWTO page did not mention any dev lists, so I am not sure). Many thanks.

Arshavir

#2 lore raw
Quoted 8 lines · Arshavir Grigorian
Quoted 5 lines · Arshavir Grigorian

Is it better to create 3 partitions 2 x230G + 1G - create a striped LV over the first 2, then add the third to the volume group, then extend the LV over to the new 1G extension (since LVM2 allows extending striped lv-s). And if so, does the non-striped area get used as a last resort (after the striped area is completely full)?

I don't have the expertise to know for sure but that makes sense to me. I would just make 3 partitions -- you can always just save the 1GB partition for something else -- swap or a backup partition.

Signature · 6 lines
Stephen      

If your desktop gets out of control easily,
you probably have too much stuff on it that
doesn't need to be there.
         Donna Smallin, "Unclutter Your Home"
#3 lore raw
In reply to Arshavir Grigorian
Quoted 3 lines · Arshavir Grigorian
Quoted 3 lines

Is it better to create 3 partitions 2 x230G + 1G
OR
Is it better to create 2 paritions 230G and 231G, put both in a vg,

The VG contains the same space in both cases so do the simplest ie the first option. In both cases you'll need to run lvcreate for 460G followed by lvextend for 1G.

Alasdair

Signature · 1 line
[email protected]
#4 lore raw
Quoted 8 lines · Alasdair G Kergon
Quoted 4 lines · Arshavir Grigorian
Quoted 4 lines

Is it better to create 3 partitions 2 x230G + 1G OR
Is it better to create 2 paritions 230G and 231G, put both in a vg,

Quoted 7 lines

The VG contains the same space in both cases so do the simplest ie the first option. In both cases you'll need to run lvcreate for 460G followed by lvextend for 1G.

Alasdair

Thanks for the response.
For some reason even the first option does not work.
I created 3 partitions, added the 2 same sized ones to a vg, created a striped lv, then extended the vg to include the third small partition. After this I tried extending the lv to the new partition, but got the error below. Could you, please tell me what I am doing wrong? TIA.

Arshavir

casals:~# vgdisplay
 --- Volume group ---
 VG Name               vg00
 System ID            
 Format                lvm2
 Metadata Areas        2
 Metadata Sequence No  2
 VG Access             read/write
 VG Status             resizable
 MAX LV                0
 Cur LV                0
 Open LV               0
 Max PV                0
 Cur PV                2
 Act PV                2
 VG Size               463.60 GB
 PE Size               4.00 MB
 Total PE              118682
 Alloc PE / Size       0 / 0  
 Free  PE / Size       118682 / 463.60 GB
 VG UUID               PyRda0-g9mC-LxrH-txvE-CKb6-jP6T-Ou103y
casals:~# lvcreate -i 2 -I 8 -l 118682 vg00
casals:~# vgextend vg00 /dev/hdc3
 Volume group "vg00" successfully extended
casals:~# vgdisplay
 --- Volume group ---
 VG Name               vg00
 System ID            
 Format                lvm2
 Metadata Areas        3
 Metadata Sequence No  4
 VG Access             read/write
 VG Status             resizable
 MAX LV                0
 Cur LV                1
 Open LV               0
 Max PV                0
 Cur PV                3
 Act PV                3
 VG Size               464.12 GB
 PE Size               4.00 MB
 Total PE              118816
 Alloc PE / Size       118682 / 463.60 GB
 Free  PE / Size       134 / 536.00 MB
 VG UUID               PyRda0-g9mC-LxrH-txvE-CKb6-jP6T-Ou103y
casals:~# lvextend -l +134 /dev/vg00/lvol0 /dev/hdc3
 Using stripesize of last segment 8KB
 Extending logical volume lvol0 to 464.12 GB
 Insufficient allocatable extents suitable for parallel use for logical 
volume lvol0: 118816 required
#5 lore raw
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines

Is it better to create 3 partitions 2 x230G + 1G
Is it better to create 2 paritions 230G and 231G, put both in a vg,

ie the first option.

I meant the second option:-)

Quoted 6 lines

Could you, please tell me what I am doing wrong? TIA.

casals:~# lvextend -l +134 /dev/vg00/lvol0 /dev/hdc3
 Using stripesize of last segment 8KB
 Insufficient allocatable extents suitable for parallel use for logical 
volume lvol0: 118816 required

If you don't specify the stripe settings, lvextend uses whatever the last segment of the LV you're extending uses i.e. 2 stripes in this case. So you need to specify -i1 to add a new segment with just one stripe.

Alasdair

Signature · 1 line
[email protected]
#6 lore raw
Quoted 25 lines · Alasdair G Kergon
Quoted 9 lines
Quoted 9 lines
Quoted 3 lines
Quoted 3 lines

Is it better to create 3 partitions 2 x230G + 1G Is it better to create 2 paritions 230G and 231G, put both in a vg,

ie the first option.

I meant the second option:-)

Quoted 11 lines

Could you, please tell me what I am doing wrong? TIA.

casals:~# lvextend -l +134 /dev/vg00/lvol0 /dev/hdc3
Using stripesize of last segment 8KB
Insufficient allocatable extents suitable for parallel use for logical volume lvol0: 118816 required
Quoted 7 lines

If you don't specify the stripe settings, lvextend uses whatever
the last segment of the LV you're extending uses i.e. 2 stripes in this case. So you need to specify -i1 to add a new segment with just one stripe.

Alasdair

Many thanks. It all makes sense now.
The way I got it working is just creating 2 partititions, getting the number of extends from the smaller partition, creating a striped lv with that paritition count, then extending it to the remaining the extents as with a single stripe.

Arshavir