LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-19-2009, 01:25 AM   #1
h8dk97
LQ Newbie
 
Registered: Jul 2004
Posts: 10

Rep: Reputation: 0
Moving root filesystem to another disk


Hi there,

Iíve setup a filesystem on a RAID 0+1 and am looking at moving root filesystem from a single disk to the new one. I could not install CentOS on mirrored filesystem as the RAID card did not have a pre-built driver for CentOS 5.3, so I had to compile the driver after installing the system.

What Iím going to do now is:

1. Mount the new mirrored filesystem under /root1
2. use find | cpio to copy everything from the existing / to /root1
3. use grub to create a boot record on /root1
4. edit /root1/etc/fstab to point / to the new disk
5. reboot the system and keep my fingers crossed

Is this the way to go? Am I missing anything?

Thanks very much.
 
Old 05-19-2009, 01:33 AM   #2
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 115Reputation: 115
The problem you might have is that you intend to boot /root1 then move everything into /root1 while the system is running out of that partition.

You'll probably be OK, but not certainly.

I think if I were you that I would identify exactly where in the system your raid driver was installed, and I would then make sure that I had a copy of that driver tucked away, and anything in /etc/modules, or /etc/modules.conf or /etc/conf.modules (depending on distro) tucked away safely also. Then, after doing my copy and before rebooting, I'd check all the relevant files to make sure they were there and they were right.

If, after copying, the system didn't work (which could happen), I'd have a Linux Live CD sitting ready, and I'd boot into that to make the checks of the filesystem, then I'd boot into it.
 
Old 05-19-2009, 02:25 AM   #3
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
I've done this sort of thing with a liveCD using "cp -axu from to". There's also the issue of whether you're using fakeraid or mdadm to create your raid. If fakeraid you need dmraid, and you need to update the initfs for the kernel so it can access the raid when the kernel boots up. If mdadm, you need the conf file in the right place and setup correctly on the new drive. In any case, do this stuff from a liveCD to avoid the bulk of the problems during the copy; such as trying to copy /dev, /proc, etc.
 
Old 05-21-2009, 01:32 AM   #4
h8dk97
LQ Newbie
 
Registered: Jul 2004
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks a lot for your replies. I'll boot from live cd and then do the copy, will see what happens.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
disk crashing and moving /home to a new server but all permissions are root HELP! nocnoc Linux - Newbie 4 11-29-2006 12:29 PM
Complete Hard-Disk & Root Filesystem Backup taylor_venable *BSD 1 11-18-2005 03:20 PM
dm-crypt: Moving Encrypted Filesystem hamish Linux - Security 2 07-21-2005 03:57 AM
Encrypted Root Filesystem HOWTO and /dev filesystem tmillard Linux From Scratch 0 10-18-2004 04:58 PM
howto boot root filesystem from SATA disk? david.skinner Linux - Hardware 4 06-17-2004 01:51 AM


All times are GMT -5. The time now is 05:58 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration