星空网 > 软件开发 > 操作系统

Linux 执行partprobe命令时遇到Unable to open /dev/sr0 read

在使用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]# 


 

Linux 执行partprobe命令时遇到Unable to open /dev/sr0 read

 

其实不要担心和紧张, /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

关键词:linux

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

浅析:优秀的跨境电商卖家到底是怎么做的?:https://www.ikjzd.com/articles/112027
浅析:优秀的跨境电商卖家到底是怎么做的?:https://www.ikjzd.com/articles/112028
意大利商标注册常见问题及注意事项!:https://www.ikjzd.com/articles/112029
黑五营销案例!Anker是如何利用INS活动引流冲排名的:https://www.ikjzd.com/articles/11203
警惕!旺季侵权高发,这款爆款产品要当心!:https://www.ikjzd.com/articles/112030
网一业绩创历史新高,姐夫推新政将引价格战!:https://www.ikjzd.com/articles/112031
千岛湖绿城度假酒店的简介:https://www.vstour.cn/a/363185.html
深圳大湾区游轮夜景 深圳大湾区游轮夜景图:https://www.vstour.cn/a/363186.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流