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


相关推荐

  • LetterView实现载入全国各地城市

    LetterView实现载入全国各地城市

    2021年11月23日
    39
  • route -n命令_router.replace

    route -n命令_router.replace<router-linkclass=”icon-go”:to=”{name:’首页’}”v-if=”$route.matched[0].path==’/category'”></router-link><spanclass=”icon-go”@click=”$router.go(-1)”v-e…

    2025年8月6日
    1
  • Linux服务器如何做raid1,Linux下制作raid1

    Linux服务器如何做raid1,Linux下制作raid1制作raid1raid1是Linux服务器最常用的一种硬盘冗余备份的方案,它能在硬盘损坏的情况下保证硬盘数据内的安全。需要至少两块硬盘,最好是完全相同的两块硬盘,所创建的若磁盘中有谁损坏,则备用盘自动替补上去。一、搭建Linuxraid1环境1.准备好要制作raid1的硬盘,至少两块,最好是两块同型号同容量的硬盘。2.用fdisk工具对硬盘进行分区(用sda做示例…

    2022年7月15日
    25
  • c++中delete什么意思_delete和delete()

    c++中delete什么意思_delete和delete()一直对C++中的delete和delete[]的区别不甚了解,今天遇到了,上网查了一下,得出了结论。做个备份,以免丢失。C++告诉我们在回收用new分配的单个对象的内存空间的时候用delet

    2022年8月2日
    6
  • phpstorm 激活码生成【最新永久激活】2022.02.28

    (phpstorm 激活码生成)2021最新分享一个能用的的激活码出来,希望能帮到需要激活的朋友。目前这个是能用的,但是用的人多了之后也会失效,会不定时更新的,大家持续关注此网站~IntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,下面是详细链接哦~https://javaforall.net/100143.html…

    2022年4月2日
    293
  • 关于各种型号单片机delay函数不起作用问题的解决方法

    关于各种型号单片机delay函数不起作用问题的解决方法这里以单片机HT45F75为例://定义一个延时xms毫秒的延时函数voiddelay(unsignedintxms) //xms代表需要延时的毫秒数{   unsignedintx,y;   for(x=xms;x&gt;0;x–)           for(y=960/4;y&gt;0;y–)           {                     …

    2022年6月1日
    48

发表回复

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

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