Initializing a brand new disk with “parted”
“parted” is a replacement for “fdisk” of Linux. It can handle disks larger than 2 TB. Issue this command to launch “parted” where /dev/sdL is the disk you want to initialize.
Create a partition table if it does not exists. For disks larger than 2 TB, you should use the gpt type. You can create such a partition table by issuing this command within “parted”. msdos is the legacy partition table type.
To create a new partition, mkpart is used to do so. This parted command creates a primary ext4 partition, starting at the first cylinder to the last sector of the disk. You should align your partitions. You can use the parted command align-check to do so.
mkpart primary ext4 1 -1
Quit parted and create your partition using mkfs. For example,
mkfs -t ext4 -m 0 -O dir_index,filetype,sparse_super /dev/sdLX
You can type help to display the list of commands. You can type help followed by a command to display specific help related to this command.