On Thu, Oct 22, 2009 at 5:58 AM, Albert Pauw <albert.pauw at gmail.com> wrote: > Just a simple question: > > How do I configure a tape drive target? > > Currently, the way I do it is like this: > > tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 -b > /root/tapes/notape --device-type tape > tgtadm --lld iscsi --mode logicalunit --op update --tid 1 --lun 1 --params > vendor_id=HP,product_id="LTO3 > ULTRIUM",product_rev=0001,scsi_sn=012345678,scsi_id="HP LTO3 > ULTRIUM",removable=1 > > I have to use a dummy tape (a tgtimg tape image with size 0) as I need a > backingstore (I get an error otherwise), > called in my case notape. > > Obviously, the mt command output shows that there is a tape in the drive: > > [root at orange ~]# mt -f /dev/nst0 status > SCSI 2 tape drive: > File number=0, block number=0, partition=0. > Tape block size 0 bytes. Density code 0x0 (default). > Soft error count since last status=0 > General status bits on (41010000): > BOT ONLINE IM_REP_EN > > Having ejected this dummy tape obviously gives the thing I want, an empty > tape drive: > > [root at orange ~]# mt -f /dev/nst0 status > SCSI 2 tape drive: > File number=-1, block number=-1, partition=0. > Tape block size 0 bytes. Density code 0x0 (default). > Soft error count since last status=0 > General status bits on (50000): > DR_OPEN IM_REP_EN > > > So, is there a way to define an empty tape drive without using a dummy tape? There doesn't seem to be a way at the moment. This functionality change a few months ago (while I wasn't monitoring this list very much).. Perhaps a default change to not having to mount a backing store via "--op new", and the mounting of a backing store to be performed later via an "--op update" - For all devices - even for non-removable devices ? This is an issue for all removable type targets (MMC, SSC). Specifying a backing store for SMC does not make sense - although the backing store for SMC could be used for storing the Medium Auxiliary Memory (MAM) My 2c worth. Mark > > Thanks, > > Albert > > > > > -- > To unsubscribe from this list: send the line "unsubscribe stgt" in > the body of a message to majordomo at vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe stgt" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html |