/usr/lib/udisks/udisks-helper-mdadm-expand is in udisks 1.0.5-1+b1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #!/bin/bash
set -e
MD_DEVICE=$1
shift
NEW_NUM_RAID_DEVICES=$1
shift
BACKUP_FILENAME=$1
shift
# TODO: disable bitmap if it exists and renable later
for device in "$@" ; do
mdadm $MD_DEVICE --add $device
done
mdadm --grow $MD_DEVICE --raid-devices $NEW_NUM_RAID_DEVICES --backup-file "$BACKUP_FILENAME"
|