tested on Slackware64 14.2
as binary
slackpkg search tgt
or from scratch
slackpkg search libmpc wget https://github.com/fujita/tgt/archive/v1.0.73/tgt-1.0.73.tar.gz tar xzf tgt-1.0.73.tar.gz cd tgt-1.0.73/ make -j4 > ../tgt.log make install cp scripts/initd.sample /etc/init.d/tgtd ls -lF /etc/init.d/tgtd
ls -lF /dev/drbd1 /dev/drbd2 rm -f /etc/tgt/targets.conf rm -rf /etc/tgt/conf.d/ cat > /etc/tgt/targets.conf <<-EOF default-driver iscsi ignore-errors no <target iqn.drbd:storage1.lun1> backing-store /dev/drbd1 </target> <target iqn.drbd:storage1.lun2> backing-store /dev/drbd2 </target> EOF
handy symlink
cd ~/ ln -s /etc/tgt/targets.conf
deps
slackpkg search perl-config-general slackpkg search libaio ldd `which tgtd`
tail -n0 -F /var/log/* /var/log/*/*
(RE)START
/etc/init.d/tgtd start /etc/init.d/tgtd restart
STATUS
/etc/init.d/tgtd status ps auxww | grep tgtd tgt-admin -s tgt-admin -s >/dev/null && echo UP || echo DOWN tgtadm --mode target --op show
STOP
/etc/init.d/tgtd stop #pkill -9 tgtd
cat >> /etc/rc.d/rc.local <<-EOF /etc/init.d/tgtd start EOF