LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 11-20-2013, 04:58 PM   #1
Automatic
Member
 
Registered: Mar 2013
Posts: 42

Rep: Reputation: Disabled
Changing XFS stripe size & width when growing an mdadm raid 5 array?


So, I've yet to set up my mdadm raid 5 array, however, I will be very soon (In a couple days), and, I have everything down except for one issue that's rattling around in my head, the XFS documentation says it's better to match the stripe size & width up with your raid array to get 'significant' speed improvements, and, it shows you how to do it here, which, is all good and dandy until you want to add another hard-drive to your mdadm raid array, due to the fact that you're meant (from what I can see) to enter this data when you're creating the filesystem (mkfs.xfs), it leaves me wondering what happens when I upgrade my array to include more hard-drives. When I add a new hard-drive to the raid array, my stripe width will still be configured for my old, smaller, raid array, and, won't be in it's optimal state anymore. Is there a way to regenerate the superblock with the new stripe width (Stripe size, I'd presume, would stay the same)?

Thanks,
Automatic.

Last edited by Automatic; 11-20-2013 at 05:20 PM.
 
Old 11-21-2013, 03:55 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Why not just remount the filesystem and autodetect the new values as it suggests?
 
Old 11-21-2013, 04:06 PM   #3
Automatic
Member
 
Registered: Mar 2013
Posts: 42

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by smallpond View Post
Why not just remount the filesystem and autodetect the new values as it suggests?
I must be really thick, may I ask where it says that? I see it says it'll autodetect, but, not on remount, only on creation.

EDIT:- Threw it onto VBox, made a small mdadm array using raid 5 & 3 8GB drives, aligned at 512KB. I made the xfs array, then, grew the mdadm array up to five drives, grew the xfs array, and, remounted it:-
http://i.imgur.com/0iCtHOV.png

/proc/mount contains:-
Code:
/dev/md127p1 on /mnt/raid type xfs (rw,relatime,attr2,inode64,sunit=1024,swidth=2048,noquota)
Which, after reading more about it here is in 512 byte sectors, so:-

sunit =1024 * 512bytes (Half a MB, 512KB)
swidth=2048 * 512bytes (One MB)

So, now, the sunit is correct, but, the swidth isn't (...I think?), however, if it's only a mount option I have to change I can deal with that. May I ask what exactly it changes? I was under the impression it was the whole foundations of the filesystem, not really something you can just 'slide around' in a couple of seconds remounting it.

EDIT:-
http://lxr.free-electrons.com/source/fs/xfs/xfs_super.c

That would lead me to believe that it's impossible to change, am I wrong? It clearly seems to only pick up on inode64/32, and, the write barrier option, along with a comment which says, well, you can read it for yourself.

So, does that mean it's impossible to change the value once the filesystem is created?

Last edited by Automatic; 11-22-2013 at 02:36 AM.
 
  


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
[SOLVED] size of backup-file for changing mdadm raid level? gardar Linux - Software 3 05-07-2012 08:59 PM
XFS stripe width on top of LVM over hardware RAID thebeerbaron Linux - Software 3 10-27-2011 02:41 PM
mdadm --grow --size=max does nothing (growing RAID-5) SteveMack Linux - Software 6 02-28-2011 03:01 PM
raid-0 XFS stripe size and stripe width ganja_guru Linux - Software 1 09-04-2005 08:15 AM
mdadm problems with growing an existing array mjcramer Fedora 2 07-11-2005 08:28 PM

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

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