Mount Storage Volumes in Linux

  1. You will need super user or sudo privileges for these tasks.
  2. Either become root using su or sudo or prefix sudo for each commands below
  3. Use “fdisk” to list new volumes that has been made visible to the server
  4. If you have “parted” installed, you can use this to look up the partitions or partition a drive.
  5. Using the “mkfs” command, create a file system such as “mkfs.ext4 -L “provide a label” /dev/sdNn”
    • where N is the drive letter such as “b”, “c”, etc so you disk would be /dev/sdb or /dev/sdc etc.
    • if you have partitioned, you may have a partition number such as 1, 2 to yield /dev/sdb1, /dev/sdc2 etc.
  6. Test mount this onto /mnt by using “mount -o defaults /dev/sdNn /mnt”/
  7. You can umount with the “umount /mnt” construct
  8. To always mount this partition onto the server, add to your /etc/fstab file the following —
  9. LABEL=<label you picked in step 5> <permanent file system path> ext4 defaults 0 2
Posted in .