LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   How do I create a swappable hard drive (https://www.linuxquestions.org/questions/linux-hardware-18/how-do-i-create-a-swappable-hard-drive-904312/)

SimGuy 09-21-2011 08:44 PM

How do I create a swappable hard drive
 
Hi everyone,
I have several computers with the same hardware and removable hard drives. I want to be able to create several back up hard drives that I can simply swap out if one goes bad in the computers. I am runnign CentOS 5.4.

I have set up the partitioning scheme with /boot, /, swap, and /home and have tried to swap out the drives but get a kernel panic every time.

Is there a specific partitioning scheme, fstab setup or grub.conf arguments that I need to have set up in order for this to work?

Any advice is greatly appreciated!

Thanks!

replica9000 09-21-2011 09:24 PM

Can I have some more information?

Are you swapping drives with the system on or off? Also can you post your fstab?

SimGuy 09-22-2011 10:49 AM

The system is off when I swap drives. I do a full shut down, swap the drives then turn the computer back on. I have one computer that I have been doing some development on and trying to get this swappable hard drive issue resolved. I have a second computer where I am testing swapping the hard drives. Both systems are identical hardware. The system loads up just fine on the original computer that I loaded CentOS onto but when I try to move that hard drive to another computer that's when I have problems. I will post fstab for both systems when I get a chance.

The error message is as follows:
Code:

mount: could not find filesystem '/dev/root'
setuproot: moving /dev failed: No such file or directory
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
switchroot: mount failed: No such file or directory
Kernel panic - not synching: Attempted to kill init!


replica9000 09-22-2011 12:00 PM

The drive that you are swapping has the root filesystem on it?

jefro 09-22-2011 03:13 PM

I suspect some issue with how each system is using the disk. Disk id may need to have entries set by uuid. To fix it by labels like sdx then you have to have bios and maybe some other things set to match all systems.

business_kid 09-23-2011 02:26 AM

In the misbehaving machine, it looks like you are putting that drive in the wrong place. The grub entry you use is incorrect - that's why it can't find /dev/root.

What you are doing is crazy, btw. Leave the OS - store & move data, and only if you have regular backups. Is there a network drive they can both access?


All times are GMT -5. The time now is 04:03 PM.