我有一台服务器,配有 2x450gb nvme 磁盘的软 RAID。由于我的所有数据都已备份,因此我不需要 RAID,而是想使用完整空间。
从托管(OVH)控制面板中我选择仅格式化一个磁盘,得到的结果是:
~# fdisk -l
Disk /dev/nvme0n1: 419.2 GiB, 450098159616 bytes, 879097968 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 2791B286-8A53-4943-A74D-A3E86200E692
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 1048575 1046528 511M EFI System
/dev/nvme0n1p2 1048576 2095103 1046528 511M Linux filesystem
/dev/nvme0n1p3 2095104 878039039 875943936 417.7G Linux filesystem
/dev/nvme0n1p4 878039040 879085567 1046528 511M Linux swap
Disk /dev/nvme1n1: 419.2 GiB, 450098159616 bytes, 879097968 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 2ADB5903-8173-44BA-907C-945EFA2DD7ED
Device Start End Sectors Size Type
/dev/nvme1n1p1 2048 1048575 1046528 511M EFI System
因此我在 nvme1 上创建了一个分区并对其进行了格式化:
root@web08:~# fdisk /dev/nvme1n1
Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): F
Unpartitioned space /dev/nvme1n1: 418.7 GiB, 449561271808 bytes, 878049359 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Start End Sectors Size
1048576 879097934 878049359 418.7G
Command (m for help): n
Partition number (2-128, default 2):
First sector (1048576-879097934, default 1048576):
Last sector, +sectors or +size{K,M,G,T,P} (1048576-879097934, default 879097934):
Created a new partition 2 of type 'Linux filesystem' and of size 418.7 GiB.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
root@web08:~# mkfs -t ext4 /dev/nvme1n1p2
mke2fs 1.44.1 (24-Mar-2018)
Discarding device blocks: done
Creating filesystem with 109756169 4k blocks and 27443200 inodes
Filesystem UUID: 57d73a12-ad8b-4bf3-8daf-ca0081b0b17e
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000
Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done
现在,如果我重新启动服务器,它就无法再启动,甚至没有将新分区放入 fstab(如果我将它放入 fstab 并启动它,mount -av
它会毫无问题地挂载该分区)
这会是什么呢?