Linux 硬盘分区生效命令partprobe[通俗易懂]

Linux 硬盘分区生效命令partprobe[通俗易懂]在Linux中使用fdisk命令进行分区时,有时会遇到“WARNING:Re-readingthepartitiontablefailedwitherror16:Deviceorresourcebusy.Thekernelstillusestheoldtable.Thenewtablewillbeusedatthenextreboot.”这种告…

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE稳定放心使用

在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): 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.

此时使用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.

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/179550.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 超详细Eclipse安装教程

    超详细Eclipse安装教程超详细 Eclipse 安装教程

    2025年7月25日
    4
  • 禁用360浏览器6.2自带的Flash Player

    禁用360浏览器6.2自带的Flash Player360浏览器6.2自带了FlashPlayer,版本为11.6,而我需要使用最新版的FlashPlayer11.9,我安装了最新版的FlashPlayer11.9后,浏览网页时,360浏览器6.2默认使用的是自带的FlashPlayer11.6因此我们必须禁用掉360浏览器自带的FlashPlayer11.6——————————

    2022年6月11日
    46
  • java 服务器程序部署环境搭建

    java 服务器程序部署环境搭建1、安装JDK 右击我的电脑-属性-高级系统设置-高级-环境变量:系统变量:新建:CLASSPATH 变量值为.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;新建:JAVA_HOME 变量值为D:\Java\jdk1.8.0_40(就是你安装的JDK路径)找到Path,点击编辑,在变量值最前端添加;%JA

    2022年5月27日
    56
  • p6使用教程_p6slite

    p6使用教程_p6slite文章目录简介1、Maven依赖2、 切换driverClass(必须)3、增加配置文件4、自定义配置类简介p6spy是一个开源项目,通常使用它来跟踪数据库操作,查看程序运行过程中执行的sql语句。展示效果如下:SQL耗时【7毫秒】连接信息【jdbc:p6spy:mysql://192.168.1.108:3306/leimingtech_member?allowMultiQueries=t…

    2022年10月6日
    3
  • win10 命令行 关机(如何用命令提示符重启电脑)

    参考:电脑怎么用命令行关机、windows系统使用cmd命令关机电脑卡了,点不了关机的按钮,又不想强制关机,就用了命令行,好用!!!步骤:1)使用“windows+R”打开运行会话框,输入“cmd”,点击确定进入命令行。2)直接在命令行输入:shutdown/p,然后回车,就会立即关机,完事!太方便了!注:以下来自参考文章windows关机命令为shutdown,不过直接输入shutdown无法关机,需要接参数-s,执行后,电脑将会在1分钟后关机。…

    2022年4月18日
    319
  • cloudsim4.0中CloudSimExample2分析

    cloudsim4.0中CloudSimExample2分析CloudSimExample2展示如何创建一个只含一个主机的数据中心,并在其上运行两个云任务。(两个云任务运行在具有相同计算能力的虚拟机上,即两个云任务的执行需要相同的时间)首先附上CloudSimExample1全部代码:/**Title:CloudSimToolkit*Description:CloudSim(CloudSimulation)…

    2022年10月13日
    2

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号