5
mkfs 报invalid block count错误
source link: https://blog.yuantops.com/tech/mkfs-t-not-supported/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
mkfs 报invalid block count错误
在rh 5u7 上用mkfs 创建文件系统,命令
$ mkfs -q -t ext3 -L disk0 /dev/sdb1
居然报错:
……invalid blocks count……
仔细阅读man mkfs
使用文档,是这样写的,没发现哪里用得不对。
mkfs [-V] [-t fstype] [fs-options] filesys [blocks]
Google,发现是mkfs 解析参数发生了错误。
原因很简单,mkfs
其实是mkfs.type
的快捷方式。5u 的mkfs 版本过低,不支持-t
参数,所以阴差阳错把最后的参数/dev/sdb1
当作了[blocks]
。
- 安装
e4fsprogs
,这是操作ext4 的工具包。官方文档在此。 改用
mkfs.ext4
:$ mkfs.ext4 -q -t ext3 -L disk0 /dev/sdb1
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK