[LUAU] Re: Linux HD Recovery
John S. Johnson
jsj at amagata.com
Thu Jan 18 19:49:20 PST 2007
My adventures in hard disk recovery continues. I tried to hook up the
old primary drive as the main drive on another system but got a kernel
panic error and a reset. I decided it would be best to try to mount the
drive via an external USB hard disk enclosure and try copying the data
off. Before hooking it up, I checked the physical volumes with pvscan
and got the following:
---------------------
[root at www jsj]# /usr/sbin/pvscan
PV /dev/hde2 VG VolGroup00 lvm2 [38.06 GB / 32.00 MB free]
Total: 1 [38.06 GB] / in use: 1 [38.06 GB] / in no VG: 0 [0 ]
[root at www jsj]#
-----------------------
I hooked up the drive and turned it on and got the following:
-----------------------
[root at www jsj]# /usr/sbin/pvscan
Couldn't find device with uuid
'0caVRx-fuNp-lc2N-or5C-6Ky7-52oS-pQF0RU'.
PV unknown device VG VolGroup00 lvm2 [6.00 GB / 0 free]
PV /dev/sda2 VG VolGroup00 lvm2 [1.84 GB / 64.00 MB free]
Total: 2 [7.84 GB] / in use: 2 [7.84 GB] / in no VG: 0 [0 ]
-----------------------
I am worried about the "Couldn't find device with uid..." comment. My
system went down hard and I am sure the drives need to be cleaned for
inconsistencies(although I have no idea how to). Anyway, from this I can
tell that the USB drive is on /dev/sda, so I decided to use fdisk to
check out its partition table:
-----------------------
[root at www jsj]# /sbin/fdisk /dev/sda
Command (m for help): p
Disk /dev/sda: 2113 MB, 2113413120 bytes
255 heads, 63 sectors/track, 256 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 256 1951897+ 8e Linux LVM
Command (m for help):
-----------------------
This looks right. Now how to mount it...it's a Linux LVM drive. I can
directly mount /dev/sda1 but not /dev/sda2 since it is Linux LVM. I
believe you are supposed to mount the volume group itself(hmm...would
there be any trouble in that /dev/hde2 and /dev/sda2 are both
automatically named VolGroup00?). As Vince suggested, I tried using
vgchange:
-----------------------
[root at www jsj]# /usr/sbin/lvm vgchange -a y
2 logical volume(s) in volume group "VolGroup00" now active
-----------------------
So now we have two volumes active. It's time to see which volumes they
are...
-----------------------
[root at www jsj]# /usr/sbin/lvm lvscan
ACTIVE '/dev/VolGroup00/LogVol00' [37.53 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol01' [512.00 MB] inherit
-----------------------
Hmm...neither seem to be my 2GB partition....not sure why...could it be
that the volumes on my other drive were named /dev/VolGroup00/LogVol00
and /dev/VolGroup00/LogVol00 as well? I'm not sure...I decided to take a
look at the volume groups via the vgdisplay command...
-----------------------
[root at www jsj]# /usr/sbin/lvm vgdisplay -P -v
Partial mode. Incomplete volume groups will be activated read-only.
Finding all volume groups
Finding volume group "VolGroup00"
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 38.06 GB
PE Size 32.00 MB
Total PE 1218
Alloc PE / Size 1217 / 38.03 GB
Free PE / Size 1 / 32.00 MB
VG UUID rmtJio-1AqZ-W8ZI-rt4P-4nuD-4pAP-Jo3rGb
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID 1fQ23c-q2Gm-VSHA-cGby-vjTp-E7BD-OsDJfZ
LV Write Access read/write
LV Status available
# open 1
LV Size 37.53 GB
Current LE 1201
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:0
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID Vm0X6G-jhjZ-SqbI-iEKg-My91-zt2y-KmlNPp
LV Write Access read/write
LV Status available
# open 1
LV Size 512.00 MB
Current LE 16
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:1
--- Physical volumes ---
PV Name /dev/hde2
PV UUID Dvb1gT-8ZxD-JNfG-tXh9-cloY-6hNz-25BqFS
PV Status allocatable
Total PE / Free PE 1218 / 1
-----------------------
Again, I don't see /dev/sda represented in here. Anyone know why or what
to do?
In case a look in my /etc/fstab may be helpful:
-----------------------
[root at www jsj]# more /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup00/LogVol00 / ext3 defaults
1 1
LABEL=/boot /boot ext3 defaults
1 2
none /dev/pts devpts gid=5,mode=620
0 0
none /dev/shm tmpfs defaults
0 0
none /proc proc defaults
0 0
none /sys sysfs defaults
0 0
/dev/VolGroup00/LogVol01 swap swap defaults
0 0
/dev/hda /media/cdrecorder auto
pamconsole,exec,noauto,m
anaged 0 0
/dev/sda1 /media/usbdisk ext3
pamconsole,exec,noauto,n
oatime,sync,managed 0 0
[root at www jsj]#
-----------------------
I'd appreciate it if anyone can give me advice for mounting the LVM
partition and maybe cleaning up the inconsistencies problem(I tried to
Ghost the HD so I could experiment with a copy of it, but Ghost bombed
out, citing inconsistencies on the disk).
Thank you very much in advance and sorry for the long post...
--John Johnson
More information about the LUAU
mailing list