1、mkfs命令格式化分区报错信息:
[root@localhost ~]# mkfs -t ext4 /dev/sdb7 mke2fs 1.42.9 (28-Dec-2013) Could not stat /dev/sdb7 --- No such file or directory The device apparently does not exist; did you specify it correctly?
2、解决方法:
第一步:安装parted包
先检查系统中是否安装parted包
[root@localhost ~]# rpm -q parted parted-3.1-29.el7.x86_64
安装parted包命令
yum -y install parted 或 rpm -ivh parted-3.1-29.el7.x86_64.rpm
第二步:执行partprobe命令
[root@localhost ~]# partprobe Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only.
第三步:重新格式化分区
[root@localhost ~]# mkfs -t ext4 /dev/sdb7 mke2fs 1.42.9 (28-Dec-2013) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 131072 inodes, 524288 blocks 26214 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=536870912 16 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912 Allocating group tables: done Writing inode tables: done Creating journal (16384 blocks): done Writing superblocks and filesystem accounting information: done
第四步:用blkid命令查看分区是否格式化成功
[root@localhost ~]# blkid -s TYPE /dev/sda1: TYPE="xfs" /dev/sda2: TYPE="LVM2_member" /dev/sdb5: TYPE="xfs" /dev/sr0: TYPE="iso9660" /dev/mapper/rhel-root: TYPE="xfs" /dev/mapper/rhel-swap: TYPE="swap" /dev/sdb7: TYPE="ext4" #显示/dev/sdb7分区格式化成功
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。