LinuxQuestions.org
Visit Jeremy's Blog.
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 04-28-2014, 07:00 AM   #1
jjstinger72
LQ Newbie
 
Registered: Apr 2014
Posts: 4

Rep: Reputation: Disabled
Format RAID 10 Partition


My google-fu must be off this morning, but i'm having a rough time wrapping my head around formatting this RAID 10 partition ext4. Specifically the math for figuring stride. Also, fdisk gumbled about my logical sectors being smaller than the physical. This is a (4) 500 GB Array... block size on one of the devices is 4096...


fdisk -l /dev/md0

Code:
Disk /dev/md0: 999.9 GB, 999944093696 bytes
2 heads, 4 sectors/track, 244126976 cylinders, total 1953015808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes
Disk identifier: 0x4a20bb7b

    Device Boot      Start         End      Blocks   Id  System
/dev/md0p1            2048  1953015807   976506880   83  Linux
i think i'm on the right track, but anyone point me in the right direction?
 
Old 04-28-2014, 09:53 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,686

Rep: Reputation: 725Reputation: 725Reputation: 725Reputation: 725Reputation: 725Reputation: 725Reputation: 725
To get the chunk size do: mdadm --detail /dev/md0p1

The mkfs.ext4 stride parameter will be: N * chunk / b

where N=2 for 4 raid10 disks, and b is the filesystem block size.
 
1 members found this post helpful.
Old 04-28-2014, 09:09 PM   #3
jjstinger72
LQ Newbie
 
Registered: Apr 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
So if i understand correctly



Code:
# mdadm --detail /dev/md0p1
/dev/md0p1:
        Version : 1.2
  Creation Time : Mon Apr 28 00:27:57 2014
     Raid Level : raid10
     Array Size : 976506880 (931.27 GiB 999.94 GB)
  Used Dev Size : 488253952 (465.64 GiB 499.97 GB)
   Raid Devices : 4
  Total Devices : 4
    Persistence : Superblock is persistent

    Update Time : Mon Apr 28 02:25:30 2014
          State : active
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0

         Layout : near=2
     Chunk Size : 512K

           Name : VOAFS001:0  (local to host VOAFS001)
           UUID : 78b92969:2c0eff0a:a45d3b70:62538fb5
         Events : 18

    Number   Major   Minor   RaidDevice State
       0       8       17        0      active sync   /dev/sdb1
       1       8       33        1      active sync   /dev/sdc1
       2       8       49        2      active sync   /dev/sdd1
       3       8       65        3      active sync   /dev/sde1
i take my 512k, turn it into bytes, and wind up with
N * chunk / b

2 * (512 *1024) / 4098 = ... 256
and then the stripe width is twice that (2 data disks, and not 2 parity disks)

and a format command that looks something like...

Code:
# mkfs.ext4 -v -m .1 -b 4096 -E stride=256,stripe-width=512 /dev/md0p1
thanks!! now to do some testing, before i turn my monstrosity loose on the world!!! or at least the office

Last edited by jjstinger72; 04-28-2014 at 09:16 PM. Reason: clicked submit too soon...
 
  


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
[SOLVED] SAN volume : Partition & format or direct format rrmavani Linux - Server 1 03-07-2013 02:04 AM
partition and format a advanced format drive marcelvl Linux - Newbie 2 01-09-2013 10:06 PM
[SOLVED] How to format a RAID-5 using 3 disks? Merlin53 Linux - Server 5 08-17-2011 08:32 AM
How to format master LUKS partition w/o damaging other partition kaulalla Linux - Newbie 2 05-19-2010 09:11 AM
Converting an ordinary partition to RAID 1 or RAID 5? krishvij Linux - Newbie 1 03-20-2005 09:39 PM


All times are GMT -5. The time now is 04:49 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration