本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。
建立檔案系統(RHEL 8、RHEL 9和SLES 15)
貢獻者
個別的 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