From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,2a69ff7ae4ff0d5f X-Google-Attributes: gidfee84,public From: "Mark & Suzanne (gcs might work)" Subject: Re: find default block size of tape device(tctl?) Date: 1998/04/21 Message-ID: <353C7F2B.41C6@s054.aone.net.au>#1/1 X-Deja-AN: 346265823 Content-Transfer-Encoding: 7bit References: <6hf1ap$9ue$1@power42t.hkbu.edu.hk> To: "P.M.Wong" Content-Type: text/plain; charset=us-ascii Organization: Garetech Computer Solutions P/L Mime-Version: 1.0 Newsgroups: comp.unix.osf.osf1 P.M.Wong wrote: > > On other unix like aix, there's the tctl command to find out > what the default block size and compressed mode (yes/no) of the > tape drive is. > However tctl doesn't seem to work under digital unix. > Wgat's the equivalent command ? Digital UNIX does not set a block size for the tape drive like AIX it looks like and AIX tape drive with block size set to 0. I'll answer with more than you asked :- Commands to get SCSI device info as root file /dev/rmt* eg # file /dev/rmt* /dev/rmt0a: character special (9/5126) SCSI #0 TLZ07 tape #3 (SCSIID #5) (SCSI LUN #0) /dev/rmt0h: character special (9/5122) SCSI #0 TLZ07 tape #3 (SCSIID #5) (SCSI LUN #0) /dev/rmt0l: character special (9/5120) SCSI #0 TLZ07 tape #3 (SCSIID #5) (SCSI LUN #0) /dev/rmt0m: character special (9/5124) SCSI #0 TLZ07 tape #3 (SCSIID #5) (SCSI LUN #0) Traditionally the a is alternet density, h is high, l is low and m is medium if you have tape drive that matches this generally h is the only one to use. h should get compress l should not - I have not bothered with non-compress in such a long time I assume it still works :) /dev/nrmt* where n is a non-rewind device so that when you close the device it's left at the current position # scu -f /dev/rmt0h scu> show dev Inquiry Information: SCSI Bus ID: 0 SCSI Target ID: 5 SCSI Target LUN: 0 Peripheral Device Type: 0x1 (Sequential Access) Peripheral Qualifier: 0 (Peripheral Device Connected) Device Type Modifier: 0 Removable Media: Yes ANSI Version: 2 (Complies to ANSI X3.131-1994, SCSI-2) ECMA Version: 0 ISO Version: 0 Response Data Format: 2 (SCSI-2) Terminate I/O Process: No Additional Length: 35 Soft Reset Support: No Command Queuing Support: No Target Transfer Disable: No Linked Command Support: Yes Synchronous Data Transfers: Yes Support for 16 Bit Transfers: No Support for 32 Bit Transfers: No Relative Addressing Support: No Vendor Identification: DEC Product Identification: TLZ07 (C)DEC Firmware Revision Level: 553B scu> There a lots of other things you get and set with scu including down load firmware to a device Commands for tapes Generally DUNIX uses the BSD model when dealing with tapes and so supports the command mt eg. mt -f /dev/nrmt0h status DEVIOGET ELEMENT CONTENTS ---------------- -------- category DEV_TAPE bus DEV_SCSI interface SCSI device TLZ07 adpt_num 0 nexus_num 0 bus_num 0 ctlr_num 0 slave_num 3 dev_name tz unit_num 3 soft_count 0 hard_count 1 stat 0x5 DEV_BOM DEV_OFFLINE category_stat 0x20000 DEV_61000_BPI DEVGETINFO ELEMENT CONTENTS ------------------ -------- media_status 0x10001 BOM POS_VALID unit_status 0x182 Offline 2_FM_Close NO_Rewind Compacting Buffered record_size 0 density (current) 61000 BPI density (on write) 0 BPI Filemark Cnt 1 Record Cnt 0 Class 2 - RDAT MTIOCGET ELEMENT CONTENTS ---------------- -------- mt_type MT_ISSCSI mt_dsreg 0x5 DEV_BOM DEV_OFFLINE mt_erreg 0x2 Unit is not ready. mt_resid 0 mt_fileno 1 mt_blkno 0 DEV_EEI_STATUS version 0x2 status 0x3200 Device inoperable (needs initialize) flags 0x1000007 CAM_STATUS SCSI_STATUS SCSI_SENSE CAM_DATA cam_status 0x4 CCB request completed with an err scsi_status 0x2 SCSI_STAT_CHECK_CONDITION scsi_sense_data (hex) 70 0 2 0 0 0 0 a 0 0 0 0 3a 0 0 29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ASC/ASQ = 3a/0 Medium not present also mt rewind mt fsf bsf etc do a man on mt Cheers Mark :)