Skip to contentSkip to conversation

moving single LVM disk from one system to another

linux-lvm [email protected] 3 participants 8 messages Aug 17, 2002 – Aug 19, 2002

lore
Share & tools
lore
#0 lore raw

My workstation died (the MB, not the disk). :-(

In it I have a single ATA disk with three fdisk type partitions:

hd?1 Linux boot
hd?2 Windows ~hangs head in shame~ (it's for testing only :-) hd?3 LVM

Inside the LVM partition is the root, swap and a couple of other filesystems. On the ext3 /boot partition there is an initrd with all the magic in it to get LVM and ext3 up and running.

On the dead machine, where the disk was built and last running, the disk was device /dev/hde on a Promise ATA100 bus. I want to move it to another (working) machine on the primary ATA bus so it will be /dev/hda.

When I boot the system, the initrd fires up and runs a vgscan but it does not find the rootvol volume group. So I boot on my Linux distro's boot CD in rescue mode, install the LVM module, run vgscan (the vendor was nice enough to put the lvm tools on the boot/rescue cd) and it finds it fine. I run "vgchange -a y" and whammo, the volume group is active and I can mount my rootfs. Great. So I chroot the HD (LVM) rootfs and mount /boot and run vgscan again so that it updates the /etc/lvm* stuff and also build a new initrd, hoping that the new configuration information will make it into the initrd.

I reboot again and still vgscan finds no volume groups. What am I missing here? Why can the rescue mode of the boot CD find the volume group no problem with a vgscan and my initrd's vgscan cannot?

Thanx in advance for any enlightment.

b.

Signature · 1 line
Brian J. Murrell
#1 lore raw
Quoted 6 lines · On Sat, Aug 17 '02 at 03:09, [email protected] wrote:

My workstation died (the MB, not the disk). :-(
[ ... ]
On the dead machine, where the disk was built and last running, the disk was device /dev/hde on a Promise ATA100 bus. I want to move it to another (working) machine on the primary ATA bus so it will be /dev/hda.

Just a poke in the dark, but maybe your kernel get's the disks CHS information wrong on bootup. But hopefully you can force this on the mobo's BIOS.

Signature · 4 lines
Goetz Bock       (c) 2002 as     blacknet.de - Munich - Germany   /"\
IT Consultant    GNU FDL 1.1    secure mobile Linux everNETting   \ /
                                                                   X
 ASCII Ribbon Campaign against HTML email & microsoft attachments / \
#2 lore raw
Quoted 4 lines · Goetz Bock

Just a poke in the dark, but maybe your kernel get's the disks CHS information wrong on bootup. But hopefully you can force this on the mobo's BIOS.

But then, wouldn't the bootable CDROM that I can boot from and use vgscan to find the LVs have the same trouble?

b.

Signature · 1 line
Brian J. Murrell
#3 lore raw
In reply to [email protected]

Is that with our without devfs?
Have you checked, that device nodes are in your initrd for vgscan to be able to access them fine?
Does vgscan fail finding your VG our is it just wrong entries in /etc/fstab failing your root mount?

Quoted 43 lines · On Sat, Aug 17, 2002 at 03:09:02AM -0400, [email protected] wrote:

My workstation died (the MB, not the disk). :-(

In it I have a single ATA disk with three fdisk type partitions:

hd?1 Linux boot
hd?2 Windows ~hangs head in shame~ (it's for testing only :-) hd?3 LVM

Inside the LVM partition is the root, swap and a couple of other filesystems. On the ext3 /boot partition there is an initrd with all the magic in it to get LVM and ext3 up and running.

On the dead machine, where the disk was built and last running, the disk was device /dev/hde on a Promise ATA100 bus. I want to move it to another (working) machine on the primary ATA bus so it will be /dev/hda.

When I boot the system, the initrd fires up and runs a vgscan but it does not find the rootvol volume group. So I boot on my Linux distro's boot CD in rescue mode, install the LVM module, run vgscan (the vendor was nice enough to put the lvm tools on the boot/rescue cd) and it finds it fine. I run "vgchange -a y" and whammo, the volume group is active and I can mount my rootfs. Great. So I chroot the HD (LVM) rootfs and mount /boot and run vgscan again so that it updates the /etc/lvm* stuff and also build a new initrd, hoping that the new configuration information will make it into the initrd.

I reboot again and still vgscan finds no volume groups. What am I missing here? Why can the rescue mode of the boot CD find the volume group no problem with a vgscan and my initrd's vgscan cannot?

Thanx in advance for any enlightment.

b.

Signature · 7 lines
Brian J. Murrell

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
Signature · 15 lines
Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
[email protected]                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#4 lore raw
Quoted 2 lines · Heinz J . Mauelshagen

Is that with our without devfs?

Interesting you should ask. :-)

Quoted 2 lines

Have you checked, that device nodes are in your initrd for vgscan to be able to access them fine?

I am/was (for the past hour or two) just hunting this possibility down. I have the system currently booting from a tftp server (via an etherboot diskette) so that I can shorten the cycle of "modify initrd with more debugging and re-test". I am just about to put some debugging into the native hard disk booting initrd to see what disk nodes are there and such.

The kernel is being booted with "devfs=mount", so they should be there. I should know in a few more minutes what is going on.

Quoted 2 lines

Does vgscan fail finding your VG our is it just wrong entries in /etc/fstab failing your root mount?

vgscan fails to find the VG. I am sure this is going to turn out to be missing device nodes, but will have figure out why that is if devfs is being mounted.

Will keep ya posted.

b.

Signature · 1 line
Brian J. Murrell
#5 lore raw

OK. To update: it would seem that for whatever reason, devfs _is_ being mounted (cat /proc/mounts shows devfs on /dev and .devfsd is in /dev) but there are no device nodes under /dev/ide/host0/bus[01]/target0/. Strange. But that explains why vgscan could not find the VG.

The ide devices are seen by the kernel. /proc/ide/hd?/model shows the disk and CD R/W devices. /proc/partitions is empty however. Very strange. I will have to dig in and figure out why this is. All and any theories are welcome. :-)

But the long and short of my problem is that it's not an LVM problem. Not directly anyway.

b.

Signature · 1 line
Brian J. Murrell
#6 lore raw

It's embarassing but I will come clean...

Quoted 3 lines · On Mon, Aug 19, 2002 at 06:04:57AM -0400, [email protected] wrote:

there are no device nodes under
/dev/ide/host0/bus[01]/target0/. Strange.

Not so strange once I looked more closely. To try to soften the embarassment, let me explain. I am moving a disk from one motherboard to another. The board the disk was created on had two pairs (primary and secondary times two) of IDE ports. Regular, ol' IDE on ports on hda-hdd and ATA100 on ports hde-hdh.

Since the disk in question is an ATA 100 disk, I put it on hde to take advantage of the faster bus speed. Not wanting to waste "good" ATA 100 ports on silly devices like CD-RW drives I put mine on hda. And of course since it's a writer, added "hda=ide-scsi" to the kernel command line. I think you know where this is going.

In moving the disk to the new motherboard, it only has a single pair of IDE ports (primary and secondary), all ATA100, hda-hdd. So, naturally, I put the disk on hda, which was being masked by the hda=ide-scsi kernel parameter. Thus the empty /dev/ide/.../lun0/ directory.

Sorry to bother y'all with such a silly mistake. :-)

b.

Signature · 1 line
Brian J. Murrell
#7 lore raw
Quoted 19 lines · On Mon, Aug 19, 2002 at 08:24:00AM -0400, [email protected] wrote:

It's embarassing but I will come clean...

Quoted 3 lines · On Mon, Aug 19, 2002 at 06:04:57AM -0400, [email protected] wrote:

there are no device nodes under
/dev/ide/host0/bus[01]/target0/. Strange.

Not so strange once I looked more closely. To try to soften the embarassment, let me explain. I am moving a disk from one motherboard to another. The board the disk was created on had two pairs (primary and secondary times two) of IDE ports. Regular, ol' IDE on ports on hda-hdd and ATA100 on ports hde-hdh.

Since the disk in question is an ATA 100 disk, I put it on hde to take advantage of the faster bus speed. Not wanting to waste "good" ATA 100 ports on silly devices like CD-RW drives I put mine on hda. And of course since it's a writer, added "hda=ide-scsi" to the kernel command line. I think you know where this is going.

Quoted 7 lines

In moving the disk to the new motherboard, it only has a single pair of IDE ports (primary and secondary), all ATA100, hda-hdd. So, naturally, I put the disk on hda, which was being masked by the hda=ide-scsi kernel parameter. Thus the empty /dev/ide/.../lun0/ directory.

Sorry to bother y'all with such a silly mistake. :-)

Well, the wonderful world of PC style peripherals :(

Quoted 5 lines

b.

Signature · 1 line
Brian J. Murrell
Signature · 15 lines
Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
[email protected]                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-