linuxフォーマット大型ハードディスク


                       。       GPT     ,            MBR     。
MBR     :     2 TB    。
GPT     :     18 EB。

   Linux        ,     GPT     ,       ,              。
  Linux       XFS    EXT4          。
       
  Linux       parted         。
1,   fdisk -l           ,          ,fdisk            ,      parted。
# fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 17679.7 GB, 17679696003072 bytes
256 heads, 63 sectors/track, 2141037 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      266306  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.
2,   parted   /dev/sdb     。       ,    GPT       。 parted /dev/vdb
# parted /dev/sdb
GNU Parted 2.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel
New disk label type? Gpt
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No?
Yes/No? yes
(parted) p
Model: DELL PERC H730 Mini (scsi)
Disk /dev/sdb: 17.7TB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start  End  Size  File system  Name  Flags

3,    。
(parted) mkpart
Partition name?  []?
File system type?  [ext2]? ext4
Start? 0G
End? 17679G
(parted) p
Model: DELL PERC H730 Mini (scsi)
Disk /dev/sdb: 17.7TB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
1      1049kB  17.7TB  17.7TB

(parted) quit
Information: You may need to update /etc/fstab.
EXT4        
   Linux             /dev/sdb,            。         ,               。
   16TB      ,   ext4           e2fsprogs       。   e2fsprogs     ,   :e2fsprogs 1.41.11,         :
mkfs.ext4: Size of device /dev/md0 too big to be expressed in 32 bits using a blocksize of 4096.

  :
wget https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.42.8/e2fsprogs-1.42.8.tar.gz
tar xvzf e2fsprogs-1.42.8.tar.gz
cd e2fsprogs-1.42.8
./configure
make
make install

/sbin/mke2fs -O 64bit,has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize /dev/sdb1