Date created: Tuesday, March 4, 2014 10:22:14 AM. Last modified: Tuesday, March 4, 2014 11:17:37 AM

RAID - Filesystem

Create ext4 FS on top of md0 RAID

mkfs.ext4 -b 4096 -t ext4 -j -J size=1024 -m 0 -v /dev/md0 
mke2fs 1.42 (29-Nov-2011)
fs_types for mke2fs.conf resolution: 'ext4', 'big'
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=3 blocks
274702336 inodes, 2197600410 blocks
0 blocks (0.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
67066 block groups
32768 blocks per group, 32768 fragments per group
4096 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
	102400000, 214990848, 512000000, 550731776, 644972544, 1934917632

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done  

Check to see that there is a larger than usual journal size of 1GB

sudo dumpe2fs -h /dev/md0 
dumpe2fs 1.42 (29-Nov-2011)
Filesystem volume name:   
Last mounted on:          
Filesystem UUID:          e089c716-06aa-4f0e-b9ba-9b3da3ab9715
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags:         signed_directory_hash 
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              274702336
Block count:              2197600410
Reserved block count:     0
Free blocks:              2180011656
Free inodes:              274702325
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      500
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         4096
Inode blocks per group:   256
RAID stripe width:        3
Flex block group size:    16
Filesystem created:       Tue Mar  4 10:13:48 2014
Last mount time:          n/a
Last write time:          Tue Mar  4 10:13:57 2014
Mount count:              0
Maximum mount count:      -1
Last checked:             Tue Mar  4 10:13:48 2014
Check interval:           0 ()
Lifetime writes:          1044 MB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:	          256
Required extra isize:     28
Desired extra isize:      28
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      36f8ef01-bda8-4532-ad95-61a8af920651
Journal backup:           inode blocks
Journal features:         (none)
Journal size:             1024M
Journal length:           262144
Journal sequence:         0x00000001
Journal start:            0

A quick speed check over the top of ext4

dd if=/dev/zero of=/media/array/test1 bs=1G count=3 oflag=direct
3+0 records in
3+0 records out
3221225472 bytes (3.2 GB) copied, 12.5669 s, 256 MB/s

A look at the FS table

gdisk -l /dev/md127
GPT fdisk (gdisk) version 0.8.1

Partition table scan:
  MBR: not present
  BSD: not present
  APM: not present
  GPT: not present

Creating new GPT entries.
Disk /dev/md127: 17580803280 sectors, 8.2 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 2D5CAE8B-E84D-4493-8F15-3CAF4C2A0989
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 17580803246
Partitions will be aligned on 2048-sector boundaries
Total free space is 17580803213 sectors (8.2 TiB)

Number  Start (sector)    End (sector)  Size       Code  Name

Previous page: RAID - Post creation tests
Next page: References