LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 08-03-2009, 01:53 PM   #1
ABL
Member
 
Registered: Mar 2005
Location: NYC
Distribution: CentOS 5
Posts: 54

Rep: Reputation: 16
Stupid RAID error(s). How should I fix this?


I have a (backup) server offsite that I replicate our office data server to. Unfortunately, I created a RAID0 partition for / on my two PATA drives (my /boot partition is RAID1).

To fix this, I think I should:
attach a PATA drive that I can add live (through a USB connection), copy the / partition to a partition on the PATA/USB drive. Reformat the RAID0 partition as RAID1, then copy back the partition.

Will that work? I can do this without rebooting, I believe. Correct? I think I should probably reboot to make sure the machine will come up if there's a problem in the future, anyway.

Does anyone have a better solution?

Thanks!

--Alden
 
Old 08-03-2009, 02:00 PM   #2
karamarisan
Member
 
Registered: Jul 2009
Location: Illinois, US
Distribution: Fedora 11
Posts: 374

Rep: Reputation: 55
You shouldn't do the copy live (if anything changes during the copy, you could get an inconsistent filesystem), and you won't be able to unmount / live. You should boot a Live CD or USB environment - pick your favorite mainstream distro's install disk, perhaps - and work from there. I assume that by 'copy the / partition' you mean the files and not the partition itself; the latter won't work since switching from RAID 0 to RAID 1 will halve your disk space. That'll work fine, but two major things to remember: first, make sure you use an -a (--archive) option when making both the copy and copying back. cp and rsync both take -a, but cp has a habit of missing .files, so I recommend rsync. Second, you'll need to manually install grub to your new RAID 1 or it won't boot. Take some time to read up on that if you're not already comfortable doing it.
 
1 members found this post helpful.
Old 08-03-2009, 02:14 PM   #3
ABL
Member
 
Registered: Mar 2005
Location: NYC
Distribution: CentOS 5
Posts: 54

Original Poster
Rep: Reputation: 16
Thanks for the heads up on the live copy. I *could* grow the partition on the RAID1 PATA, but that's a good point, too.

Since I take the / partition, but exclude the /tmp, /boot, /var, and /home directories (since they are on different partitions), could I:
1) dd if=/dev/md1 of=/dev/$USBDRIVE
2) reset the RAID to RAID1
3) cp -a $USBDRIVE_MOUNT $PATA_ROOT_MOUNT (or rsync--PREFERRED)
4) reinstall grub on the / directory
5) reboot
?

Thanks!

Last edited by ABL; 08-03-2009 at 02:14 PM. Reason: added rsync in step 3
 
  


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
I feel Stupid and the internetz not helpfl stuck at Adapetec I2O Raid detecting theabcasian Slackware 1 05-31-2009 02:25 AM
> Help! Access Striped Raid on Dell Precision 670 workstation, stupid windows... oneplustwo Linux - Software 1 08-09-2008 03:19 PM
Linux Raid 1 Mirror bad on SCSI HDD. Howto fix? blkcamarozr28 Linux - Enterprise 1 10-17-2005 07:19 PM
Perc3Di SCSI RAID + Adaptec 2810SA RAID = Fatal Grub Error? LinuxOnTheEdge Linux - General 2 03-19-2005 02:35 PM
What does this STUPID error MEAN ikw38 Linux - Networking 4 07-07-2003 11:50 PM


All times are GMT -5. The time now is 05:10 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