When Linux runs the partprobe command, it encounters Unable to open/dev/sr0 read-write (Read-only file system), partprobesr0

Source: Internet
Author: User

When Linux runs the partprobe command, it encounters Unable to open/dev/sr0 read-write (Read-only file system), partprobesr0

When using fdisk to create a partition, we will use the partprobe command to allow the kernel to re-read the partition information to avoid restarting the system. However, the following error message "Warning: unable to open/dev/sr0 read-write (Read-only file system ). /dev/sr0 has been opened read-only. ", as shown below:

[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]# 

 

 

In fact, do not worry or be nervous./dev/sr0 is your CD Drive. Because no device is specified when you run partprobe, it will check all block devices ), because the optical drive is read-only, it is easy to report the above alarm information. You only need to use partprobe to check and scan the specified device. As shown below

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.