Linux

即使在 partprobe 之後,新創建的分區也失去,顯示沒有這樣的設備或地址

  • January 23, 2017

在 Ubuntu 14.04 上,我正在嘗試創建新分區,但無法創建文件系統

fdisk -l/開發/sde

WARNING: GPT (GUID Partition Table) detected on '/dev/sde'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sde: 299.0 GB, 298999349248 bytes
256 heads, 63 sectors/track, 36209 cylinders, total 583983104 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1   583983103   291991551+  ee  GPT
Partition 1 does not start on physical sector boundary.

partprobe /dev/sde1
Error: Error opening /dev/sde1: No such device or address

mkfs.xfs /dev/sde1
mkfs.xfs: cannot open /dev/sde1: No such device or address

設備存在,雖然設備節點看起來很奇怪

ls -la /dev/sde*
brw-rw---- 1 root disk 8, 64 Jan 18 16:43 /dev/sde
cr-------- 1 root root 8, 65 Jan 17 09:20 /dev/sde1
cr-------- 1 root root 8, 66 Jan 17 09:20 /dev/sde2

如果/dev/sde對應於可移動設備,請拔下它並刪除所有剩餘的設備節點 ( rm /dev/sde*)。然後重新連接它並允許系統正確創建設備節點。

另一方面,如果/dev/sde是內部設備,請移除設備節點並重新啟動系統。這應該允許系統正確地重新創建設備節點。

有一個警告顯示fdisk

WARNING: GPT (GUID Partition Table) detected on '/dev/sde'! The util fdisk doesn't support GPT. Use GNU Parted.

您必須使用gdiskparted與 GPT 磁碟一起使用。

引用自:https://unix.stackexchange.com/questions/338376