0

As a system administrator, one thing I do very often is increase LV's size. In most cases I have to extend first the VG, adding a new disk (we are talking about virtual machines). I have got a lot of cases in which the LV has been previously extended several times:

# lvs -a -o+devices,seg_size,seg_pe_ranges /dev/mapper/data_vg-sapdata1_lv
  LV          VG      Attr     LSize   Pool Origin Data%  Move Log Copy%  Convert Devices          SSize   PE Ranges             
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sdd(20224)  100.00g /dev/sdd:20224-45823  
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sdd(125184)  10.00g /dev/sdd:125184-127743
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sdd(135424)  10.00g /dev/sdd:135424-137983
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sdd(14592)   22.00g /dev/sdd:14592-20223  
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sdd(186624)   8.00g /dev/sdd:186624-188671
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sde(19713)   10.00g /dev/sde:19713-22272  
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sde(29953)    8.00g /dev/sde:29953-32000  
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sde(38145)   20.00g /dev/sde:38145-43264  
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sde(58625)   20.99g /dev/sde:58625-63998  
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sdg(0)       29.01g /dev/sdg:0-7425       
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sdf(20479)   20.00g /dev/sdf:20479-25598  
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sdf(35839)   40.00g /dev/sdf:35839-46078  
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sdh(0)       39.00g /dev/sdh:0-9983       
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sdg(30719)   40.00g /dev/sdg:30719-40958  
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sdg(102399)  40.00g /dev/sdg:102399-112638
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sdf(46079)   50.00g /dev/sdf:46079-58878  
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sdf(97279)   20.00g /dev/sdf:97279-102398 
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sde(73727)   30.00g /dev/sde:73727-81406  
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sde(89087)   25.00g /dev/sde:89087-95486  
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sdk(0)       40.00g /dev/sdk:0-10239      
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sdk(30720)   50.00g /dev/sdk:30720-43519  
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sdk(80645)   20.00g /dev/sdk:80645-85764  
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sdf(102399)  10.00g /dev/sdf:102399-104958
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sdl(0)       30.00g /dev/sdl:0-7679       
  sapdata1_lv data_vg -wi-ao-- 750.00g                                            /dev/sdl(26886)   58.00g /dev/sdl:26886-41733  

# pvs | grep data_vg
  /dev/sdd   data_vg   lvm2 a--  750.00g      0 
  /dev/sde   data_vg   lvm2 a--  450.00g      0 
  /dev/sdf   data_vg   lvm2 a--  450.00g      0 
  /dev/sdg   data_vg   lvm2 a--  450.00g  10.00g
  /dev/sdh   data_vg   lvm2 a--  400.00g      0 
  /dev/sdk   data_vg   lvm2 a--  400.00g      0 
  /dev/sdl   data_vg   lvm2 a--  450.00g 112.97g

I am pretty sure this decrease IO performance, so I want to migrate all Physical Volumes in order to reduce number of discs inside the Volume Group and the dispesion of data across PVs/regions.

Question:

Which is the best option to increase IO performance, migrate all of then to a single PV (800Gb x 1) or migrate to several (200Gb x 4)?... I want to do it in linear LV mode, not striped mode.

  • If there are not pretty much special requirements to use LVM, why use it in virtual machines? I usually add space to a virtual disk and then grow the filesystem. One less layer to deal with. LVM seems to be more interesting for a filesystem to grow and span several physical disks, no so much in most of the virtual servers. – Rui F Ribeiro Dec 15 '15 at 13:09
  • Why?.... more flexibility in managing storage space, data isolation, etc. – albertovar Dec 15 '15 at 14:29
  • “I am pretty sure this decrease IO performance” Why would it? – Gilles Dec 15 '15 at 22:03
  • Data are spread (spanning??) across many discs and PE ranges. – albertovar Dec 16 '15 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.