Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.