Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mkfs Command format Partition error report and its solution

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

1. Mkfs command formats partition error message:

[root@localhost] # mkfs-t ext4 / dev/sdb7mke2fs 1.42.9 (28-Dec-2013) Could not stat / dev/sdb7-No such file or directoryThe device apparently does not exist; did you specify it correctly?

2. Solution:

Step 1: install the parded package

First check whether the parded package is installed in the system

[root@localhost] # rpm-Q parted parted-3.1-29.el7.x86_64

Install parted package command

Yum-y install parted or rpm-ivh parted-3.1-29.el7.x86_64.rpm

Step 2: execute the partprobe command

[root@localhost] # partprobe Warning: Unable to open / dev/sr0 read-write (Read-only file system). / dev/sr0 has been opened read-only.

Step 3: reformat the partition

[root@localhost] # mkfs-t ext4 / dev/sdb7mke2fs 1.42.9 (28-Dec-2013) Filesystem label=OS type: LinuxBlock size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks131072 inodes, 524288 blocks26214 blocks (5.00%) reserved for the super userFirst data block=0Maximum filesystem blocks=53687091216 block groups32768 blocks per group, 32768 fragments per group8192 inodes per groupSuperblock backups stored on blocks: 32768,98304,163840,229376 294912Allocating group tables: doneWriting inode tables: done Creating journal (16384 blocks): doneWriting superblocks and filesystem accounting information: done

Step 4: use the blkid command to see if the partition is formatted successfully

[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" # shows / dev/sdb7 partition formatted successfully

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report