LinuxQuestions.org
Visit Jeremy's Blog.
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 03-25-2009, 07:27 PM   #1
snoopy1
Member
 
Registered: Jun 2007
Posts: 44

Rep: Reputation: 15
RAID and XFS on current filesystem


Hello again,

I've got an XFS filesystem "sda1/sda2". I used mdadm to build a raid 1 array using "sdb1/2" but if I mount md0/md1 then I get..

I/O error in filesystem ("md0") meta-data dev md0 block ox7a90eff ("xfs_read_buf") error 5 buf count 512

I believe this is because software raid adjusts the superblock or something and therefore I need to reformat with xfs again.

My questions are;

a) is it possible to adjust the current xfs partition to work instead of dumping and importing to a new xfs partition

b) if a drive goes down in the future will I be able to mount the drive directly via /dev/sda1 or must it always be mounted via /dev/md0? The reason I ask is I don't know how software raid handles the situation, will it just run on one drive and send a system alert? I was hoping the filesystem was separate to raid so I could go back but it looks like xfs will depend on it. I couldn't therefore take a drive out and mount it if it's using raid.

Thanks for your help,

Andrew
 
Old 03-25-2009, 10:38 PM   #2
vindoan
LQ Newbie
 
Registered: Mar 2009
Posts: 23

Rep: Reputation: 17
1) Yes you can convert an existing partition into a RAID 1 array. The basic steps are:
-Create a single-disk RAID-1 with your new disk
-Copy/move all your data from the old-disk to the new RAID-1 array
-Verify the data move was successful
-Wipe the old disk
-Add the old disk to the new RAID-1 array
-Example at http://wiki.archlinux.org/index.php/...system_to_RAID ; its for ext2 FS, so adopt it according to xfs

2) If a drive goes down in a RAID1 array, it will be marked as dirty. You will still be able to access the array. You can also remove a drive from the system and mount it on another computer. See the software raid how-to simulate a failure. http://tldp.org/HOWTO/Software-RAID-HOWTO-6.html

I suggest you experiment with creating an array with two small partitions, and simulating a failure before you attempt to do this on real data.

Cheers
 
Old 03-26-2009, 09:04 AM   #3
snoopy1
Member
 
Registered: Jun 2007
Posts: 44

Original Poster
Rep: Reputation: 15
Thanks that made sense and worked. You have to reformat a md device with xfs afterwards - you cant use an existing. So I did what you said, copied the xfs partitions (xfsdump & xfsrestore) to sdb, set up a raid 1 device with sda only, dumped the files back onto md0, used the mdadm tool to add sdb as a spare device and then added it to the array.

The "restoring" files onto sdb was rather beautiful to watch.

Cheers,

Andrew
 
  


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
XFS drops create/delete files to 6.6% of EXT3 (sw raid) and to 0.6% (hw raid) darlingm Linux - Software 3 04-24-2008 10:39 AM
What is the best filesystem? (mainly xfs vs ext3) calimer Linux - Software 16 03-02-2005 12:07 AM
How to mount UTF8 on XFS filesystem? samxiao Linux - Hardware 0 01-27-2004 06:38 PM
XFS Filesystem on RH 9.0 Necessary? GATTACA Red Hat 7 12-29-2003 04:42 AM
XFS 64-bit filesystem sneeze Linux - Newbie 3 07-14-2003 05:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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