Skip to content

Instantly share code, notes, and snippets.

@Rugal
Created January 24, 2018 21:31
Show Gist options
  • Save Rugal/b4feaf65d42c9b5f9bf3995e757bead4 to your computer and use it in GitHub Desktop.
Save Rugal/b4feaf65d42c9b5f9bf3995e757bead4 to your computer and use it in GitHub Desktop.

Create new partition

sudo fdisk /dev/sda
n
p
3
w

Mark partition standard

sudo parted /dev/sda mklabel gpt

Format file system

sudo mkfs.ext4 -L datapartition /dev/sda3

Create mount point

sudo mkdir -p /data

Mount volume temporarily

sudo mount -o defaults /dev/sda3 /data

Write fs table

sudo vim /etc/fstab
LABEL=datapartition /data ext4 defaults 0 2

Mount volume automatically

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