Codebase list partman-auto / 8fead1b
Factor out is_multipath_dev function New function checks if a device-mapper device is a multipath device. r55852 Frans Pop 15 years ago
3 changed file(s) with 11 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
00 partman-auto (82) UNRELEASED; urgency=low
11
2 [ Giuseppe Iuculano ]
23 * lib/auto-shared.sh: Consider device-mapper devices/dmraid arrays with the
34 sataraid flag set as usable for automatic partitioning.
45 Patch based on work done by Luke Yelavich <[email protected]> in Ubuntu.
56
6 -- Giuseppe Iuculano <[email protected]> Sat, 06 Sep 2008 18:23:55 +0200
7 [ Frans Pop ]
8 * Factor out is_multipath_dev function to base.sh function library.
9 Requires partman-base (>= 126).
10
11 -- Frans Pop <[email protected]> Mon, 15 Sep 2008 13:02:55 +0200
712
813 partman-auto (81) unstable; urgency=low
914
88 Package: partman-auto
99 XC-Package-Type: udeb
1010 Architecture: any
11 Depends: ${misc:Depends}, di-utils, partman-base (>= 125), partman-basicfilesystems, partman-ext3
11 Depends: ${misc:Depends}, di-utils, partman-base (>= 126), partman-basicfilesystems, partman-ext3
1212 Description: Automatically partition storage devices (partman)
195195 free_space=$(partition_after $id)'
196196 }
197197
198 is_dm_multipath() {
199 dmtype=$(dm_table $device)
200 [ "$dmtype" = multipath ] || return 1
201 }
202
203198 get_auto_disks() {
204199 local dev device dmtype
205200
211206 # Skip software RAID (mdadm) devices (/dev/md/X and /dev/mdX)
212207 $(echo "$device" | grep -Eq "/dev/md/?[0-9]*$") && continue
213208
214 # Skip device mapper devices (/dev/mapper/)
209 # Skip device mapper devices (/dev/mapper/),
210 # except for dmraid or multipath devices
215211 if echo $device | grep -q "^/dev/mapper/"; then
216 # Except for dmraid or multipath devices
217 if [ -f "$dev/sataraid" ] || is_dm_multipath; then
218 :
219 else
212 if [ ! -f "$dev/sataraid" ] && \
213 ! is_multipath_dev $device; then
220214 continue
221215 fi
222216 fi