Davoud Teimouri

Virtualization & Datacenter

Reload Partition Table Without Reboot In Linux

Linux shell is most popular than GUI in Linux systems and most of Linux administrators doing their tasks and system configurations via shell. But shell is most difficult than GUI. They do many thing via shell for example adding new disks or partitions for applications and services.

Sometimes administrators and users faced with the below messages after create new partitions:

WARNING: Re-reading the partition table failed with error 16: Device or resource busy

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8)

Syncing disks.

Or after run “mkfs.extX” command to create file-system on the partition:

Could not stat /dev/sdXX — No such file or directory

The device apparently does not exist; did you specify it correctly?

Actually, kernel couldn’t reload partition table at this situation and ask administrator to reboot the machine for reloading partition table.

What’s Solution?

Partprobe

This utility is the first solution for reloading partition table of the disk. It’s installed on most distribution by default.

Run the below command to reload partition table manually:

If Partprobe doesn’t work and the below error message was shown:

Error: Could not stat device /dev/sdX – No such file or directory

Try another solution from the below solutions.

Hdparm

The Hdparm utility is a general hard disk utility in Linux, try the below command to reload partition table:

Kpartx / Partx

These two utility can reload partition table. Kpartx is generally use for Multipath devices and partx using for local devices:

Kernel Interface

If the above utility couldn’t resolve issue, the last solution is last. This solution force kernel to reload the device:

After all if the problem is still exist. There is no solution except rebooting OS!

Davoud Teimouri is as a professional blogger, vExpert 2015-2016-2017, VCA, MCITP. This blog is started with simple posts and now, it has large following readers.

4,200 total views, 32 views today

Reload Partition Table Without Reboot In Linux
Updated: 23/06/2017 — 3:03 pm

Leave a Reply

Teimouri.net © 2012 Frontier Theme
%d bloggers like this:
Read more:
VMware View 5.3 Features

Finally, VMware Horizon View 5.3 is available and you can download that from this link. Some new features are added...

Close