How to start using NVMe disks in a dedicated server dsLinux version on CREODIAS

../_images/button_orange_cf24.png

Servers with NVMe disks have to be mounted in virtual machine manually.

These disks are not visible in OpenStack dashboard because they are integral parts of server, not OpenStack volumes system.

If the volume had not been used before (it has been freshly created) it needs to be formatted.

Please login to the server How to create a Linux VM and access it from Linux command line on CREODIAS.

How do I access my newly created Linux VM?

ssh eouser@<ip address>
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 128G 0 disk
└─sda1 8:1 0 128G 0 part /
nvme1n1 259:0 0 894.3G 0 disk
nvme0n1 259:1 0 894.3G 0 disk
$ sudo mkfs.ext4 /dev/nvme0n1
mke2fs 1.45.5 (07-Jan-2020) Discarding device blocks: done
Creating filesystem with 234423126 4k blocks and 58613760 inodes
Filesystem UUID: d0df51cf-2444-412a-85d0-017659924908
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 102400000, 214990848

Allocating group tables: done Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done

Now mount the volume in the system. Edit /etc/fstab with sudo and using your favorite editor (nano, vim) add the line:

/dev/nvme0n1 /my_volume ext4 defaults 0 1

Now create a mounting point (eg. /my_volume), then mount it.

$ sudo mkdir /my_volume
$ sudo mount /my_volume
$ df -h
Filesystem      Size  Used  Avail  Use%  Mounted on
udev            56G   0     56G    0%    /dev
tmpfs           12G   748K  12G    1%    /run
/dev/sda1       120G  2.0G  113G   2%    /
tmpfs           56G   0     56G    0%    /dev/shm
tmpfs           5.0M  0     5.0M   0%    /run/lock
tmpfs           56G   0     56G    0%    /sys/fs/cgroup
tmpfs           12G   0     12G    0%    /run/user/1000
/dev/nvme0n1    880G  77M   835G   1%    /my_volume

You can repeat the above commands for the second disk: nvme1n1

On the next reboot, the disk will be mounted automatically.