[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: find LVM volume group of a volume



On Sun Oct 18, 2009 at 21:56:50 +0200, Guillaume CHARDIN wrote:

> But, when i try to use it with lvdisplay with
> '/dev/mapper/VGNAME-LVNAME' as argument, the command fail.

  Try running lvdisplay with no arguments to see a list.

  Then you'll see output like this:

  --- Logical volume ---
  LV Name                /dev/gold-vol/music
  VG Name                gold-vol
  LV UUID                iWUDhx-JmPh-Ajzf-yUz7-AMuZ-r1My-ff8gwx
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                42.00 GB
  ..

  You can be more specific with:

    root@gold:~# lvdisplay /dev/gold-vol/ms
  --- Logical volume ---
  LV Name                /dev/gold-vol/ms
  VG Name                gold-vol
  LV UUID                Rzwm6s-b67s-3Ixs-3Aj9-ILmT-R4mI-QsAHfr
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                20.00 GB
  Current LE             5120
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:5

  As you can see the VG name is displayed there.

> Is there a way to easily find the VG of a Logical volume ?

  Failing that you could just run:

  root@gold:~# lvs
  LV            VG       Attr   LSize  Origin Snap%  Move Log Copy%  Convert
  home          gold-vol -wi-ao 50.00G
  kvm           gold-vol -wi-ao 25.00G
  ms            gold-vol -wi-a- 20.00G
  music         gold-vol -wi-ao 42.00G
  root          gold-vol -wi-ao 30.00G
  schroot-etch  gold-vol -wi-a-  1.00G
  schroot-lenny gold-vol -wi-a-  1.00G
  schroot-sid   gold-vol -wi-a-  1.00G
  temp          gold-vol -wi-a- 10.00G

Steve
--
Debian GNU/Linux System Administration
http://www.debian-administration.org/


Reply to: