[Bug 1655779] [NEW] parted/libparted disables the read only status during the probe
Lynn
1655779 at bugs.launchpad.net
Wed Jan 11 22:59:41 UTC 2017
Public bug reported:
Description: Ubuntu 16.04.1 LTS
Release: 16.04
parted: 3.2-15
gparted: 0.25.0-1
Applications that utilized parted/libparted to probe for block device information disable the read only status during the probe.
Example:
Set a block device read only using either hdparm -r1 /dev/sdc* or blockdev --setro /dev/sdc*:
# hdparm -r1 /dev/sdc*
/dev/sdc:
readonly = 1 (on)
/dev/sdc1:
readonly = 1 (on)
Run gparted
Check the readonly status with hdparm:
# hdparm -r /dev/sdc*
/dev/sdc:
readonly = 0 (off)
/dev/sdc1:
readonly = 0 (off)
The read only status has changed to off. This can be replicated using partprobe:
Set a block device read only using either hdparm -r1 /dev/sdc*:
# hdparm -r1 /dev/sdc*
/dev/sdc:
readonly = 1 (on)
/dev/sdc1:
readonly = 1 (on)
Probe the devices using partprobe -s:
# partprobe -s
/dev/sda: msdos partitions 1 2 3
/dev/sdb: gpt partitions 1 2 3 5 4
/dev/sdc: msdos partitions 1
Recheck the read only status:
# hdparm -r /dev/sdc*
/dev/sdc:
readonly = 0 (off)
/dev/sdc1:
readonly = 0 (off)
As before the read only status has been switched off. Again, this can be replicated using parted:
Set a block device read only using either hdparm -r1 /dev/sdc*:
# hdparm -r1 /dev/sdc*
/dev/sdc:
readonly = 1 (on)
/dev/sdc1:
readonly = 1 (on)
List the partition layout using parted -l:
# parted -l
.
.
Model: WDC WD10 EFRX-68JCSN0 (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 1000GB 1000GB primary ntfs
Recheck the read only status:
# hdparm -r /dev/sdc*
/dev/sdc:
readonly = 0 (off)
/dev/sdc1:
readonly = 0 (off)
** Affects: parted (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to parted in Ubuntu.
https://bugs.launchpad.net/bugs/1655779
Title:
parted/libparted disables the read only status during the probe
Status in parted package in Ubuntu:
New
Bug description:
Description: Ubuntu 16.04.1 LTS
Release: 16.04
parted: 3.2-15
gparted: 0.25.0-1
Applications that utilized parted/libparted to probe for block device information disable the read only status during the probe.
Example:
Set a block device read only using either hdparm -r1 /dev/sdc* or blockdev --setro /dev/sdc*:
# hdparm -r1 /dev/sdc*
/dev/sdc:
readonly = 1 (on)
/dev/sdc1:
readonly = 1 (on)
Run gparted
Check the readonly status with hdparm:
# hdparm -r /dev/sdc*
/dev/sdc:
readonly = 0 (off)
/dev/sdc1:
readonly = 0 (off)
The read only status has changed to off. This can be replicated using partprobe:
Set a block device read only using either hdparm -r1 /dev/sdc*:
# hdparm -r1 /dev/sdc*
/dev/sdc:
readonly = 1 (on)
/dev/sdc1:
readonly = 1 (on)
Probe the devices using partprobe -s:
# partprobe -s
/dev/sda: msdos partitions 1 2 3
/dev/sdb: gpt partitions 1 2 3 5 4
/dev/sdc: msdos partitions 1
Recheck the read only status:
# hdparm -r /dev/sdc*
/dev/sdc:
readonly = 0 (off)
/dev/sdc1:
readonly = 0 (off)
As before the read only status has been switched off. Again, this can be replicated using parted:
Set a block device read only using either hdparm -r1 /dev/sdc*:
# hdparm -r1 /dev/sdc*
/dev/sdc:
readonly = 1 (on)
/dev/sdc1:
readonly = 1 (on)
List the partition layout using parted -l:
# parted -l
.
.
Model: WDC WD10 EFRX-68JCSN0 (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 1000GB 1000GB primary ntfs
Recheck the read only status:
# hdparm -r /dev/sdc*
/dev/sdc:
readonly = 0 (off)
/dev/sdc1:
readonly = 0 (off)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/parted/+bug/1655779/+subscriptions
More information about the foundations-bugs
mailing list