为 domU 添加新存储

为 domU 增加一个数据区,100G:
# dd if=/dev/zero of=data.img bs=1M seek=100000 count=1

修改对应的 cfg 文件:

disk=[….

    "tap:aio:data.img,xvdb1,w"]

写入 fstab。

启动,格式化,fsck.ext4 时出现如下错误

fsck 1.41.4 (27-Jan-2009)
e2fsck 1.41.4 (27-Jan-2009)
fsck.ext4: Group descriptors look bad… trying backup blocks…
fsck.ext4: Bad magic number in super-block while trying to open /dev/xvdb1

The superblock could not be read or does not describe a correct ext4
filesystem.  If the device is valid and it really contains an ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:

解决方法:
# mke4fs -j -O dir_index data.img