Creating a partition using parted 1.
(parted) mkpart logical 0.0 692.1 Now, we will show how to partition a low-end flash device (“low-end”, as … 100% end size will allow users to create a new partition with remaining all available space in the disk. The below example creates partition with size around 15GB.
Before you start creating partitions, it’s important to make sure that you are using (you have selected) the right disk. The front cover must present the full title with all words of the title equally prominent and visible. mkpart command is used to create either primary or logical partition with the START and END disk locations.
$ sudo parted [Disk Name] [mkpart] [Partition Type] [Filesystem Type] [Partition Start Size] [Partition End Size] $ sudo parted /dev/sdb mkpart primary ext4 20.0GB 100% Information: You may need to update /etc/fstab.
sudo parted /dev/sda mkpart primary ext4 0% 100% Doing this will leave some free space at the start and end of the disk, but it will make sure the partition is properly aligned for best performance. fdisk doesn’t work on disks larger than 2TB so I used parted: parted -a optimal /dev/sda (parted) mklabel Warning: The existing disk label on /dev/sda will be destroyed and all data on this disk will be lost. Include only the device as an argument to invoke interactive mode. 2.4.5 mkpart Command: mkpart [part-type name fs-type] start end. Create Primary Partition in Selected HDD Using mkpart. I wanted to create a full-disk partition, with optimal alignment, on a 4TB disk under CentOS 6.4 and use it as an LVM PV. The START and END points passed to the mkpart command are in the units of MBs. Start by using print: (parted) print Select the hard disk to be partitioned. You may add other material on the covers in addition.
3.
(parted) mkpart primary 106 16179
Select the disk on which the partition is being created, in the below example /dev/sdb is being partitioned. You can give it additional parameters like "primary" or "logical" depending on the partition type that you wish to create. The partition will start at the beginning of the disk, and end 692.1 megabytes into the disk.
Use parted interactively to enter commands one at a time.
To create new partition, parted uses “mkpart“.