Skip to content

Instantly share code, notes, and snippets.

@nanusdad
Last active May 18, 2023 03:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nanusdad/b053686e0ed01fab676d1b4e285b8f7e to your computer and use it in GitHub Desktop.
Save nanusdad/b053686e0ed01fab676d1b4e285b8f7e to your computer and use it in GitHub Desktop.
Adding additional disk in Ubuntu 20.04

Adding additional disk in Ubuntu 20.04

Check if disk is physically / virtually added to the system

lshw -C disk

Look for the logical name

e.g.

  *-disk:1
       description: SCSI Disk
       ...
       logical name: /dev/sdb
       ...
       size: 128GiB (137GB)
       capacity: 510GiB (547GB)
      ...

Use fdisk to create new partition

fdisk /dev/sdb

Use mkfs to create new file system

sudo mkfs -t ext4 /dev/sdb1

Create new directory and mount filesystem

sudo mkdir /tmp-mount
mount /dev/sdb1 /tmp-mount
OR
# edit /etc/fstab and execute 
mount -a

More details...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment