Shock! ! ! ! After the server disk was expanded, it disappeared~~~

When working on the environment today, I encountered a problem. The disk was not divided enough. After the expansion, the partition was found to be missing when the disk was mounted. I hereby record it.

Things are like this~

The disk itself is only 100g, and it is divided into /home and /root, and we are going to create a separate data directory, so we expand the 100g disk to 300g


So after the normal partition operation, it becomes as follows.
insert image description here
Immediately after formatting, it is found that the /dev/sda3 disk is not generated. Use p to check that the disk is also present. The
insert image description here
disk is indeed gone. At this time, there is a little trick , exit fdisk interactive mode, execute partprobe

The partprobe command is used to reread the partition table, notify the kernel of the change information of the disk partition table, and request the operating system to reload the partition table. If it still prompts to take up space after deleting the file, you can use partprobe to reread the partition without restarting.
Commonly used parameters:
-d does not update the kernel
-s displays summary and partition
-h displays help information
-v displays version information

After execution, the partition will be displayed normally.

Guess you like

Origin blog.csdn.net/tootsy_you/article/details/131938967