[linux-lvm] System won't create devices from volume group : advice on dmsetup create command required (or alternative solution)

J4 junk4 at klunky.co.uk
Wed Mar 3 10:43:34 UTC 2010

Dear all,

    I am moving an LVM between two machines but the new machine won't
create the devices.

** Source machines set-up:
LVM created on XEN server as one volume group.
The Volume Group was then presented to a XEN host via xm block-attach.
The XEN host then used fdisk to create two partitions on the new device
(/dev/xvdd1 and /dev/xvdd2) [I wish they had not done this!]
The devices were removed from the XEN host (xm block detach) and then
vgchange -a n mds  (mds is the vg)
The discs were unpresented from the source machine.

** Target machine set-up:
Phsyical server.
The discs were presented from the target machine.
# pvscan [results as expected]
# vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "mds" using metadata type lvm2
# vgchange -a y mds
 # vgdisplay mds
  --- Volume group ---
  VG Name               mds
  System ID            
  Format                lvm2
  Metadata Areas        4
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                4
  Act PV                4
  VG Size               209.95 GB
  PE Size               4.00 MB
  Total PE              53746
  Alloc PE / Size       53735 / 209.90 GB
  Free  PE / Size       11 / 44.00 MB
  VG UUID               TnUWZQ-kK5S-iLTR-U0C5-NYHk-96cw-smDLm2

However, the devices are not created:
# ls /dev/mapper | grep mds
brw------- 1 root root 253, 11 Mar  3 11:17 /dev/mapper/mds-mds

# fdisk -l /dev/mds/mds
Disk /dev/mds/mds: 225.3 GB, 225380925440 bytes
255 heads, 63 sectors/track, 27401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

       Device Boot      Start         End      Blocks   Id  System
/dev/mds/mds1               1       24152   193992907   83  Linux
/dev/mds/mds2           24152       27401    26105594   83  Linux

# ls -l /dev/mds/mds*
lrwxrwxrwx 1 root root 19 Mar  3 11:17 /dev/mds/mds -> /dev/mapper/mds-mds

I think that I have to use dmsetup to create the devices:  dmsetup create 
However, I have no idea where to start.

I would be very grateful if someone could advice me on how to proceed,
because I have a finite time to keep this UAT environment down.

Best regards, J.


More information about the linux-lvm mailing list