You can create a file system on the namespace or native NVMe device and mount the filesystem.
Create filesystems (SLES 12)
For SLES 12, you create a file system on the desired dm device and mount the filesystem.
Steps
-
Run the
multipath -ll
command to get a list of/dev/mapper/dm
devices.# multipath -ll
The result of this command shows two devices,
dm-19
anddm-16
:eui.00001ffe5a94ff8500a0980000af4444 dm-19 NVME, Lenovo DE_Series size=10G features='1 queue_if_no_path' hwhandler='0' wp=rw |-+- policy='service-time 0' prio=50 status=active | |- #:#:#:# nvme0n19 259:19 active ready running | `- #:#:#:# nvme1n19 259:115 active ready running `-+- policy='service-time 0' prio=10 status=enabled |- #:#:#:# nvme2n19 259:51 active ready running `- #:#:#:# nvme3n19 259:83 active ready running eui.00001fd25a94fef000a0980000af4444 dm-16 NVME, Lenovo DE_Series size=16G features='1 queue_if_no_path' hwhandler='0' wp=rw |-+- policy='service-time 0' prio=50 status=active | |- #:#:#:# nvme0n16 259:16 active ready running | `- #:#:#:# nvme1n16 259:112 active ready running `-+- policy='service-time 0' prio=10 status=enabled |- #:#:#:# nvme2n16 259:48 active ready running `- #:#:#:# nvme3n16 259:80 active ready running
-
Create a file system on the partition for each
/dev/mapper/eui-
device.The method for creating a file system varies depending on the file system chosen. This example shows creating an
ext4
file system.# mkfs.ext4 /dev/mapper/dm-19 mke2fs 1.42.11 (09-Jul-2014) Creating filesystem with 2620928 4k blocks and 655360 inodes Filesystem UUID: 97f987e9-47b8-47f7-b434-bf3ebbe826d0 Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632 Allocating group tables: done Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done
-
Create a folder to mount the new device.
# mkdir /mnt/ext4
-
Mount the device.
# mount /dev/mapper/eui.00001ffe5a94ff8500a0980000af4444 /mnt/ext4
Create filesystems (RHEL 8 and SLES 15)
For RHEL 8 and SLES 15, you create a filesystem on the native nvme device and mount the filesystem.
-
Run the multipath -ll command to get a list of /dev/nvme devices.
# multipath -ll
The result of this command shows device nvme0n6.
eui.000082dd5c05d39300a0980000a52225 [nvme]:nvme0n6 NVMe,Lenovo DE_Series, 08520000 size=4194304 features='n/a' hwhandler='ANA' wp=rw |-+- policy='n/a' prio=50 status=optimized | `- 0:0:1 nvme0c0n1 0:0 n/a optimized live |-+- policy='n/a' prio=50 status=optimized | `- 0:1:1 nvme0c1n1 0:0 n/a optimized live |-+- policy='n/a' prio=10 status=non-optimized | `- 0:2:1 nvme0c2n1 0:0 n/a non-optimized live `-+- policy='n/a' prio=10 status=non-optimized `- 0:3:1 nvme0c3n1 0:0 n/a non-optimized live
-
Create a file system on the partition for each /dev/nvme0n# device.
The method for creating a file system varies depending on the file system chosen. This example shows creating an ext4 file system.
# mkfs.ext4 /dev/disk/by-id/nvme-eui.000082dd5c05d39300a0980000a52225 mke2fs 1.42.11 (22-Oct-2019) Creating filesystem with 2620928 4k blocks and 655360 inodes Filesystem UUID: 97f987e9-47b8-47f7-b434-bf3ebbe826d0 Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632 Allocating group tables: done Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done
-
Create a folder to mount the new device.
# mkdir /mnt/ext4
-
Mount the device.
# mount /dev/disk/by-id/nvme-eui.000082dd5c05d39300a0980000a52225 /mnt/ext4