简体中文版经机器翻译而成,仅供参考。如与英语版出现任何冲突,应以英语版为准。
创建文件系统(RHEL 8、RHEL 9和SLES 15)
贡献者
![](https://docs.netapp.com/common/images/pdf-zip.png)
单独 PDF 文档的收集
Creating your file...
This may take a few minutes. Thanks for your patience.
Your file is ready
对于RHEL 8、RHEL 9和SLES 15、您可以在原生 NVMe设备上创建文件系统并挂载文件系统。
步骤
-
运行
multipath -ll
命令以获取NVMe设备列表。# multipath -ll
此命令的结果可用于查找关联的设备
/dev/disk/by-id/nvme-eui.[uuid#]
位置。以下示例为/dev/disc/by-id/nvme-eui.000082dd5c05d39300a0980000a52225
。eui.000082dd5c05d39300a0980000a52225 [nvme]:nvme0n6 NVMe,NetApp E-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
-
使用位置在分区上为所需NVMe设备创建文件系统
/dev/disk/by-id/nvme-eui.[id#]
。创建文件系统的方法因所选的文件系统而异。此示例显示了如何创建
ext4
文件系统。# 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
-
创建一个文件夹以挂载新设备。
# mkdir /mnt/ext4
-
挂载设备。
# mount /dev/disk/by-id/nvme-eui.000082dd5c05d39300a0980000a52225 /mnt/ext4