Skip to content

Instantly share code, notes, and snippets.

@robbydooo
Created July 29, 2015 14:42
Show Gist options
  • Save robbydooo/6ccca1cda11894e65f2f to your computer and use it in GitHub Desktop.
Save robbydooo/6ccca1cda11894e65f2f to your computer and use it in GitHub Desktop.
Packet.net Mounting NVME Drives
#!/bin/sh
# Based on documentation from Packet.net
# https://www.packet.net/help/kb/hardware/how-do-i-configure-an-nvme-flash-drive/
#NVME01N1 Setup
parted -a optimal /dev/nvme0n1 mklabel gpt
parted -a optimal /dev/nvme0n1 mkpart primary ext4 0% 100%
mkfs.ext4 /dev/nvme0n1
#change mount point as required
mkdir /mnt/docker-nvme
mount /dev/nvme0n1 /mnt/docker-nvme -t ext4
#NVME11N1 Setup
parted -a optimal /dev/nvme1n1 mklabel gpt
parted -a optimal /dev/nvme1n1 mkpart primary ext4 0% 100%
parted /dev/nvme1n1
mkfs.ext4 /dev/nvme1n1
#change mount point as required
mkdir /mnt/docker-nvme1
mount /dev/nvme1n1 /mnt/docker-nvme1 -t ext4
#Check drives are mounted
mount | grep nvme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment