Help!

Moving LVM drives

 
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Setup RSS
Next:  Can one get wrt54g router to work as nameserver f..  
Author Message
Michael Schnell
External


Since: Aug 28, 2004
Posts: 66



PostPosted: Mon Feb 28, 2011 11:10 pm    Post subject: Moving LVM drives
Archived from groups: comp>os>linux>setup (more info?)

Hi experts,

I need to move some LVM drives from a Suse 11.1 to a new Suse 11.3 box.

The drives are attached with USB.

I created the lvm volumes on the 11.1 box, so LVM2 is used.

At the new box /dev/mapper/ does not show the lvm volumes so I can't
mount them.


On both systems I see similar information about the lvm disks when I
plug in the USB disks and do

"lvm lvmdiskscan"

"lvm vgscan"

"lvm vgs"

"lbm vgdisplay"

"lvm lvscan" (see below)

"lvm lvs"

"lvm lvdisplay"




only with

"lvm lvscan"

I see "ACTIVE" on the old system and "inactive" on the new one.





with

"dmsetup status"

and

"dmsetup info"

on the old system, I see information on the devices, but on the new
system I jut get "no devices found"


So I suppose that some automated activation fails to take place in the
new box, when starting up and/or plugging in the USB disk. Maybe some
daemon or kernel module is not loaded.

I already compared the /etc/lvm/lvm.conf files and added the lines
udev_rules = 1
udev_sync = 1
in the activation section but this did not help. (Seemingly they had
been auto-added by Suse on the old system. I did not find any
documentation on this.)

What is wrong ? How to configure Suse 11.3 to have the lvm automatically
activated ?

Thanks a lot for any help,
-Michael
Back to top
David W. Hodgins
External


Since: Dec 04, 2005
Posts: 348



PostPosted: Mon Feb 28, 2011 11:33 pm    Post subject: Re: Moving LVM drives [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mon, 28 Feb 2011 17:32:58 -0500, Michael Schnell wrote:

> I need to move some LVM drives from a Suse 11.1 to a new Suse 11.3 box.

Deactivate the vg on 11.1, move the drive, then activate it on 11.3.

"vgchange -a n VolumeGroupName" on 11.1.

"vgscan && vgchange -a y VolumeGroupName" on 11.3.

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)
Back to top
Michael Schnell
External


Since: Aug 28, 2004
Posts: 66



PostPosted: Tue Mar 01, 2011 8:10 pm    Post subject: Re: Moving LVM drives [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 01.03.2011 00:33, David W. Hodgins wrote:

>
> "vgscan && vgchange -a y VolumeGroupName" on 11.3.
>
Dave,

Thanks a lot !

This in fact does work.

After vgchange I do see the appropriate device in /dev/mapper.

Other than with Suse 11.1 same is a symlink to ../dm-0 (with 11.1 this
was the device file).

But I in fact can mount it successfully using the mount instruction.

Unfortunately this is not "permanent". After a reboot i need to do
vgchange again to get the device back.

Is this what you expect ?

Unfortunately I think I do need a permanent configuration, as the LVs
are on USB drives and thus should mounted with automount.

Moreover even if I manually do vgchange and then see the volume, autofs
does not mount it when I try to access it's content.

Of course I doublechecked if the automount config files are done
correctly and a non LVM-volume configured in the same automount config
file does mount just fine when accessed.

How to proceed ?

Thanks a lot !

-Michael
Back to top
Doug Freyburger
External


Since: Dec 06, 2010
Posts: 10



PostPosted: Tue Mar 01, 2011 9:10 pm    Post subject: Re: Moving LVM drives [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Michael Schnell wrote:
> David W. Hodgins wrote:
>
>> "vgscan && vgchange -a y VolumeGroupName" on 11.3.
>
> This in fact does work.
>
> After vgchange I do see the appropriate device in /dev/mapper.
>
> Other than with Suse 11.1 same is a symlink to ../dm-0 (with 11.1 this
> was the device file).
>
> But I in fact can mount it successfully using the mount instruction.
>
> Unfortunately this is not "permanent". After a reboot i need to do
> vgchange again to get the device back.

vgchange -a y -A y VGname

The -A switch is for auto-backup. It records that the volume group is
supposed to be active at the next reboot.
Back to top
Michael Schnell
External


Since: Aug 28, 2004
Posts: 66



PostPosted: Tue Mar 01, 2011 10:10 pm    Post subject: Re: Moving LVM drives [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 01.03.2011 21:12, Doug Freyburger wrote:
>
>
> vgchange -a y -A y VGname
>

Thanks,

Sorry but no. This syntax is not accepted, and the man says that "-A y"
is the default anyway. So "Autobackup" does not seem to do the trick.

I found a call to vgchange in /etc/init.d/boot.lvm.

It might as if same needs to be configured to be executed.

-Michael
Back to top
Michael Schnell
External


Since: Aug 28, 2004
Posts: 66



PostPosted: Tue Mar 01, 2011 10:10 pm    Post subject: Re: Moving LVM drives [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 01.03.2011 22:30, Michael Schnell wrote:

> I found a call to vgchange in /etc/init.d/boot.lvm.
>
> It might as if same needs to be configured to be executed.
>

This seems to be the trick !

In the Yast run level editor, in Expert mode, boot.lvm can be assigned a
run level. By default it has none. I now set it to "B" (supposedly
"boot" and now my lvm device is in /dev/mapper after a reboot.

I would not have found this out without the help here !!!

Thanks a lot,
-Michael
Back to top
David W. Hodgins
External


Since: Dec 04, 2005
Posts: 348



PostPosted: Tue Mar 01, 2011 11:31 pm    Post subject: Re: Moving LVM drives [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Tue, 01 Mar 2011 16:41:56 -0500, Michael Schnell wrote:

>> I found a call to vgchange in /etc/init.d/boot.lvm.
>> It might as if same needs to be configured to be executed.
> This seems to be the trick !

Glad you got it working. On my Mandriva system, it's handled
by /etc/rc.d/rc.sysinit, if lvm has been installed ...

$ grep lvm /etc/rc.d/rc.sysinit
if [ -x /sbin/lvm ]; then
action "Setting up Logical Volume Management:" /sbin/lvm vgchange -a y --ignorelockingfailure

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)
Back to top
Michael Schnell
External


Since: Aug 28, 2004
Posts: 66



PostPosted: Wed Mar 02, 2011 11:10 pm    Post subject: Re: Moving LVM drives [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 02.03.2011 00:31, David W. Hodgins wrote:

> On my Mandriva system, it's handled
> by /etc/rc.d/rc.sysinit, if lvm has been installed ...

Obviously, Suse only activates the scrip, if you actively create an LVM
in Yast. Moving LVM drives is not supported by that.

-Michael
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Setup All times are: Eastern Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum