Factor out is_multipath_dev function
New function checks if a device-mapper device is a multipath device.
r55852
Frans Pop
15 years ago
0 | 0 |
partman-auto (82) UNRELEASED; urgency=low
|
1 | 1 |
|
|
2 |
[ Giuseppe Iuculano ]
|
2 | 3 |
* lib/auto-shared.sh: Consider device-mapper devices/dmraid arrays with the
|
3 | 4 |
sataraid flag set as usable for automatic partitioning.
|
4 | 5 |
Patch based on work done by Luke Yelavich <[email protected]> in Ubuntu.
|
5 | 6 |
|
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
|
7 | 12 |
|
8 | 13 |
partman-auto (81) unstable; urgency=low
|
9 | 14 |
|
8 | 8 |
Package: partman-auto
|
9 | 9 |
XC-Package-Type: udeb
|
10 | 10 |
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
|
12 | 12 |
Description: Automatically partition storage devices (partman)
|
195 | 195 |
free_space=$(partition_after $id)'
|
196 | 196 |
}
|
197 | 197 |
|
198 | |
is_dm_multipath() {
|
199 | |
dmtype=$(dm_table $device)
|
200 | |
[ "$dmtype" = multipath ] || return 1
|
201 | |
}
|
202 | |
|
203 | 198 |
get_auto_disks() {
|
204 | 199 |
local dev device dmtype
|
205 | 200 |
|
|
211 | 206 |
# Skip software RAID (mdadm) devices (/dev/md/X and /dev/mdX)
|
212 | 207 |
$(echo "$device" | grep -Eq "/dev/md/?[0-9]*$") && continue
|
213 | 208 |
|
214 | |
# Skip device mapper devices (/dev/mapper/)
|
|
209 |
# Skip device mapper devices (/dev/mapper/),
|
|
210 |
# except for dmraid or multipath devices
|
215 | 211 |
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
|
220 | 214 |
continue
|
221 | 215 |
fi
|
222 | 216 |
fi
|