LVM recipe: determine which physical volume(s) a logical volume is located on

Posted on Thu 19 January 2012 in Sysadmin

Run the lvs command as follows:

# lvs --segments -o +pe_ranges

The output should be something similar to this:

LV      VG   Attr   #Str Type   SSize   PE Ranges
data    data -wi-ao    1 linear   1.82t /dev/md4:0-476930
data    data -wi-ao    1 linear   1.36t /dev/md2:0-357701
homes   data -wi-a-    1 linear   4.30g /dev/md1:38400-39499
...

Note the “PE Ranges” column - from the table it follows that the logical volume “data” is located on two physical volumes, /dev/md2 and /dev/md4.