也想出现在这里? 联系我们

Linux下partprobe命令的使用详解

作者 : 小编 本文共1973个字,预计阅读时间需要5分钟 发布时间: 2022-11-1 共4.13K人阅读
也想出现在这里? 联系我们

linux上,在安装系统之后,可否创建分区并且在不重新启动机器的情况下系统能够识别这些分区?解决方法:你可以使用一个叫做partprobe的工具。它包含在parted的rpm软件包中。在Red Hat Enterprise Linux 3上他的版本是parted-1.6。 partprobe 是一个可以修改kernel中分区表的工具。可以使kernel重新读取分区表。如下命令可以查看你的系统是否安装了parted软件包

复制代码

代码如下:

rpm -q parted

举例来说:

复制代码

代码如下:

# rpm -q parted

parted-1.6.3-29你可以使用up2date命令安装这个软件包,如果在你的系统已经正确地注册到RHN上了。否则你可以从光盘上安装这个文件。你可以使用fdisk或者其他命令创建一个新的分区,然后使用partprobe命令重新读取分区表。

复制代码

代码如下:

# partprobe

这个命令执行完毕之后不会输出任何返回信息,你可以使用mke2fs命令在新的分区上创建文件系统。 在Linux中使用fdisk命令进行分区时,有时会遇到“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.”这种告警信息。如下所示

复制代码

代码如下:

[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): pDisk /dev/sde: 155.6 GB, 155692564480 bytes255 heads, 63 sectors/track, 18928 cylindersUnits = 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 LinuxCommand (m for help): nCommand action l logical (5 or over) p primary partition (1-4)p Partition number (1-4): 2First cylinder (18276-18928, default 18276): Using default value 18276Last cylinder or +size or +sizeM or +sizeK (18276-18928, default 18928): Using default value 18928Command (m for help): wThe 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.此时使用fdisk命令看不到新建的分区信息,可以使用partprobe命令解决这个问题而不用重启系统,因为partprobe可以使kernel重新读取分区信息,从而避免重启系统。

复制代码

代码如下:

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.

1. 本站所提供的源码模板(主题/插件)等资源仅供学习交流,若使用商业用途,请购买正版授权,否则产生的一切后果将由下载用户自行承担,有部分资源为网上收集或仿制而来,若模板侵犯了您的合法权益,请来信通知我们(Email: rayer@88.com),我们会及时删除,给您带来的不便,我们深表歉意!
2. 分享目的仅供大家学习和交流,请不要用于商业用途!
3. 如果你也有好源码或者教程,可以到用户中心发布投稿,分享有金币奖励和额外收入!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务 请大家谅解!
5. 如有链接无法下载、失效或广告,请联系站长,可领回失去的金币,并额外有奖!
6. 如遇到加密压缩包,默认解压密码为"www.zyfx8.cn",如遇到无法解压的请联系管理员!
本站部分文章、资源来自互联网,版权归原作者及网站所有,如果侵犯了您的权利,请及时联系我站删除。免责声明
资源分享吧 » Linux下partprobe命令的使用详解

常见问题FAQ

免费下载或者VIP会员专享资源能否直接商用?
本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。更多说明请参考 VIP介绍。
织梦模板使用说明
你下载的织梦模板并不包括DedeCMS使用授权,根据DedeCMS授权协议,除个人非盈利站点外,均需购买DedeCMS商业使用授权。购买地址: http://www.desdev.cn/service-dedecms.html

发表评论

Copyright 2015-2020 版权所有 资源分享吧 Rights Reserved. 蜀ICP备14022927号-1
开通VIP 享更多特权,建议使用QQ登录