我正在使用在 VMware Workstation 上作为虚拟机安装的 Ubuntu LTS 12.04 服务器。
最近,我扩展了逻辑磁盘。
我使用 sudo fdisk /dev/sdb 命令并创建了一个名为 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 太小,最小 100 个块
我不明白发生了什么事,如能提供任何帮助我将不胜感激。
答案1
请更改分区 ID...您不应该创建“扩展”分区,而是将其保留为默认的 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