2009-01-16 20:53:12 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# 5 Device Loopback Raid-0 Configuration
|
|
|
|
#
|
|
|
|
|
|
|
|
DEVICES="/tmp/zpool-vdev0 \
|
|
|
|
/tmp/zpool-vdev1 \
|
|
|
|
/tmp/zpool-vdev2 \
|
|
|
|
/tmp/zpool-vdev3 \
|
|
|
|
/tmp/zpool-vdev4"
|
2009-01-16 22:29:31 +00:00
|
|
|
DEVICE_SIZE=512
|
2009-01-16 20:53:12 +00:00
|
|
|
|
|
|
|
for DEV in ${DEVICES}; do
|
2009-01-16 22:29:31 +00:00
|
|
|
msg "Creating ${DEV} loopback device (${DEVICE_SIZE} Mib)"
|
2009-01-16 20:53:12 +00:00
|
|
|
rm -f ${DEV} || exit 1
|
2009-01-16 22:29:31 +00:00
|
|
|
dd if=/dev/zero of=${DEV} bs=1024k count=${DEVICE_SIZE} &>/dev/null || exit 1
|
2009-01-16 21:57:12 +00:00
|
|
|
losetup `/sbin/losetup -f` ${DEV} || exit 1
|
2009-01-16 20:53:12 +00:00
|
|
|
done
|
|
|
|
|
2009-01-16 21:57:12 +00:00
|
|
|
${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${DEVICES} || exit 1
|
2009-01-16 20:53:12 +00:00
|
|
|
|