LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-31-2015, 05:04 AM   #1
BoraxMan
Member
 
Registered: Apr 2010
Posts: 103

Rep: Reputation: 11
Question XFS and allocation group alignment on spanned disks


I have a question regarding the location of allocation groups on concatenated disks/volumes.

How can XFS guarantee that a volume consisting of concatenated spindles has the allocation groups aligned with the disks? If we have two disks concatenated, say 2x2TB, and 8 allocation groups, how does XFS ensure that the 5th AG starts at the start of the second disk, and not further in with a section of the 4th allocation group spilling over, or at the end of the 1st disk and continuing to the second? Even the partition table can result in the filesystem not being evenly distributed between the two disks?

I would imagine to take advantage of parallelism among the contatenated spindles, you want each AG to be wholly contained within one spindle, but I'm not sure how such a thing can be guaranteed given variation, even slight variation between disk sizes.

I ask because I want to buy an enclosure which allows spanning of two disks, and format the concatenated volume as XFS, but I want to know, before I do so, if it is possible to have the allocation groups aligned if the disks are different sizes, OR, if the disks are the same size (ie, 2x2TB), whether they will align with the disk boundaries given there might be a partition table and slight variation in the total disk size. I note that the two WD Green 1.5T drives I have aren't exactly the same size down to the byte.

Thanks,
 
Old 04-01-2015, 05:46 AM   #2
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
How can XFS guarantee that a volume consisting of concatenated spindles has the allocation groups aligned with the disks?
The allocation groups are specific to the physical media.The volume your referencing in your question is logical. Logical volumes can aggregate dissimilar spindles to provide a logical abstraction of total capacity. When the hard or soft guarantee is calculated, things like the spanning your referencing is factored in. While XFS does attempt to leverage parallelism to improve IO it also uses a lazy write and btree journaling system, as well as on-the-fly de-fragmentation in order to build the optimal set of contiguous blocks for pending writes to disk, which in turn reduces seek time and improves hardware performance.
In the case of a raid, stripes are likely handled in the same way they are on other file systems because again, the RAID construct is a logical one, not physical however I've never built a raid on top of XFS (though after doing a bit of reading, I'm giving it some thought). Thanks for the question, btw. XFS is an interesting technology.
 
Old 04-01-2015, 06:39 AM   #3
frostschutz
Member
 
Registered: Apr 2004
Distribution: Gentoo
Posts: 95

Rep: Reputation: 28
iirc mkfs.xfs tries to detect some things (such as software raid striping) but, those values will be off anyway as soon as you grow your RAID

I don't think this kind of optimization makes a huge difference.

The only argument to mkfs.xfs I use nowadays is 4k sector size, since all my disks are 4k but they keep claiming 512 bytes and mkfs.xfs uses 512 bytes as well...
 
1 members found this post helpful.
  


Reply

Tags
raid, xfs



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I setup Windows Spanned Dynamic Disks to be used in Linux? nLEyETn Linux - Hardware 22 04-12-2018 09:08 PM
Ubuntu overwrite mbr of a XFS-Dmcrypted-Raid 1 disks. How recover data? pianeta_rosso Linux - General 3 11-29-2008 03:50 PM
How delayed allocation is done in xfs, ext4fs ? PankajDS Linux - Kernel 1 02-08-2008 07:36 AM
reducevg on spanned physical disks consty AIX 1 09-30-2006 03:19 AM
XFS + Raid and how to test SATA disks Krugger Linux - Software 0 05-10-2006 04:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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