#!/bin/sh
java.lang.NullPointerException # This script illustrates the sequence of operations in configfs to # create a very simple LIO iSCSI target with a file or block device # backstore.
java.lang.NullPointerException # (C) Copyright 2014 Christophe Vu-Brugier <cvubrugier@fastmail.fm>
java.lang.NullPointerException
print_usage() {
cat <<EOF
Usage: $(basename $0) [-p PORTAL] DEVICE|FILE
Export a block device or a file as an iSCSI target with a single LUN
EOF
}
die() {
echo $1 exit 1
}
while getopts "hp:" arg; do case $arg in
h) print_usage; exit 0;;
p) PORTAL=${OPTARG};;
esac
done
shift $(($OPTIND - 1))
DEVICE=$1
[ -n "$DEVICE" ] || die "Missing device or file argument"
[ -b $DEVICE -o -f $DEVICE ] || die "Invalid device or file: ${DEVICE}"
IQN="iqn.2003-01.org.linux-iscsi.$(hostname):$(basename $DEVICE)"
[ -n "$PORTAL" ] || PORTAL="0.0.0.0:3260"
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.