Linux formatted partition error could not START/DEV/SDA No such file or directory workaround

Source: Internet
Author: User

Linux view areas that are already well-divided
[Email protected] ~]# 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 1028097 Linux
/dev/sda6 129 1028128+, Linux
/DEV/SDA7 257 384 1028128+-up Linux

When the new partition is formatted, an error message is indicated, and there is no such file or directory.

Could not STAT/DEV/SDA7---No such fileor directory
The device apparently does not exist; Didyou Specify it correctly?


[Email protected] ~]# 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 the partprobe command
The Partprobe is included in the RPM package of the parted.
Partprobe can modify the partition table in the kernel, allowing kernel to reread the partitioned table.
Therefore, you can use this command to create partitions and the system to recognize those partitions without restarting the machine.

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

If the hint is not installed, you need to install parted
Install Command: #yum install parted #前提是保证你的虚拟机可以上网 to download the installation package from the network
[Email protected]~]# 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 'll 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 made again and the installation is successful.
[Email protected]~]# Rpm-q parted
parted-2.1-25.el6.i686

Execute the command:
[[Email protected]~]# partprobe
Warning:WARNING:the kernel failed to re-read the partition table ON/DEV/SDA (deviceor resource busy). As a result, it maynot reflect all of the your changes until after reboot.
Warning:WARNING:the kernel failed to re-read the partition table On/dev/sdb (deviceor resource busy). As a result, it maynot reflect all of 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 do the formatting, OK, if you also prompt an error, restart after the execution of the format.
[Email protected]~]# 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 first. Use Tune2fs-c or-i to override.

Linux formatted partition error could not START/DEV/SDA No such file or directory workaround

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.