The df tool and df -h command

df -h Using ‘ -h ‘ parameter with (df -h) will show the file system disk space statistics in “human readable” format, means it gives the details in bytes.

Create an ext3 file system on the new volume

script
1
mkfs [options] [-t type fs-options] device [size]

-t or -type specify the type of file system to be built. If not specified, the default file system type (currently ext2) is used. Here we specify ext3.

script
1
sudo mkfs -t ext3 /dev/sdf

Create an ext3 file system on the new volume, /dev/sdf

Create directory for mounting the volume

Create a directory for mounting the new storage volume:

script
1
sudo mkdir /mnt/data-store

Mount the new volume

script
1
sudo mount /dev/sdf /mnt/data-store

Configure the Linux instance to mount this volume whenever the instance is started

script
1
echo "/dev/sdf   /mnt/data-store ext3 defaults,noatime 1 2" | sudo tee -a /etc/fstab

tee

tee is a command in command-line interpreters (shells) using standard streams which reads standard input and writes it to both standard output and one or more files, effectively duplicating its input.

-a Appends the output to each file, rather than overwriting it.

fstab

The fstab (or file systems table) file is a system configuration file commonly found at /etc/fstab on Unix and Unix-like computer systems.