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

20 lines
428 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
rm -f ${DEV} || exit 1
dd if=/dev/zero of=${DEV} bs=1024k count=512 || exit 1
losetup `/sbin/losetup -f` ${DEV} || exit 1
done
${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${DEVICES} || exit 1