Access Old Home Directory - USB enclosure - LVM

Robert L Cochran cochranb at speakeasy.net
Sun Jan 1 00:25:27 UTC 2006


Jim Cornette wrote:

> Robert L Cochran wrote:
>
>> Hi,
>>
>> I recently upgraded my desktop system with a much larger hard drive. 
>> The old hard drive  is now in an external hard drive enclosure (the 
>> kind made by Metal Gear Box) and is plugged in to a USB port. The old 
>> drive has these partitions
>>
>> Microsoft Windows XP -- 30 Gb
>> Fedora Core 4 -- 30 Gb
>>
>> My problem is, I can see the /boot partition on the drive, but I 
>> cannot see the / (root) partition, and I'm want to get at my former 
>> home directory because I have some files there I forgot to back up. 
>> I'm wondering if that partition was named something like: 
>> '/dev/VolGroup00/LogVol00' and mounted on /.
>>
>> Thanks for any help!
>>
>> Bob Cochran
>>
> You are right that the / partition is contained in the LVM. I believe 
> you need to run lvm and make the partition active, assign a mountpoint 
> for the lvm, then mount the lvm.
> The label that the old hard drive is using is probably / which is the 
> label most likely used on your newly installed system.
> I recovered my previous installation using a USB enclosure and 
> activating the LVM. It was a long time back and useful information on 
> activating the LVM was upplied by someone on this list.
> Adding USB enclosure - LVM to subject.
>
> Jim
>
Thanks for the insight. This led me to give 'man lvm' a fast glance, 
then I Googled on lvm and found a how-to in the LDP, part of which is this:

http://www.tldp.org/HOWTO/LVM-HOWTO/recipemovevgtonewsys.html

I'd better explain that in my old system, I had two (2) physical hard 
drives. The first is a 60 Gb drive and this is the drive we are 
discussing below, which is installed in a Metal Gear USB hard drive 
enclosure.

The second drive is a 120 Gb drive which actually represents a former 
Fedora Core system (whether FC2 or FC3, I can't remember.)  I built a 
new computer more than a year ago. I bought the 60 Gb drive, divided 
that into a partition for Windows XP and left the rest as unallocated 
free space. I installed Windows, then installed Fedora Core 3. At the 
time I installed FC 3, I decided to plug in the 120 Gb drive as a second 
hard drive. I just thought of it as a way of giving myself access to the 
data on my former system. This was mounted on a directory named /mnt/any 
and seemed to work fine for a long while under FC3. The only odd thing 
is that I couldn't do any compiles with gcc from the directories on that 
drive. I'd get messages about not having permission. The directories 
were named similarly to my current home directory. I use /home/rlc on 
this system, and the old system also had /home/rlc when that was active. 
I then ran FC3 for a long time on this system. I upgraded this 2-hard 
drive system to Fedora Core 4. I've only been running FC4 for a few 
months now.

Now I've done yet a makeover of my hardware. I took out the 60 and 120 
Gb drives and in their place I put in a 400 Gb drive. The old 
motherboard and processor have been replaced too.

Now I realize that my backup DVD doesn't have some files I really need. 
I've quickly put the 60 Gb drive in the drive enclosure and plugged it in.

But I'm still confused by my own attempts to bring back my old 
partitions and access those directories. I plugged in the USB cable with 
this result:


Dec 31 18:37:16 bobcp4 fstab-sync[21919]: added mount point 
/media/usbdisk for /dev/sdb1
Dec 31 18:37:17 bobcp4 fstab-sync[21925]: added mount point 
/media/usbdisk1 for /dev/sdb2

Then I did a 'pvscan' to see if I could find the volume group:

[root at bobcp4 ~]# pvscan
  PV /dev/sda2   VG VolGroup00   lvm2 [372.50 GB / 32.00 MB free]
  Total: 1 [372.50 GB] / in use: 1 [372.50 GB] / in no VG: 0 [0   ]

What we see above is my current active lvm partition. I wonder why the 
swap volume group isn't shown? And there is nothing from sdb...puzzling, 
that.

So on the hard drive I mounted via USB, I would expect to see 4 
partitions when I think about it:

an NTFS partition for Windows XP;

a swap partition;

a /boot partition for FC4;

and a / partition for everything else.

/ and swap seems to be missing.

Here is what's in /media/usbdisk. I suspect it is probably Windows XP, 
the NTFS partition:

[root at bobcp4 ~]# ls -al /media/usbdisk
total 12
drwxr-xr-x  2 root root 4096 Dec 31 18:37 .
drwxr-xr-x  6 root root 4096 Dec 31 18:37 ..

/media/usbdisk1 looks like /boot:

[root at bobcp4 ~]# ls -al /media/usbdisk1
total 28262
drwxr-xr-x  4 root root    4096 Dec 14 05:53 .
drwxr-xr-x  6 root root    4096 Dec 31 18:37 ..
-rw-r--r--  1 root root   50848 Jun  2  2005 config-2.6.11-1.1369_FC4
-rw-r--r--  1 root root   52480 Sep 28 19:24 config-2.6.13-1.1526_FC4
-rw-r--r--  1 root root   52514 Oct 20 01:38 config-2.6.13-1.1532_FC4
-rw-r--r--  1 root root   54391 Nov  9 19:16 config-2.6.14-1.1637_FC4
-rw-r--r--  1 root root   54413 Nov 27 03:34 config-2.6.14-1.1644_FC4
-rw-r--r--  1 root root   54399 Dec 13 21:46 config-2.6.14-1.1653_FC4
drwxr-xr-x  2 root root    1024 Dec 14 05:53 grub
-rw-r--r--  1 root root 1948129 Oct  9 12:32 initrd-2.6.11-1.1369_FC4.img
-rw-r--r--  1 root root 1954696 Oct  9 15:20 initrd-2.6.13-1.1526_FC4.img
-rw-r--r--  1 root root 1955846 Oct 20 20:47 initrd-2.6.13-1.1532_FC4.img
-rw-r--r--  1 root root 1917983 Nov 10 16:45 initrd-2.6.14-1.1637_FC4.img
-rw-r--r--  1 root root 1917986 Nov 28 21:12 initrd-2.6.14-1.1644_FC4.img
-rw-r--r--  1 root root 1917769 Dec 14 05:53 initrd-2.6.14-1.1653_FC4.img
drwx------  2 root root   12288 Nov 10  2004 lost+found
-rw-r--r--  1 root root  916318 Jun  2  2005 System.map-2.6.11-1.1369_FC4
-rw-r--r--  1 root root  941697 Sep 28 19:24 System.map-2.6.13-1.1526_FC4
-rw-r--r--  1 root root  942036 Oct 20 01:38 System.map-2.6.13-1.1532_FC4
-rw-r--r--  1 root root  958081 Nov  9 19:16 System.map-2.6.14-1.1637_FC4
-rw-r--r--  1 root root  958383 Nov 27 03:34 System.map-2.6.14-1.1644_FC4
-rw-r--r--  1 root root  958892 Dec 13 21:46 System.map-2.6.14-1.1653_FC4
-rw-r--r--  1 root root 1951836 Jun  2  2005 vmlinuz-2.6.11-1.1369_FC4
-rw-r--r--  1 root root 2020745 Sep 28 19:24 vmlinuz-2.6.13-1.1526_FC4
-rw-r--r--  1 root root 2021093 Oct 20 01:38 vmlinuz-2.6.13-1.1532_FC4
-rw-r--r--  1 root root 1718117 Nov  9 19:16 vmlinuz-2.6.14-1.1637_FC4
-rw-r--r--  1 root root 1717815 Nov 27 03:34 vmlinuz-2.6.14-1.1644_FC4
-rw-r--r--  1 root root 1713442 Dec 13 21:46 vmlinuz-2.6.14-1.1653_FC4

So, where is everything else?

Thanks for any help.

Bob Cochran




More information about the fedora-list mailing list