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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 教师职称考计算机模块,2015教师职称计算机考试模块.doc

    教师职称考计算机模块,2015教师职称计算机考试模块.doc2015教师职称计算机考试模块2015年教师职称计算机考试模块【职考宝典】为广大考生归纳2015年职称计算机考试模块,让考生提前进入考试氛围,了解考试题型,职考宝典涵盖面积广,模拟题库包含Internet应用,word2003、2007,winXP、wpsoffice、excel2003、2007,ppt2003、2007等。山东、广东、安徽、内蒙古、黑龙江、湖南、山西、云南、辽宁、新疆、浙江…

    2022年5月5日
    49
  • java.math.BigDecimal 比较大小

    java.math.BigDecimal 比较大小BigDecimala=newBigDecimal(101);BigDecimalb=newBigDecimal(111);//使用compareTo方法比较//注意:a、b均不能为null,否则会报空指针if(a.compareTo(b)==-1){System.out.println("a小于b");}if(a.compareTo(b)==…

    2022年7月14日
    32
  • 两位数乘法的速算方法(一)「建议收藏」

    两位数乘法的速算方法(一)「建议收藏」两位数乘法的速算方法一、范围讲的是两位自然数的相乘,即如何计算ABXCD的相乘结果,例如86X32。 二、ABXCD相乘的专业说法AB叫被乘数CD叫乘数三、原理设两位数分别是10A+B,10C+D,其乘积为S,根据多项式展开:S=(10A+B)X(10C+D)=10Ax10C+BX10C+10AXD+BXD。所谓速算,就是根据其中一些相等或者互补的关系,简化

    2022年6月7日
    57
  • 开发大数据基础教程(前端开发入门)

    第一阶段linux+搜索+hadoop体系第一阶段:linux+搜索+hadoop体系Linux大纲这章是基础课程,帮大家进入大数据领域打好Linux基础,以便更好地学习Hadoop,hbase,NoSQL,Spark,Storm,docker,kvm,openstack等众多课程。因为企业中无一例外的是使用Linux来搭建或部署项目。1)Linux的介绍,Linux的安装:VMwareW…

    2022年4月13日
    51
  • docker基础学习笔记总结

    docker基础学习笔记总结docker基础学习笔记总结,欢迎指正

    2022年8月11日
    6
  • java通过cglib动态生成实体bean

    java通过cglib动态生成实体beanDynamicBeanEntity.class动态bean类:packagecom.dym.entity;importnet.sf.cglib.beans.BeanGenerator;importorg.apache.commons.collections.map.MultiValueMap;importjava.lang.reflect.*;importjava.util.ArrayList;importjava.util.HashMap;importjava.util.It

    2022年6月13日
    39

发表回复

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

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