Operating System - Linux
1829092 Members
2543 Online
109986 Solutions
New Discussion

How do I reference logical drives when booting from RedHat recovery CD

 
bt5678
New Member

How do I reference logical drives when booting from RedHat recovery CD


I'm working on a recovery scenario where I boot off a RedHat rescue CD and mount and restore data from a mirrored set of hard drives.

Currently my DL380-G4 has 2 logical drives - both Raid 1. ( so 4 drives total)

I'm asuming Raid #1 will fail at some point and I will need to recover from Raid #2.

When I boot off CD to linux rescue and attempt to mount /dev/cciss/c0d0p1 /recovery (Raid #2)It mounts Raid #1.

I guess I don't know enough about how to reference the logical drives especially when booting from Red Hat's rescue CD.

How do I refer to Raid #2 and how do I mount it? Can someone give me some pointers? Thanks.
7 REPLIES 7
Ivan Ferreira
Honored Contributor

Re: How do I reference logical drives when booting from RedHat recovery CD

To list the devices and partitions, use fdisk -l. I think that the second RAID will be /dev/cciss/c0d1p1.

You can post the results of fdisk -l.

Do you use the second raid as backup of the first? I mean, do you want to recover the data on the first array from the second right?
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
bt5678
New Member

Re: How do I reference logical drives when booting from RedHat recovery CD


When I boot from the Linux rescue CD,
sfdisk -l gives me:

/dev/cciss/c0d0p1 0+ 12 13- ... Linux
/dev/cciss/c0d0p2 13 4426 352... Linux LVM
/dev/cciss/c0d0p3 0 - 0 0 0 Empty
/dev/cciss/c0d0p4 0 - 0 0 0 Empty

attempting to mount /dev/cciss/c0d0p3 gives me no such device or address.

Thanks for your help!

-tom
Ivan Ferreira
Honored Contributor

Re: How do I reference logical drives when booting from RedHat recovery CD

Please post also the output of fdisk -l and cat /proc/mounts when the system is not in rescue mode. It seems that you are seeing only one array with two partitions.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
bt5678
New Member

Re: How do I reference logical drives when booting from RedHat recovery CD


Here is the output after booting normally.

-tom

fdisk -l
Disk /dev/cciss/c0d0 36.4GB
/dev/cciss/c0d0p1 * 1 13 10491 83 Linux
/dev/cciss/c0d0p2 * 14 35455455 8e Linux LVM

Disk /dev/cciss/c0d1:36.4 GB
/dev/cciss/c0d1p1 1 37 150944 83 Linux

sudo cat /proc/mounts

rootfs / rootfs rw 0 0
/proc /proc proc rw, nodiratime 0 0
non /dev tmpfs rw 0 0
/dev/root / ext3 rw 0 0
none /dev /tmpfs rw 0 0
none /selinux selinuxfs rw 0 0
/proc /proc proc rw,nodiratime 0 0
/proc /bus/usb /proc/bus/usb usbfs rw 0 0
/sys /sys sysfs rw 0 0
non /dev/pts devpts rw 0 0
/dev/cciss/c0d0p1 /boot ext3 rw 0 0
none /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
/dev/cciss/c0d0p1 /recovery ext3 rw 0 0


Thanks.

Ivan Ferreira
Honored Contributor

Re: How do I reference logical drives when booting from RedHat recovery CD

Some problem exists when you boot form the CD, as you can see, normally you see:

Disk /dev/cciss/c0d0 36.4GB
Disk /dev/cciss/c0d1:36.4 GB

But in rescue, you don't see c0d1. You should try forcing scsi rescan with this script:

www.garloff.de/kurt/linux/rescan-scsi-bus.sh
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ivan Ferreira
Honored Contributor

Re: How do I reference logical drives when booting from RedHat recovery CD

Also, you are using LVM in the first array, to mount the device you should use the /dev/vgname/lvname, instead of the partition name!!
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ivan Ferreira
Honored Contributor

Re: How do I reference logical drives when booting from RedHat recovery CD

Sorry, in rescue mode, the LVM devices are under the /dev/mapper directory (?):

See this info:

http://www.centos.org/docs/4/html/rhel-sag-en-4/s1-rescuemode-boot.html
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?