Skip to content
Commit a255abf3 authored by Mike Fleetwood's avatar Mike Fleetwood Committed by Curtis Gedak
Browse files

Prevent GParted starting stopped Linux Software RAID arrays (#709640)

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 ...
parent d2e1130a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment