Skip to content

Instantly share code, notes, and snippets.

@yowcow
Last active July 1, 2018 07:39
Show Gist options
  • Save yowcow/c8ef1c2b2ab81b2fc77a903eed7bc0e6 to your computer and use it in GitHub Desktop.
Save yowcow/c8ef1c2b2ab81b2fc77a903eed7bc0e6 to your computer and use it in GitHub Desktop.
Steps to add a fresh disk to running Linux
# List devices
fdisk -l
lsblk
fdisk /dev/mynewdevice
# Check device info
blkid /dev/mynewdevice
# Format the new device
mkfs.ext4 /dev/mynewdevice
# Add the new volume to /etc/fstab
/dev/mynewdevice /path/to/mount ext4 defaults 0 1
# Mount the volume
mount /dev/mynewdevice /path/to/mount
# Check mounted
df -Th
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment