LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (http://www.linuxquestions.org/questions/red-hat-31/)
-   -   a RHEL4 box crashed, about LVM (http://www.linuxquestions.org/questions/red-hat-31/a-rhel4-box-crashed-about-lvm-404671/)

jiawj 01-17-2006 06:21 PM

a RHEL4 box crashed, about LVM
 
hello all:
A RHEL4 box crashed, the root partitions is LVM type,
I put the SCSI DISK on another RHEL4 box, as /dev/sdb:
Quote:

Disk /dev/sda: 73.5 GB, 73557090304 bytes
255 heads, 63 sectors/track, 8942 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 8942 71722192+ 8e Linux LVM

Disk /dev/sdb: 73.4 GB, 73407868928 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 104391 83 Linux
/dev/sdb2 14 8924 71577607+ 8e Linux LVM
now, how can I mount and chroot the /dev/sdb2 ?
thx for any idea .

kurgan32 01-18-2006 10:24 PM

First, if you mount /dev/sdb2 you aren't going to get very far with rescuing your data. The file system is actually on /dev/VolGroup**/LogVol**. There are important steps to take when sticking a drive setup with LVM into another machine with LVM. I would first say that you need to check to make sure that you don't have two disks with the same Volume Group name, check this with "lvm lvs" this will display all volume groups and the logical volumes contained in them. If the Volume Group names are different, you would want to mount it by using "mount /dev/VolGroup**/LogVol** /mnt/somedir" you should then be able to get the data you need off of it. If your Volume Group names are the same on both disks, you will have to rename the Volume Group name on your second disk. If you have any questions or doubts, PLEASE do not do anything untill you have removed all doubt. I hope this helps get you sarted in the right direction, please post back with any questions or comments.

jiawj 01-19-2006 03:25 AM

thanks very much, kurgan32.
I put the /dev/sdb2 return the box himself and power on,
this time, system started and stop at a line <B>...Control+D...</B>.
I enter root password and login, so I success rescue the data.
I'am learning about LVM.
Thx again, kurgan32.

danapsimer 02-09-2006 10:11 PM

kurgan32, great advise. I have a similar problem only this is a removeable laptop HD and I want to access it from my desktop system. I have an enclosure for it. Unfortunately I used the same volumne group name ( 'vg' LOL ) on both systems. How do you rename the volume group on the USB connected drive without touching the one on the local disks?

Thanks


All times are GMT -5. The time now is 10:35 AM.