PDA

View Full Version : mounting a second LVM hard drive


LarryJ
11th June 2006, 04:46 PM
I tried upgrading my FC4 to FC5. I had several problems so I decided to start fresh. So I removed the old IDE FC4 hd then installed a new SATA HD and installed FC5. The computer boots and runs OK from the new sda SATA FC5 volume. Now I would like to grab a few files off the old ATAFC4 HD. After connecting the old FC4 hd, I can't get the old IDE ATA FC4 hd to mount and I can't see the files from the old FC4 HD anywhere. But the old FC4 hd shows up in "fdisk -l". In fdisk-l output shown below, the hdb HD is the old FC4 volume and the sda is the newer SATA FC5 volume.

What command do I issue to be able to mount then read files off the FC4 hd (hdb)??

I've tried # mount -t ext3 /dev/hdb /mnt/fc5
mount: wrong fs type, bad option, bad superblock on /dev/hdb,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

where directory fc5 lists as
# ls -al /mnt
total 24
drwxr-xr-x 3 root root 4096 Jun 10 19:14 .
drwxr-xr-x 23 root root 4096 Jun 11 07:56 ..
drwxr-xr-x 2 root root 4096 Jun 10 19:14 fc5

but mount from th new SATA FC5 drive replies

mount: wrong fs type, bad option, bad superblock on /dev/hdb,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

[root@penguine # fdisk -l

Disk /dev/hdb: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 30515 245007315 8e Linux LVM

Disk /dev/sda: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 36483 292945275 8e Linux LVM

multescugeorge@
11th June 2006, 05:03 PM
mount -t ext3 /dev/hdb /mnt/fc5

the /dev/hdb thingy is no longer available, since it's all about LVM.
try to start up:
system-config-lvm
if it doesn't exist, add it from yum.
there see the exact name of the FC4 volume.
instead of /dev/hdb, you'll be using something like: /dev/VolGroup10/LogVol00
the exact name should appear in the lvm config program.

ccrvic
11th June 2006, 05:17 PM
# mount -t ext3 /dev/hdb /mnt/fc5

That's not going to work anyway - /dev/hdb is a drive, not a partition.

But you've put your data into LVM, so you can't mount it directly like this.

You'll have to find your VGs - try

vgscan
vgchange -a y

That should give you something like /dev/VolGroup0/lvol0 that you can mount.

Vic.

LarryJ
11th June 2006, 05:21 PM
try to start up:
system-config-lvm

multescugeorge:

Thanks for the quick reply. system-config-lvm gui comes up OK but asks "!All data on disk entry /dev/hdb2 will be lost! Are you certain that you wish to initialize it?" I didn't go past that point because I don't want to lose the data off the old drive just yet. Do I dare proceed with lvm initalization?

Larry

LarryJ
11th June 2006, 05:43 PM
REF: vgscan
vgchange -a y

That should give you something like /dev/VolGroup0/lvol0 that you can mount.

Ah that's it CCVIC!!

For the benefit of others that may read this I found a directory in "/dev" titled "VolGroup00"

In that directory were two more directories "LogVol01" and "LogVol00". (read this as Logical Volume zero one and zero zero) which thought I, correspondied to my old IDE drive and my new SATA drive. Next I issued a

#mount -t ext3 /dev/VolGroup00/LogVol00 /mnt/fc5

and then I thought I was able to see all the files off the old hd under /mnt/fc5.

But my joy was premature [:( The files I was seeing under /mnt/fc5 was another view of the mounted and booted SATA drive which I had just used to boot, not my old ATA drive.

Eventually I was able to install only the old ATA drive by itself and then with some serious editing of the grub.conf file (changing drive designations to hd0,0) , I got the old drive to boot. Then I off loaded the files I wanted to save on to a DVD.

(Edit 6-12-06) I believe now that my problem was that both drives had identical LVM volume labels. Apparently, I should have relabeld the old drive. Look at SlowJet's post here:
http://forums.fedoraforum.org/forum/showthread.php?t=77457

Thanks to all who offered help.
Larry

Winter Haven, Florida