zfs/scripts/zpool-config/lo-raid0.cfg

22 lines
527 B
INI
Raw Normal View History

#!/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
for DEV in ${DEVICES}; do
2009-01-16 22:29:31 +00:00
msg "Creating ${DEV} loopback device (${DEVICE_SIZE} Mib)"
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
done
2009-01-16 21:57:12 +00:00
${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${DEVICES} || exit 1