Q:

Understanding output of lvdisplay in LVM/Linux

I am new to Linux admin field I just want to know the meaning of following fields in lvdisplay output 
root@sandbox: lvdisplay rootvg/swaplv | grep -i '# open'
 # open                 2
root@sandbox: lvdisplay rootvg/swaplv | grep -i 'Segments'
  Segments               1

Thanks in Advance 

A:

I got my answer here 
open - how many processes are currently using the device.
For example if you run dd if=/dev/rootvg/swaplv of=/dev/null, dd will open the swaplv. The # open will increase by 1. Once dd terminates, # open decreases by 1. If # open is 0, nothing is using it and the LV can be safely deactivated.
Segments refers to fragmentation of LV. If you grow the LV, but there is no consecutive space available, it will create a new segment in a free part of your physical volume(s). The number of segments is the number of fragments so to speak.
For example my HDD/TV LV has 4 segments and it looks like this:
 lvs -o lv_name,size,seg_size,devices HDD/TV
  LV   LSize SSize   Devices      
  TV   2.10t 698.56g /dev/dm-8(0) 
  TV   2.10t 698.56g /dev/dm-3(0) 
  TV   2.10t 698.56g /dev/dm-2(0) 
  TV   2.10t  52.31g /dev/dm-1(32)

So the total size of 2.1t is achieved by 3 segments with 698.56g each, plus one segment of 52.31g.

