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 a new file system without rebooting the box. 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 the fdisk command session (which makes changes to partition table) just type the following command:
# partprobe /dev/sdX
Replace /dev/sdX or /dev/hdX with actual device name. Now you will able to create filesystem on new partition 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.
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 official parted home page for download and other information.Tweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?