[Bug 1655779] Re: udev deletes and recreates partition devices when the disk is opened r/w
Launchpad Bug Tracker
1655779 at bugs.launchpad.net
Fri Dec 1 14:28:05 UTC 2017
Status changed to 'Confirmed' because the bug affects multiple users.
** Changed in: systemd (Ubuntu)
Status: New => Confirmed
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1655779
Title:
udev deletes and recreates partition devices when the disk is opened
r/w
Status in systemd package in Ubuntu:
Confirmed
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/systemd/+bug/1655779/+subscriptions
More information about the foundations-bugs
mailing list