FDISK UTILITY

FDISK

 

Whenever user add HDD and wants to use it, he cannot directly use the same before creating partition. To make partition, FDISK utility is used.

 

1. Add HDD


2. Use FDISK UTILITY

               a. fdisk -l

                              To see all HDD

               b. fdisk /dev/sdb

                              ‘sdb’ is a name of device

               c. Press m           [To see the options]

               d. Press n           [To create new partition]

               e. Press p            [To print partition]

               f. Press 1

               g. Press ENTER

               h. Enter Size of Partition.            E.g.  +10G

               i. Press m

               j. Press p

               k. Press m

               l. Press w            [To write table]


3. Format partition with filesystem

               mkfs.ext4 /dev/sdb1


4. Mount The partition

               a. Temporary Mount:

                              mkdir -p /mnt/storage

                              mount  /dev/sdb1         /mnt/storage


               b. Permanent Mount:

                              i. vim /etc/fstab

                              /dev/sdb1         /mnt/storage                  auto      defaults               0             0

                                            

                              ii. mount -a


5. Test the mount

               df -h

Comments