Re-read the partition table without rebooting Linux system
If you are using hot swappable hard disk and created new partition using fdisk then you need to reboot Linux based system to get partition recognized. Without reboot you will NOT able to create filesystem on your newly created or modified partitions with the mke2fs command.
However with partprobe command you should able to create new file system without a reboot. It is a program that informs the operating system kernel of partition table changes, by requesting that the operating system re-read the partition table.
After fdisk session just type command:
# partprobe
Now you will able to create filesystem on with the mke2fs command.
Inform the OS of partition table changes
partprobe command is part of GNU parted software. parted is a disk partitioning and partition resizing program. It allows you to create, destroy, resize, move and copy ext2, ext3, linux-swap, FAT, FAT32, and reiserfs partitions. It can create, resize and move Macintosh HFS partitions, as well as detect jfs, ntfs, ufs, and xfs partitions. It is useful for creating space for new operating systems, reorganising disk usage, and copying data to new hard disks.
Install parted
In order to use partprobe command you need to install parted:
If you are using Debian / Ubuntu Linux, enter:
# apt-get install parted
OR if you are using RHEL version <= 4, enter:
# up2date parted
OR if you are using Fedora Linux / CentOS / RHEL 5, enter:
# yum install parted
See also:
=> See official parted home page for download and other information.
Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
You may also be interested in other helpful articles:
- Linux Creating a Partition Size Larger than 2TB
- Linux: How to backup hard disk partition table (MBR)
- Knoppix Linux rescue: Four Tough Lessons of System Recovery
- How to: Backup Up and Restore the Solaris OS With ufsdump
- Migrating and Moving UNIX Filesystems
Discussion on This Article:
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: filesystem, hard_disk, hot_swappable, inform_partition_-table_changes, operating_system, partitions, partition_table, partprobe_command, reboot, system_kernel, table_changes, using_fdisk



Its a very good tip that can be used in a production evironment without any downtime
Thank you!
And to make this a bit more googlable:
fdisk printout: “Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 16: Device or resource busy”
When partprobe isn’t available you can also (sometimes) use:
# hdparm -z /dev/sdX
which will re-read that device’s partition table.