linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] System won't create devices from volume group : advice on dmsetup create command required (or alternative solution)
@ 2010-03-03 10:43 J4
  2010-03-03 11:28 ` Milan Broz
  0 siblings, 1 reply; 3+ messages in thread
From: J4 @ 2010-03-03 10:43 UTC (permalink / raw)
  To: linux-lvm

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.




   

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] System won't create devices from volume group : advice on dmsetup create command required (or alternative solution)
  2010-03-03 10:43 [linux-lvm] System won't create devices from volume group : advice on dmsetup create command required (or alternative solution) J4
@ 2010-03-03 11:28 ` Milan Broz
  2010-03-03 11:48   ` J4
  0 siblings, 1 reply; 3+ messages in thread
From: Milan Broz @ 2010-03-03 11:28 UTC (permalink / raw)
  To: junk4, LVM general discussion and development

On 03/03/2010 11:43 AM, J4 wrote:
> # vgchange -a y mds
...
> # ls /dev/mapper | grep mds
> brw------- 1 root root 253, 11 Mar  3 11:17 /dev/mapper/mds-mds

So the only LV name "mds" there is properly activated.

LVM will not activate partitions on the LV automatically,
but you can use "kpartx" utility to do that (see man kpartx).

Try "kpartx -a /dev/mds/mds"

(before deactivating LV you will need run kpartx -d to remove these
partition mappings again.)

Milan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] System won't create devices from volume group : advice on dmsetup create command required (or alternative solution)
  2010-03-03 11:28 ` Milan Broz
@ 2010-03-03 11:48   ` J4
  0 siblings, 0 replies; 3+ messages in thread
From: J4 @ 2010-03-03 11:48 UTC (permalink / raw)
  To: Milan Broz; +Cc: LVM general discussion and development

Dear Milan,

	Marvellous. This solved the problem.

Many thanks and best wishes, J.

Milan Broz wrote:
> On 03/03/2010 11:43 AM, J4 wrote:
>> # vgchange -a y mds
> ...
>> # ls /dev/mapper | grep mds
>> brw------- 1 root root 253, 11 Mar  3 11:17 /dev/mapper/mds-mds
> 
> So the only LV name "mds" there is properly activated.
> 
> LVM will not activate partitions on the LV automatically,
> but you can use "kpartx" utility to do that (see man kpartx).
> 
> Try "kpartx -a /dev/mds/mds"
> 
> (before deactivating LV you will need run kpartx -d to remove these
> partition mappings again.)
> 
> Milan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-03-03 11:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-03 10:43 [linux-lvm] System won't create devices from volume group : advice on dmsetup create command required (or alternative solution) J4
2010-03-03 11:28 ` Milan Broz
2010-03-03 11:48   ` J4

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).