I have checked an double-checked and the tapes I use are not write-protected. In fact, when I attempt to label a write-protected tape, I receive the error "Read-only device"

As for the block size, the Linux SCSI tape driver is very flexible. Here are some exerpts from the README.st included with the kernel source:

The system manager (root) can define default values for some tape parameters, like block size and density using the MTSETDRVBUFFER ioctl. These parameters can be programmed to come into effect either when a new tape is loaded into the drive or if writing begins at the beginning of the tape.

The driver supports fixed and variable block size (within buffer limits).

In variable block mode, the byte count in write() determines the size of the physical block on tape. When reading, the drive reads the next tape block and returns to the user the data if the read() byte count is at least the block size. Otherwise, error ENOMEM is returned.

In fixed block mode, the data transfer between the drive and the driver is in multiples of the block size. The write() byte count must be a multiple of the block size. This is not required when reading but may be advisable for portability.

MTSETBLK Set the drive block size. Setting to zero sets the drive into variable block mode (if applicable).


Grepping through the Amanda source code, I do not see MTSETBLK or MTSETDRVBUFFER being used. I know that Amanda may use some external programs though, so maybe this block size issue is handled elsewhere?

In any case, I still have no idea why I'm getting an Invalid Argument. Please help!

Thanks,
Cory Visi



Marc Mengel <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]

05/01/2002 11:10 AM

       
        To:        Cory Visi <[EMAIL PROTECTED]>
        cc:        [EMAIL PROTECTED], (bcc: Cory Visi/Mazescape)
        Subject:        Re: Invalid Argument with amlabel



On Tue, 2002-04-30 at 21:28, Cory Visi wrote:
> I searched the list archives and read all the documentation and I cannot
> find this error anywhere.
>
> $ amlabel gcs DailySet1
> insert tape into slot 0 and press return
>
> labeling tape in slot 0 (/dev/nst0):
> rewinding, reading label, not an amanda tape
> rewinding, writing label DailySet1
> amlabel: writing label: Invalid argument
>
> Notice the "Invalid argument".

That would be an Invalid argument error number (errno) coming back from
the write to the tape drive.  Perhaps the system tape driver is
configured for some obtuse fixed block size or something?  Or maybe
the tapes are just write protected?

Marc
>
> I have a Seagate Python 04687 SCSI tape backup drive.
> I am using Amanda 2.4.2p2 which I compiled myself on the same machine,
> which is Linux 2.4.13 and glibc 2.2.2.
>
> The backup user is "backup". I am using "nst0" as my tape device and
> "backup" has permission to read/write:
>
> # ls -l /dev/nst0
> crw-rw----    1 root     disk       9, 128 Apr 14  2001 /dev/nst0
> # cat /etc/passwd | grep backup
> backup:x:417:6:Amanda Backup:/root/amanda-data:/bin/false
> # cat /etc/group | grep backup
> disk:x:6:root,backup
>
> Here is some of my amanda.conf:
>
> tpchanger "chg-manual"
> tapedev "/dev/nst0"
> changerfile "/root/amanda-data/changer-status"
> changerdev "/dev/null"
> tapetype DAT
> labelstr "^DailySet[0-9][0-9]*$"
> infofile "/root/amanda-data"
> logdir   "/var/log/amanda"
> indexdir "/root/amanda-data"
> tapelist "/root/amanda-data/tapelist"
>
> define tapetype DAT {
>         comment "Archive Python 04687-XXX"
>         length 4000 mbytes
>         filemark 100 kbytes
>         speed 800 kbytes
> }
>
> amcheck returns no errors except that the current loaded tape has no label:
>
> $ amcheck gcs
> Amanda Tape Server Host Check
> -----------------------------
> Holding disk /mnt/spare/var/amanda/: 1731365 KB disk space available,
> that's plenty
> insert tape into slot 1 and press return
>
> amcheck-server: slot 1: not an amanda tape
>
> I obviously need to label my tapes. Anyone have any ideas?
> Thanks,
> Cory Visi
>



Reply via email to