Applying operations or just scanning the partitions in GParted was
causing all stopped Linux Software RAID arrays to be automatically
started. This is not new with this patch set, but as a result of the
following behaviour which has existed for a long time. Chain of events
goes likes this:
1) Gparted calls commit_to_os() to update the kernel with the new
partition table;
2) Libparted calls ioctl() BLKPG_DEL_PARTITION on every partition to
delete every partition from the kernel. Succeeds on non-busy
partitions only;
3) Kernel emits udev partition remove event on every removed partition;
4) Libparted calls ioctl() BLKPG_ADD_PARTITION on every non-busy
partition to re-add the partition to the kernel;
5) Kernel emits udev partition add event on every added partition;
6) Udev rule:
SUBSYSTEM=="block", ACTION=="add", ENV{ID_FS_TYPE}=="linux_raid_member", \
RUN+="/sbin/mdadm -I $tempnode"
from either /lib/udef/rules.d/64-md-raid.rules or
.../65-md-incremental.rules incrementally starts the member in a
Linux Software RAID array.
Fix by temporarily adding blank override rules files which does nothing,
so that when the udev add and remove events for Linux Software RAID
array member partitions fire nothing is done; but only when required.
Note that really old versions of udev don't have rules to incrementally
start array members and some distributions comment out such rules.
Bug #709640 - Linux Swap Suspend and Software RAID partitions not
recognised
This enhancement removes the virtual file systems from the list of file
systems (shown below) to be masked.
The following output was captured using Fedora 19:
$ systemctl list-units --full --all -t mount
UNIT LOAD ACTIVE SUB DESCRIPTION
-.mount loaded active mounted /
boot.mount loaded active mounted /boot
dev-hugepages.mount loaded active mounted Huge Pages File System
dev-mqueue.mount loaded active mounted POSIX Message Queue File System
proc-sys-fs-binfmt_misc.mount loaded inactive dead Arbitrary Executable File Formats File System
run-user-1000-gvfs.mount loaded active mounted /run/user/1000/gvfs
sys-fs-fuse-connections.mount loaded active mounted FUSE Control File System
sys-kernel-config.mount loaded active mounted Configuration File System
sys-kernel-debug.mount loaded active mounted Debug File System
tmp.mount loaded active mounted Temporary Directory
LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
10 loaded units listed.
To show all installed unit files use 'systemctl list-unit-files'.
Bug #708378 - Advertised new feature: Use systemctl runtime mask to
prevent automounting (#701676) doesn't work
A mistake was made in the following commit:
Use systemctl runtime mask to prevent automounting (#701676)
4c109df9b5
The intention was to use 'systemctl list-units' rather than
'systemctl list-unit-files' so that auto-generated mount files would
also be masked and hence prevented from auto-mounting.
Now 'systemctl list-units' is used.
Bug #708378 - Advertised new feature: Use systemctl runtime mask to
prevent automounting (#701676) doesn't work
Only one partition editing tool should be in use at any one point
in time. If more than one is in use concurrently, then data loss
might occur through operations on common partitions or partition
tables. As such, prevent multiple copies of GParted from running
at the same time.
With the beta release of Fedora 19, invoking gparted appears to
automatically mount partitions. The systemd daemon appears to be
performing the automounting. Hence use systemctl runtime mask to
prevent this automounting from occurring.
Bug #701676 - gparted doesn't inhibit systemd mounting, leading to
potential data loss
Note the license text of this file differs slightly from the C++
source code license text to indicate this file is a part of GParted.
See: https://www.gnu.org/licenses/gpl-howto.html
For programs that are more than one file, it is better to replace
“this program” with the name of the program, and begin the
statement with a line saying “This file is part of NAME”.
- Removed gparted-disable-automount.fdi handling.
- Renamed gparted binary to gpartedbin to permit a calling script to be named gparted.
- Added new calling script gparted.in to permit using hal-lock to acuiqre device locks to prevent automounting while executing gpartedbin.
- Renamed gparted.desktop.in to gparted.desktop.in.in to permit parsing installdir.
svn path=/trunk/; revision=826