In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains the "use of partprobe commands under Linux", the content of the explanation is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "the use of partprobe commands under Linux"!
On linux, after installing the system, can partitions be created and recognized by the system without rebooting the machine?
Solution:
You can use a tool called partprobe. It is included in the rpm package of parted. His version on Red Hat Enterprise Linux 3 is parted-1.6. Partprobe is a tool that can modify partitioned tables in kernel. You can make kernel reread the partition table. The following command checks to see if your system has a parted package installed
The code is as follows:
Rpm-Q parted
For example:
The code is as follows:
# rpm-Q parted
Parted-1.6.3-29
You can use the up2date command to install this package if it is properly registered to RHN on your system. Otherwise, you can install this file from the CD.
You can use fdisk or other commands to create a new partition, and then use the partprobe command to re-read the partition table.
The code is as follows:
# partprobe
No return information will be output after this command is executed, and you can use the mke2fs command to create a file system on the new partition.
When you use the fdisk command to partition in Linux, you sometimes encounter "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." This kind of alarm message. As shown below
The code is as follows:
[root@localhost ~] # fdisk / dev/sde
The number of cylinders for this disk is set to 18928.
There is nothing wrong with that, but this is larger than 1024
And could in certain setups cause problems with:
1) software that runs at boot time (e.g.old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): P
Disk / dev/sde: 155.6 GB, 155692564480 bytes
255 heads, 63 sectors/track, 18928 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/ dev/sde1 1 18275 146793906 5 Extended
/ dev/sde5 1 18275 146793874 + 83 Linux
Command (m for help): n
Command action
L logical (5 or over)
P primary partition (1-4)
P
Partition number (1-4): 2
First cylinder (18276-18928, default 18276):
Using default value 18276
Last cylinder or + size or + sizeM or + sizeK (18276-18928, default 18928):
Using default value 18928
Command (m for help): W
The partition table has been altered!
Calling ioctl () to re-read partition table.
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.
Syncing disks.
The newly created partition information can not be seen by using the fdisk command at this time, so you can use the partprobe command to solve this problem without rebooting the system, because partprobe can make kernel read the partition information again, thus avoiding restarting the system.
The code is as follows:
Partprobe-inform the OS of partition table changes
Thank you for your reading, the above is the content of "the use of partprobe commands under Linux". After the study of this article, I believe you have a deeper understanding of the use of partprobe commands under Linux, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.