Parted
3TB Example
Linux Create 3TB partition size To create a partition start GNU parted as follows:
Output:
GNU Parted 2.3
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)
Creates a new GPT disklabel i.e. partition table:
Sample outputs:
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
(parted)
Next, set the default unit to TB, enter:
To create a 3TB partition size, enter:
To print the current partitions, enter:
Sample outputs:
Model: ATA ST33000651AS (scsi)
Disk /dev/sdb: 3.00TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 0.00TB 3.00TB 3.00TB ext4 primary
Quit and save the changes, enter:
Sample outputs:
Use the mkfs.ext4 command to format the file system, enter:
LVM Setting
Syntax:
Example:
Check alignment
On an already partitioned disk, you can use parted to verify the alignment of a partition on a device. For instance, to verify alignment of partition 1 on /dev/sda: