运行时遇到问题mfks.xfs -f -i
$truncate -s 41943040 /d/backends/disk1
$mkfs.xfs -f -i size=512 /d/backends/disk1
给出错误
meta-data=/d/backends/disk1 isize=512 agcount=2, agsize=5120 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=0
data = bsize=4096 blocks=10240, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=855, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
existing superblock read failed: Invalid argument
mkfs.xfs: pwrite64 failed: Unknown error -22
答案1
您正在向 提供“挂载点”( /d/backends/disk1
) mkfs.xfs
。它需要一个设备(检查man mkfs.xfs), like
/dev/sdq . Also
mkfs.xfs won't work on a mounted disk (
/d/backends/disk1`)。
答案2
我已经构建并安装xfsprogs
解决了我的问题
apt-get install libtool automake gettext libblkid-dev uuid-dev
git clone git://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git
cd fsprogs-dev
make && make install