在使用fdisk创建分区时,我们会使用partprobe命令可以使kernel重新读取分区信息,从而避免重启系统,但是有时候会遇到下面错误信息“Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only.”,如下所示:

[root@getlnx14test scsi_device]# fdisk /dev/sde

 

The number of cylinders for this disk is set to 19581.

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: 161.0 GB, 161061273600 bytes

255 heads, 63 sectors/track, 19581 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

   Device Boot      Start         End      Blocks   Id  System

/dev/sde1               1       15665   125829081    5  Extended

/dev/sde2           15666       17231    12578895   83  Linux

/dev/sde5               1       15665   125829049+  83  Linux

 

Command (m for help): n

Command action

   l   logical (5 or over)

   p   primary partition (1-4)

p

Partition number (1-4): 3

First cylinder (17232-19581, default 17232): 17232

Last cylinder or +size or +sizeM or +sizeK (17232-19581, default 19581): 

Using default value 19581

 

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.

[root@getlnx14test scsi_device]# partprobe

Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only.

[root@getlnx14test scsi_device]# 

其实不要担心和紧张, /dev/sr0是你的光驱(CD Drive),因为你运行partprobe时没有指定设备,所以它会检查所有的块设备(block devices),由于光驱是read-only,所以报上述告警信息,其实避免这个错误也很简单,你只需要使用partprobe检查、扫描指定设备即可。如下所示

[root@getlnx14test scsi_device]# partprobe /dev/sde

[root@getlnx14test scsi_device]# 

Linux 执行partprobe命令时遇到Unable to open /dev/sr0 read-write (Read-only file system)的更多相关文章

  1. Linux 执行ll命令时指定按文件时间或大小排序

    按时间排序: $ ll -ht 按大小排序: $ ll -hS 使用--help查看命令的用法,如 $ ll --help

  2. loadrunner调用plink,远程linux执行shell命令

    loadrunner调用plink,远程linux执行shell命令   脚本: Action() {   char* cmd; cmd = lr_eval_string("C:\\\&qu ...

  3. 执行Git命令时出现各种 SSL certificate problem 的解决办法

    执行Git命令时出现各种 SSL certificate problem 的解决办法 来源  https://www.cnblogs.com/chenzc/p/5842932.html 比如我在win ...

  4. FW 执行Git命令时出现各种 SSL certificate problem 的解决办法

    比如我在windows下用Git clone gitURL 就提示  SSL certificate problem: self signed certificate 这种问题,在windows下出现 ...

  5. Jenkins服务使用 宿主机的docker、docker-compose (Jenkins 执行sudo命令时出现“sudo: no tty present and no askpass program specified”,以及 docker-compose command not found解决办法)

    若要转载本文,请务必声明出处:https://www.cnblogs.com/zhongyuanzhao000/p/11681474.html 原因: 本人最近正在尝试CI/CD,所以就使用了 Jen ...

  6. VMware 虚拟机 linux执行 ifconfig 命令 eth0没有IP地址(intet addr、Bcast、Mask) UP BROADCAST MULTICAST 问题

    VMware 虚拟机 linux执行 ifconfig 命令 eth0没有IP地址(intet addr.Bcast.Mask) UP BROADCAST MULTICAST 问题 eth0:网络接口 ...

  7. 执行cp命令时提示cp: 略过目录

    执行cp命令时提示cp: 略过目录 加入-r之后成功拷贝 在网上search了一下CP命令的用法: CP命令 该命令的功能是将给出的文件或目录拷贝到另一文件或目录中,同MSDOS下的copy命令一样, ...

  8. linux执行wget url时提示“无法建立 SSL 连接”

    linux执行wget url时提示“无法建立 SSL 连接” 原因: wget在使用HTTPS协议时,默认会去验证网站的证书,而这个证书验证经常会失败 解决方案: 1.加上参数“--no-check ...

  9. 在Linux中输入命令时打错并按了enter

    今天在Linux中输入命令时,打错一个单词了,之后出现一串串的~,按ESC也没用, 并在底部出现:quit<enter> to exit vim 解决办法: 按几下 esc 确保 vim ...

随机推荐

  1. 使用DocX开源组件,实现动态数据的填充。

    1.先解释一下,什么叫做动态数据,动态数据指的是,一条数据的格式固定,但数据的条数不固定. 2.应用环境,在一个表格当中如果,现在表格有三行n列,如果你需要在表格第一行后添加同等规格的一行或n行,应该 ...

  2. .NET 中获取调用方法名

    在写记录日志功能时,需要记录日志调用方所在的模块名.命名空间名.类名以及方法名,想到使用的是反射(涉及到反射请注意性能),但具体是哪一块儿还不了解,于是搜索,整理如下: 需要添加相应的命名空间: us ...

  3. android实现无限轮播

    1 在ViewPager的适配器中的getCount()长度设置无限大Integer.MAX_VALUE 2  明白当前currentIten 为position % images.length; 3 ...

  4. JQuery实现对勾事件代码

       1.JQuery选择器中使用变量实现动态选择解决方案: <table> <tr> <th>用户名</th> <th>状态</th ...

  5. [转载][翻译] IoC 容器和 Dependency Injection 模式

    原文地址:Inversion of Control Containers and the Dependency Injection pattern 中文翻译版本是网上的PDF文档,发布在这里仅为方便查 ...

  6. HTML5基础之textarea 和lable

    HTML基础:表单<form/>中文本域textarea 和lable <textarea rows="行数" cols="列数">文本 ...

  7. asp.net+nopi生成Excel遇到设置单元格值null问题

    Npoi 生成excel报表功能很不错,功能也不用给大家介绍了.首先看遇到的问题吧! FileStream file = new FileStream(Server.MapPath("Tem ...

  8. VS无法启动 IISExpress web 服务器

    VS无法启动 IISExpress web 服务器     今天把原来的VS卸载重装了,重装之后启动一个web项目时发现启动不起来,提示如下:     在网上查找资料之后发现是由于WebMatrix也 ...

  9. Dynamics AX7 materials

    Dynamics AX community https://community.dynamics.com/ax Dynamics AX Wiki https://ax.help.dynamics.co ...

  10. charset的获取方法

      1.解析http请求的返回值: 2.通过解析html的meta标签里面的数据: 3.通过cpdetector(java环境下)来自动验证: ---------------------------- ...