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

22 lines
450 B
Bash

#!/bin/bash
#
# 5 Device Loopback Raid-0 Configuration
#
DEVICES="/tmp/zpool-vdev0 \
/tmp/zpool-vdev1 \
/tmp/zpool-vdev2 \
/tmp/zpool-vdev3 \
/tmp/zpool-vdev4"
for DEV in ${DEVICES}; do
local DEV_LO=`/sbin/losetup -f`
rm -f ${DEV} || exit 1
dd if=/dev/zero of=${DEV} bs=1024k count=512 || exit 1
losetup ${DEV_LO} ${DEV} || exit 1
done
${CMDDIR}/zpool/zpool create ${ZPOOL_NAME} ${DEVICES} || exit 1