mkfs无法创build新的xfs分区

我正在使用Ubuntu LTS 12.04服务器作为VMware Workstation上的虚拟机。

最近,我扩展了逻辑磁盘。

我使用sudo fdisk / dev / sdb命令,并创build了一个名为sdb1的扩展磁盘。 当我运行fdisk -l命令时,它显示了我:

控制器@控制器:〜$ sudo fdisk -l

Disk /dev/sda: 107.4 GB, 107374182400 bytes 255 heads, 63 sectors/track, 13054 cylinders, total 209715200 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 Disk identifier: 0x000b2a4e Device Boot Start End Blocks Id System /dev/sda1 * 2048 39845887 19921920 83 Linux /dev/sda2 39847934 41940991 1046529 5 Extended /dev/sda3 39845888 39847933 1023 8e Linux LVM /dev/sda5 39847936 41940991 1046528 82 Linux swap / Solaris Partition table entries are not in disk order Disk /dev/sdb: 21.5 GB, 21474836480 bytes 213 heads, 34 sectors/track, 5791 cylinders, total 41943040 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 Disk identifier: 0x58fc26e8 Device Boot Start End Blocks Id System /dev/sdb1 2048 41943039 20970496 5 Extended 

现在当我运行

sudo mkfs.xfs -f -i size = 1024 / dev / sdb1

它显示了我:

数据子卷的大小0太小,最less100块

我不明白开什么帮助会受到干扰。

请更改分区ID …您不应该创build“扩展”分区,而是将其留在默认的Linux(83)ID中。

你的新设备/分区应该看起来类似于这个:

 Disk /dev/sdb: 480.0 GB, 480047620096 bytes 119 heads, 44 sectors/track, 179066 cylinders Units = cylinders of 5236 * 512 = 2680832 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xf916544f Device Boot Start End Blocks Id System /dev/sdb1 1 179067 468795480 83 Linux