Linux Block Device Notes

lsblk to list partitions (or list block devices) lsblk -f or blkid to list the UUIDs

There would seem to be a number of partition tools for Linux CLI.
  • sudo parted -l - to see all available partition information
  • sudo parted /dev/sda - to partition the specific drive

When in parted:

  • print to see current partition information
  • mkpart help to list option
  • mklabel gpt to give drive label gpt
  • mkpart help mkpart to list specific help items on mkpart
  • mkpart primary ext4 0% 100% to make a partition that take the full optimised drive area
  • rm 1 to remove partition 1

sudo mkfs.ext4 /dev/sda1 - to format the drive

sudo vim /etc/fstab -to edit the boot disk mount table, remember to make matching mount point directories

Local Device

mount -t ext4 /dev/sdb1 /run/media/diska

NFS Device

To mount a NFS manually:

  • sudo mount -t nfs -o rw,vers=4 /mnt/backup1
  • sudo mount -t nfs -o rw,vers=4 /mnt/backup2


  • -t nfs : type nfs
  • -o : options, options are separated by commas with no spaces
    • rw : read / write
    • vers=4 : version 4 of nfs
  • is the remote exported NFS mount point
  • /mnt/backup1 : is the local mount point, note this directory must exist, ideally empty, any existing contents are usually invisible and otherwise ignored

sudo umount /run/media/diska

sudo vim /etc/fstab

  • /app/www/public/data/pages/home_server/home_server_setup/other_services/disk.txt
  • Last modified: 2023-12-26 Tue wk52 11:36
  • by baumkp