格式化文件系统命令所在目录——command not found

系统打印信息

[root@stor37 home]# mkfs.xfs /dev/sdb
-bash: mkfs.xfs: command not found

解决方案:

运行which mkfs查看mkfs的命令目录

[root@stor37 home]# which mkfs
/sbin/mkfs
[root@stor37 home]# ls -la /sbin/mkfs*
-rwxr-xr-x. 1 root root  10336 Mar 15  2016 /sbin/mkfs
-rwxr-xr-x. 1 root root  26208 Mar 15  2016 /sbin/mkfs.cramfs
-rwxr-xr-x. 5 root root  68960 Jun  5  2015 /sbin/mkfs.ext2
-rwxr-xr-x. 5 root root  68960 Jun  5  2015 /sbin/mkfs.ext3
-rwxr-xr-x. 5 root root  68960 Jun  5  2015 /sbin/mkfs.ext4
-rwxr-xr-x. 5 root root  68960 Jun  5  2015 /sbin/mkfs.ext4dev
lrwxrwxrwx. 1 root root      7 Feb 25 00:37 /sbin/mkfs.msdos -> mkdosfs
lrwxrwxrwx. 1 root root      7 Feb 25 00:37 /sbin/mkfs.vfat -> mkdosfs

发现缺失相应xfs包,需要安装xfsprogs的rpm包

[root@stor37 home]# yum install xfsprogs


你可能感兴趣的:(格式化文件系统命令所在目录——command not found)