国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 系統(tǒng) > Linux > 正文

Linux下partprobe命令的使用詳解

2020-07-10 11:16:39
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友
linux上,在安裝系統(tǒng)之后,可否創(chuàng)建分區(qū)并且在不重新啟動(dòng)機(jī)器的情況下系統(tǒng)能夠識(shí)別這些分區(qū)?
解決方法:

你可以使用一個(gè)叫做partprobe的工具。它包含在parted的rpm軟件包中。在Red Hat Enterprise Linux 3上他的版本是parted-1.6。 partprobe 是一個(gè)可以修改kernel中分區(qū)表的工具。可以使kernel重新讀取分區(qū)表。如下命令可以查看你的系統(tǒng)是否安裝了parted軟件包

復(fù)制代碼
代碼如下:

rpm -q parted

舉例來(lái)說(shuō):

復(fù)制代碼
代碼如下:

# rpm -q parted

parted-1.6.3-29

你可以使用up2date命令安裝這個(gè)軟件包,如果在你的系統(tǒng)已經(jīng)正確地注冊(cè)到RHN上了。否則你可以從光盤(pán)上安裝這個(gè)文件。

你可以使用fdisk或者其他命令創(chuàng)建一個(gè)新的分區(qū),然后使用partprobe命令重新讀取分區(qū)表。

復(fù)制代碼
代碼如下:

# partprobe

這個(gè)命令執(zhí)行完畢之后不會(huì)輸出任何返回信息,你可以使用mke2fs命令在新的分區(qū)上創(chuàng)建文件系統(tǒng)。

在Linux中使用fdisk命令進(jìn)行分區(qū)時(shí),有時(shí)會(huì)遇到“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.”這種告警信息。如下所示

復(fù)制代碼
代碼如下:

[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.
 
此時(shí)使用fdisk命令看不到新建的分區(qū)信息,可以使用partprobe命令解決這個(gè)問(wèn)題而不用重啟系統(tǒng),因?yàn)閜artprobe可以使kernel重新讀取分區(qū)信息,從而避免重啟系統(tǒng)。

復(fù)制代碼
代碼如下:

partprobe - inform the OS of partition table changes

 
DESCRIPTION
       This manual page documents briefly the partprobe command.
 
       partprobe is a program that informs the operating system kernel of partition table changes, by requesting that the operating system re-read the partition table.
發(fā)表評(píng)論 共有條評(píng)論
用戶(hù)名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 宁晋县| 荔波县| 交城县| 城固县| 保定市| 玛纳斯县| 涡阳县| 楚雄市| 广水市| 衢州市| 海晏县| 和静县| 柏乡县| 察雅县| 苍山县| 宾阳县| 鄂尔多斯市| 康定县| 濮阳市| 涿鹿县| 望谟县| 安岳县| 吉林市| 安丘市| 康定县| 宝丰县| 定州市| 新竹县| 宝清县| 丰原市| 德昌县| 洪湖市| 光泽县| 南投县| 靖江市| 班玛县| 宜宾市| 厦门市| 安平县| 石渠县| 聂荣县|