09-13-2020, 11:16 PM
(This post was last modified: 09-13-2020, 11:27 PM by Phillip Bell.)
Just an FYI for folks that have installed a new NVME drive, but don't know what to do with it.
It needs to be partitioned, formatted and mounted for you to use it. If you're not used to installing drives on computers, this may not be obvious.
Here is a decent tutorial of how to do that: https://www.digitalocean.com/community/t...s-in-linux
And here are the commands I used (these are mine only, and may be different for you):
1. Make sure it's recognized by the computer:
#> lsblk
(my output): nvme0n1 259:0 0 931.5G 0 disk
2. Select your partitioning standard (extremely likely you should use GPT):
#> sudo parted /dev/nvme0n1 mklabel gpt
3. Create the partition (ext4 is the most likely format, and you may want to just use a single partition). Note that the partition has a slightly different name (nvme0n1p1) than the mount point (nvme0n1):
#> sudo parted -a opt /dev/nvme0n1p1 mkpart primary ext4 0% 100%
4. Create a filesystem:
#> sudo mkfs.ext4 -L datapartition /dev/nvme0n1p1
5. Mount the filesystem:
#> sudo mkdir -p /mnt/data
#> sudo mount -o defaults /dev/nvme0n1p1 /mnt/data
6. Add mount to fstab, so that it happens on boot:
#> sudo nano /etc/fstab
It needs to be partitioned, formatted and mounted for you to use it. If you're not used to installing drives on computers, this may not be obvious.
Here is a decent tutorial of how to do that: https://www.digitalocean.com/community/t...s-in-linux
And here are the commands I used (these are mine only, and may be different for you):
1. Make sure it's recognized by the computer:
#> lsblk
(my output): nvme0n1 259:0 0 931.5G 0 disk
2. Select your partitioning standard (extremely likely you should use GPT):
#> sudo parted /dev/nvme0n1 mklabel gpt
3. Create the partition (ext4 is the most likely format, and you may want to just use a single partition). Note that the partition has a slightly different name (nvme0n1p1) than the mount point (nvme0n1):
#> sudo parted -a opt /dev/nvme0n1p1 mkpart primary ext4 0% 100%
4. Create a filesystem:
#> sudo mkfs.ext4 -L datapartition /dev/nvme0n1p1
5. Mount the filesystem:
#> sudo mkdir -p /mnt/data
#> sudo mount -o defaults /dev/nvme0n1p1 /mnt/data
6. Add mount to fstab, so that it happens on boot:
#> sudo nano /etc/fstab
Code:
LABEL=datapartition /mnt/data ext4 defaults 0 2