Codebase list partman-auto / addb94a
Improve dmraid support in partman Improved support for dmraid in libparted means that we can also properly support dmraid in partman and no longer need the partman-dmraid udeb. Requires libparted (>= 1.8.8.git.2008.03.24-10). Patches based on work done in Ubuntu by Luke Yelavich <[email protected]> and prepared for Debian by Giuseppe Iuculano. See #497110. r55851 Frans Pop 15 years ago
2 changed file(s) with 23 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
0 partman-auto (82) UNRELEASED; urgency=low
1
2 * lib/auto-shared.sh: Consider device-mapper devices/dmraid arrays with the
3 sataraid flag set as usable for automatic partitioning.
4 Patch based on work done by Luke Yelavich <[email protected]> in Ubuntu.
5
6 -- Giuseppe Iuculano <[email protected]> Sat, 06 Sep 2008 18:23:55 +0200
7
08 partman-auto (81) unstable; urgency=low
19
210 [ Jérémy Bobbio ]
195195 free_space=$(partition_after $id)'
196196 }
197197
198 is_dm_multipath() {
199 dmtype=$(dm_table $device)
200 [ "$dmtype" = multipath ] || return 1
201 }
202
198203 get_auto_disks() {
199204 local dev device dmtype
200205
201206 for dev in $DEVICES/*; do
202207 [ -d "$dev" ] || continue
203208
204 # Skip /dev/mapper/X (except multipath) devices and
205 # RAID (/dev/md/X and /dev/mdX) devices
206209 device=$(cat $dev/device)
210
211 # Skip software RAID (mdadm) devices (/dev/md/X and /dev/mdX)
207212 $(echo "$device" | grep -Eq "/dev/md/?[0-9]*$") && continue
213
214 # Skip device mapper devices (/dev/mapper/)
208215 if echo $device | grep -q "^/dev/mapper/"; then
209 dmtype=$(dm_table $device)
210 [ "$dmtype" = multipath ] || continue
216 # Except for dmraid or multipath devices
217 if [ -f "$dev/sataraid" ] || is_dm_multipath; then
218 :
219 else
220 continue
221 fi
211222 fi
212223 printf "$dev\t$(device_name $dev)\n"
213224 done