[PLUG] striping in LVM or md?
Eric Wilhelm
scratchcomputing at gmail.com
Thu Jun 7 20:47:46 UTC 2007
# from Eric Wilhelm
# on Thursday 07 June 2007 01:33 pm:
>On further experimentation, I see that I can lvcreate with -i 2 for
>striping *up to* the least common size, but lvextend will allow "-i 1"
>to add the rest of the available space without striping. So, there's
>the "mostly striped" functionality that I was wanting. I'll guess
> that it will fill the striped areas first.
Just to be clear:
# fdisk -l /dev/sdd
Disk /dev/sdd: 1281 MB, 1281981952 bytes
40 heads, 62 sectors/track, 1009 cylinders
Units = cylinders of 2480 * 512 = 1269760 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 394 488529 83 Linux
/dev/sdd2 395 1009 762600 83 Linux
# pvcreate /dev/sdd1
# pvcreate /dev/sdd2
# vgcreate test /dev/sdd1 /dev/sdd2
# pvdisplay /dev/sdd1 /dev/sdd2 | grep Free
Free PE 119
Free PE 186
# lvcreate -i 2 -n try -l 238 test
Using default stripesize 64.00 KB
Logical volume "try" created
# vgdisplay test | grep Free
Free PE / Size 67 / 268.00 MB
# pvdisplay /dev/sdd1 /dev/sdd2 | grep Free
Free PE 0
Free PE 67
# lvextend -i 1 -l +67 test/try
Extending logical volume try to 1.19 GB
Logical volume try successfully resized
# lvdisplay -m test/try
--- Logical volume ---
LV Name /dev/test/try
VG Name test
LV UUID Vm6K3O-5nMI-IaYL-8IjJ-DWwm-wu2w-wl7nb4
LV Write Access read/write
LV Status available
# open 0
LV Size 1.19 GB
Current LE 305
Segments 2
Allocation inherit
Read ahead sectors 0
Block device 253:4
--- Segments ---
Logical extent 0 to 237:
Type striped
Stripes 2
Stripe size 64 KB
Stripe 0:
Physical volume /dev/sdd2
Physical extents 0 to 118
Stripe 1:
Physical volume /dev/sdd1
Physical extents 0 to 118
Logical extent 238 to 304:
Type linear
Physical volume /dev/sdd2
Physical extents 119 to 185
--Eric
--
Turns out the optimal technique is to put it in reverse and gun it.
--Steven Squyres (on challenges in interplanetary robot navigation)
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------
More information about the PLUG
mailing list