storage partitions

Create storage partitions, format them with file systems, and mount them for use.

Task 1:

Create one partition having size 100MB and mount it on data.

Solution:

# display all block devices
fdisk /dev/sdX # X would be a,b and so on.
n
p
1
enter
+100M #second sector
w
partprobe # inform kernel about partition table changes
mkdir -p /data
mkfs.ext4 /dev/sdX #format partition with ext4 partition
mount /dev/sdX /data

Last updated

Was this helpful?