LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-29-2008, 11:16 PM   #1
benderan
LQ Newbie
 
Registered: Sep 2008
Location: Boulder, CO
Distribution: Redhat EL5, Scientific Linux, Fedora
Posts: 21

Rep: Reputation: 15
Mirror onto a new drive & RAID


Hi all,

I'm not sure if this is exactly the right forum, but here goes. My system currently has 146GB hard drive running Scientific Linux 3.0.8 (a free distribution of Redhat Enterprise Linux 3). I would like to replace the current hard drive with a new solid state drive. The problem is that the max capacity I can find of solid state drives is 128 GB. I am not using the full drive capacity, but unfortunately it is fully partitioned (i.e. the partitions take up the full 146GB) despite not using all that space.

My first question is, will I have to re-setup everything to transfer over to the new drive (i.e. base install the OS & then copy all the files over)? Or is there a way I could just mirror the drive? If I were to get a hard drive of equivalent size could I just mirror the drive directly (and how would I go about doing it)? I should add that if possible without too much extra work, the solid state drives are a better solution for my case because the drives run at high altitude (>5000 meters).

Would it be possible to use 3 solid state drives and a RAID 5 configuration to make this setup? Again, if so, how would you suggest going about the initial mirroring over to the new drives & RAID setup?

Thanks!
 
Old 10-30-2008, 04:41 PM   #2
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,851
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284
There are a lot of different ways to go about this.

There are some issues with solid state drives, from what I've read that make it inadvisable to use them with a journaling filesystem. So ext2 not ext3 for the new disks. There may be other issues in that regard as well.

As far as moving the OS over, if you can, a reinstall is usually a better idea, with moving the files over later. But, if you don't want to do that, then you could use rsync to move the whole filesystem over to the new disk. Since you aren't using 128 MB in your existing setup, it should fit. Just add the new drive, partition it, make your nonjournaled filesystem, mount it and rsync over to it. You'll have to reinstall the boot manager on that drive and test it out before removing your old drive.

I wouldn't recommend making a mirror then breaking it as a migration plan.
 
Old 10-30-2008, 11:41 PM   #3
benderan
LQ Newbie
 
Registered: Sep 2008
Location: Boulder, CO
Distribution: Redhat EL5, Scientific Linux, Fedora
Posts: 21

Original Poster
Rep: Reputation: 15
A quick question about your second suggestion (using rsync). I've only ever partioned my disk during the install of an OS. How does one do this if they just have empty disks (with just the RAID array setup)? Also a question about rsync. I was unaware that it will work without an OS on the new disks... Is there any special options you would suggest? I'm assuming when you say I can rsync the entire file system you mean just rsync-ing the / directory in my root partition, and a similar procedure for my /boot partition. Will the installation files for GRUB be on my OS install disks (and can suggest a procedure here). Sorry for all the nitty-gritty questions, but I'm still new to Linux admin and need to make these things work (and quickly).
 
Old 11-01-2008, 09:27 AM   #4
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,851
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284
To partition and rsync without installing the OS, use a boot CD style distro; Knoppix is the archetypal example. Boot the machine with Knoppix, fire up fdisk in an xterm window, e.g.
fdisk /dev/sda, if /dev/sda is the disk you want to partition.
then make the filesystem with mkfs.ext2 on, say, the first partition
mkfs.ext2 -i 128 -c /dev/sda1
then mount the old filesystem somewhere
make mount points
mkdir /mnt
mkdir /mnt/oldroot
mkdir /mnt/newroot
mount /dev/sdb2 /mnt/oldroot, assuming your old / is on /dev/sdb2
mount your new root
mount /dev/sda2 /mnt/newroot, assuming your old / is on /dev/sda2
then rsync -avR -x /mnt/oldroot /mnt/newroot

You can also do this from your existing setup by booting into the old setup; obviously then you don't have to mount / on /mnt/oldroot

Repeat for the /boot partition (if it is a separate partition), then the GRUB files will be installed, though grub itself will not. Tou can install grub to the new disk with either the grub prompt (type "grub" and find to find the files and install.) grub-install /dev/sda usually works too.

check man fdisk, man rsync man mkfs.ext2 to catch any typos I may have made
 
  


Reply



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
want to 100% mirror 1st hard with RAID, before & after install RHLE. hocheetiong Linux - Newbie 1 09-10-2007 01:29 AM
About Mirror & RAID shipon_97 Linux - Newbie 14 02-14-2007 01:20 AM
What to Mirror - RAID 1 SBFree Linux - Newbie 4 01-14-2006 07:17 PM
Mirror Raid support? Mediocre_Driver Linux - Hardware 1 01-20-2004 08:14 PM
Expert opinion partioning hard drive & making raid 1 coskun Linux - General 0 07-07-2003 08:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:43 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration