Linux formatted partition could not START/DEV/SDA No such how file or directory errors are resolved

Source: Internet
Author: User

Linux View already divided areas
[ROOT@LINUXIDC ~]# fdisk-l/DEV/SDA

disk/dev/sda:21.5 GB, 21474836480 bytes
255 heads, Sectors/track, 2610 cylinders
Units = Cylinders of 16065 * 8225280bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512bytes
Disk identifier:0x7d57cb1f

Device Boot Start End Blocks Id System
/DEV/SDA1 1 2610 20964793+ 5 Extended
/DEV/SDA5 1 128 1028097 Linux
/DEV/SDA6 129 256 1028128+ Linux
/DEV/SDA7 257 384 1028128+ Linux

When the new partition is formatted, an error is shown, indicating that the following errors are not in this file or directory.

Could not stat/dev/sda7---No such fileor directory
The device apparently does not exist; Didyou Specify it correctly?


[ROOT@LINUXIDC ~]# mke2fs-t EXT4/DEV/SDA7
MKE2FS 1.41.12 (17-may-2010)
Could not stat/dev/sda7---No such fileor directory

The device apparently does not exist; Didyou Specify it correctly?

Workaround: Execute partprobe command
The Partprobe is included in the parted RPM software package.
Partprobe can modify partitioned tables in kernel to enable kernel to reread partitioned tables.
Therefore, you can create partitions by using this command and the system can recognize these partitions without restarting the machine.

To see if the command has been installed:
[root@linuxidc~]# Rpm-q parted
Packageparted is not installed

Hint is not installed, you need to install parted
installation command: #yum install parted #前提是保证你的虚拟机可以上网, to download the installation package from the network
[root@linuxidc~]# Yum Install parted

Loadedplugins:fastestmirror
1234567 loadingmirror speeds from cached hostfile
* base:mirrors.skyshe.cn
* extras:mirrors.skyshe.cn
* updates:mirrors.skyshe.cn
Base | 3.7 KB 00:00
Extras |3.3 KB 00:00
Updates | 3.4 KB 00:00

Settingup Install Process
Resolvingdependencies
-->running transaction Check
--->package parted.i686 0:2.1-25.el6 would be installed
-->finished Dependency Resolution

Dependenciesresolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
parted i686 2.1-25.el6 base 595 k

Transactionsummary
=============================================================================
Install 1 Package (s)

Totaldownload size:595 K
installedsize:2.1 M
Isthis OK [y/n]: Y
Downloadingpackages:
parted-2.1-25.el6.i686.rpm | 595 KB 00:16
Runningrpm_check_debug
Runningtransaction Test
Transactiontest succeeded
Runningtransaction
installing:parted-2.1-25.el6.i686 1/1
verifying:parted-2.1-25.el6.i686 1/1

Installed:
parted.i686 0:2.1-25.el6

complete!

Once the installation is complete, the query is done again and the installation is successful.
[root@linuxidc~]# Rpm-q parted
parted-2.1-25.el6.i686

Execute the command:
[root@linuxidc~]# Partprobe
Warning:WARNING:the kernel failed to re-read partition table ON/DEV/SDA (Deviceor Resource). As a result, it maynot reflect the your changes until after reboot.
Warning:WARNING:the kernel failed to re-read partition table On/dev/sdb (Deviceor Resource). As a result, it maynot reflect the your changes until after reboot.
Warning:unable to Open/dev/sr0 read-write (read-only file system). /dev/sr0 has been opened read-only.
Warning:unable to Open/dev/sr0 read-write (read-only file system). /dev/sr0 has been opened read-only.
Error:invalid partition table-recursive partition on/dev/sr0.

Then the format, OK, if also prompted an error, restart after the implementation of the format can be.
[root@linuxidc~]# mkfs-t Ext4/dev/sda7
mke2fs1.41.12 (17-may-2010)
Filesystemlabel=
Ostype:linux
blocksize=4096 (log=2)
fragmentsize=4096 (log=2)
Stride=0blocks, stripe width=0 blocks
64384inodes, 257032 blocks
12851blocks (5.00%) reserved for the Super user
Firstdata block=0
Maximumfilesystem blocks=264241152
8block groups
32768blocks per group, 32768 fragments per group
8048inodes per group
Superblockbackups stored on blocks:
32768, 98304, 163840, 229376.

Writinginode Tables:done
Creatingjournal (4096 blocks): Done
Writingsuperblocks and filesystem Accounting Information:done

Thisfilesystem'll be automatically checked every mounts or
180days, whichever comes. Use Tune2fs-c or-i to override.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.