LinuxQuestions.org
Review your favorite Linux distribution.
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 11-26-2017, 11:16 PM   #1
road hazard
Member
 
Registered: Nov 2015
Posts: 199

Rep: Reputation: Disabled
Need some MDADM things explained to me, as if I were a newbie. A child-like newbie.


I wiped out my mdadm array (not due to user error, was just playing around with adding drives, failing them, different settings.... play time is over now and want to do things right when setting it back up.)

Server is running an i7 7700K, 16 gigs of RAM. Mint 18.2. Storage is 12, 4TB drives in RAID 6. File system will be XFS (maybe ext4 but I keep reading conflicting data about how ext4 is limited to a 16TB partition. If it's not, which would be the better FS and why? My server is running Plex and doubling as a backup server to PCs in the house.

1) I heard that you can speed up mdadm operations by using an external bitmap (only if your raid is ext2/3). Still true today? If not, is it REALLY worth using an external bitmap?

2) Block size, chunk size, stripe_cache_size, stride, stripe?!?!? Do I have all the following right?:

Block size = sector size of the HDD. (512 bytes for older, smaller
drives and 4k (4096) for newer, bigger drives. (Like my 4TB HGST's). As far as this goes, there is nothing to be changed in mdadm, right?

Chunk size = A setting that should be set when the array is created. Can range in size from 4K, 8K, 16K, 32K, 64K, 128K, 256K, etc. BUT, knowing the average file size you're going to be dealing with will help determine the chunk size. Since this will be for a Plex server, I'll have LOADS of files that are over 1 gig but also, metadata type files that are anywhere from 10K to a few megabytes (cover art) per movie/TV show. There a good rule of thumb on selecting the right chunk size? I think I read that mdadm can now adjust this after the array is created but it should ideally be right the 'first time around'. If any of you run a Plex server and use mdadm, what chunk size did you go with?

Stripe_cache_size = the amount of RAM to set aside to store data before it's written to disk. I think I read that 8K is a really good value that works well for all general purposes. Correct? I know this value can be easily adjusted later and 'on-the-fly' to see the results. Go with 8K and adjust later to suit my needs?

Stride, stripe width = Totally clueless here. But, maybe this is automagically handled for me? Reading here: (down in the XFS section) https://raid.wiki.kernel.org/index.p...vanced_Options

XFS

xfsprogs and the mkfs.xfs utility automatically select the best stripe size and stripe width for underlying devices that support it, such as Linux software RAID devices. Earlier versions of xfs used a built-in libdisk and the GET_ARRAY_INFO ioctl to gather the information; newer versions make use of enhanced geometry detection in libblkid. When using libblkid, accurate geometry may also be obtained from hardware RAID devices which properly export this information.

To create XFS filesystems optimized for RAID arrays manually, you'll need two parameters:

chunk size: same as used with mdadm
number of "data" disks: number of disks that store data, not disks used for parity or spares. For example:
RAID 0 with 2 disks: 2 data disks (n)
RAID 1 with 2 disks: 1 data disk (n/2)
RAID 10 with 10 disks: 5 data disks (n/2)
RAID 5 with 6 disks (no spares): 5 data disks (n-1)
RAID 6 with 6 disks (no spares): 4 data disks (n-2)

So if I go with the XFS file system and call 'mkfs.xfs' when formatting my RAID array, it will take care of setting the stride and stripe width with no need for me to do anything, right? (And if stride does indeed equal chunk size, I can change that later as I mentioned above.)

Whew, all done! Thanks for reading and looking forward to your responses!
 
Old 11-27-2017, 05:33 PM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010
I would use XFS. It's very mature, very scalable, and reasonably intelligent. It works well with small block size. It's easy to recover.

But you yourself should understand what the various options mean. I believe the kernel wiki is correct. Determine which raid you will use, and figure out how many data disks you will have.
 
Old 11-27-2017, 10:51 PM   #3
road hazard
Member
 
Registered: Nov 2015
Posts: 199

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by AwesomeMachine View Post
I would use XFS. It's very mature, very scalable, and reasonably intelligent. It works well with small block size. It's easy to recover.

But you yourself should understand what the various options mean. I believe the kernel wiki is correct. Determine which raid you will use, and figure out how many data disks you will have.
The more I read about XFS (especially in conjunction with MDADM), yeah, I think that will be my file system of choice.

I'll be using RAID 6 (no doubt there) over 12, 4TB drives. Know of a good way I could look at ALL the files on my Plex server and get an idea of the average file size?
 
  


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
mdadm help for a linux newbie. buzza_2004 Linux - Newbie 1 05-13-2010 09:08 AM
Logs Explained - Newbie 4j9er Linux - Security 3 08-12-2004 10:49 AM

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

All times are GMT -5. The time now is 01:37 AM.

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