Re: Which blocksize do I need to set and where?

2013-12-17 Thread Jean-Louis Martineau

Tom,

You can define the block size as the BLOCK-SIZE device property in the 
changer section or in the tapetype, the device-property is used if it is 
set.


You can define the read_block_size as the READ-BLOCK-SIZE device 
property in the changer section or in the tapetype, the device-property 
is used if it is set.


The problem is the tape is already written with a block larger than 2048k.

dd if=/dev/rmt/0bn bs=512m count=1 of=/dev/null
should print the size of the block (if = 512m)

You can increase the value of the READ-BLOCK-SIZE device property, the 
readblocksize tapetype setting or simply use the '-f' flag of amlabel: 
amlabel -f weekly weekly00 slot 1


Jean-Louis


On 12/16/2013 08:01 PM, Tom Robinson wrote:

Amanda 3.3.3
OmniOS (OpenSolaris derivative)

Hi,

I've got an IBM TS3200 robot working with mtx. The raw mtx command sees the 
robot and tapes OK but
when I use amtape I get a 'block size too small' error.

The amlabel command also fails with:

$ amlabel weekly weekly00 slot 1
Reading label...
Error reading volume label: Error reading Amanda header: block size too small
Not writing label.

In amanda.conf I adjusted the blocksize and readblocksize but amanda is still 
not satisfied.

Which blocksize is amanda unhappy about and where can I successfully adjust the 
settings?

Kind regards,
Tom

in amanda.conf:

define changer robot {
 tpchanger chg-robot:/dev/scsi/changer/c1t5000E11156304003d1
 property tape-device 0=tape:/dev/rmt/0bn
 #property eject-before-unload yes
 property use-slots 1-23
 device-property BLOCK_SIZE 2048k
}
tapedev robot

tapetype ULT3580-TD5

define tapetype global {
 part_size 3G
 part_cache_type none
}

define tapetype ULT3580-TD5 {
 global
 comment Created by amtapetype; compression enabled
 length 1483907072 kbytes
 filemark 1820 kbytes
 speed 86133 kps
 blocksize 2048 kbytes
 readblocksize 2048 kbytes
}

$ mtx status
   Storage Changer /dev/scsi/changer/c1t5000E11156304003d1:1 Drives, 24 Slots ( 
1 Import/Export )
Data Transfer Element 0:Full (Storage Element 3 Loaded):VolumeTag = 050CHOL5
   Storage Element 1:Full :VolumeTag=WEEK00L5
   Storage Element 2:Full :VolumeTag=WEEK01L5
   Storage Element 3:Empty
   Storage Element 4:Full :VolumeTag=051CHOL5
   Storage Element 5:Full :VolumeTag=052CHOL5
   Storage Element 6:Full :VolumeTag=053CHOL5
   Storage Element 7:Full :VolumeTag=054CHOL5
   Storage Element 8:Empty
   Storage Element 9:Empty
   Storage Element 10:Empty
   Storage Element 11:Empty
   Storage Element 12:Empty
   Storage Element 13:Empty
   Storage Element 14:Empty
   Storage Element 15:Empty
   Storage Element 16:Empty
   Storage Element 17:Empty
   Storage Element 18:Empty
   Storage Element 19:Empty
   Storage Element 20:Empty
   Storage Element 21:Empty
   Storage Element 22:Empty
   Storage Element 23:Empty
   Storage Element 24 IMPORT/EXPORT:Empty

$ amtape weekly inventory
slot 1: Error reading Amanda header: block size too small barcode WEEK00L5
slot 2: Error reading Amanda header: block size too small barcode WEEK01L5
slot 3: label amtapetype-1255848847 barcode 050CHOL5 (in drive 0)
slot 4: Error reading Amanda header: block size too small barcode 051CHOL5
slot 5: Error reading Amanda header: block size too small barcode 052CHOL5
slot 6: Error reading Amanda header: block size too small barcode 053CHOL5
slot 7: Error reading Amanda header: block size too small barcode 054CHOL5 
(current)
slot 8: unknown state
slot 9: unknown state
slot 10: unknown state
slot 11: unknown state
slot 12: unknown state
slot 13: unknown state
slot 14: unknown state
slot 15: unknown state
slot 16: unknown state
slot 17: unknown state
slot 18: unknown state
slot 19: unknown state
slot 20: unknown state
slot 21: unknown state
slot 22: unknown state
slot 23: unknown state

amtape.20131217113945.debug:
Tue Dec 17 11:49:45 2013: thd-85d2400: amtape: pid 3379 ruid 33 euid 33 version 
3.3.3: start at Tue
Dec 17 11:49:45 2013
Tue Dec 17 11:49:45 2013: thd-85d2400: amtape: Arguments: weekly inventory
Tue Dec 17 11:49:45 2013: thd-85d2400: amtape: pid 3379 ruid 33 euid 33 version 
3.3.3: rename at Tue
Dec 17 11:49:45 2013
Tue Dec 17 11:49:45 2013: thd-85d2400: amtape: chg-robot: using statefile
'/var/opt/csw/amanda/chg-robot-dev-scsi-changer-c1t5000E11156304003d1'
Tue Dec 17 11:49:45 2013: thd-85d2400: amtape: invoking /opt/csw/sbin/mtx -f
/dev/scsi/changer/c1t5000E11156304003d1 status
Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx:   Storage Changer
/dev/scsi/changer/c1t5000E11156304003d1:1 Drives, 24 Slots ( 1 Import/Export )
Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Data Transfer Element 
0:Full (Storage Element 3
Loaded):VolumeTag = 050CHOL5
Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx:   Storage Element 1:Full
:VolumeTag=WEEK00L5
Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: 

Re: trouble with test restore

2013-12-17 Thread Jean-Louis Martineau

Michael,

On the server, the global tpchanger and tapedev are now synonymous, all 
setting must be put in the changer section.


On the client, only tapedev can be set, but you should set it to the 
name of the changer:

  tapedev  my_vtapes

Jean-Louis

On 12/16/2013 06:21 PM, Michael Stauffer wrote:

Hi Everyone,

I've gotten my focus back to this and sorted out my problems.

1) 'amrecover' on clients was unable to connect to server.
Turns out the server's firewall was blocking amanda's ports. Easy fix. 
Should have thought of this when the tutorial said to check the 
firewall on the clients which I did, but I forgot about the server.


2) 'amrecover' hangs as it tries to load a tape after 'extract' command:
I looked at the amidxtaped log on the server, and saw that the tape 
device name/file was not recognized/found. Turns out I had a different 
name defined for 'tpchanger' on the server set configuration, than for 
the clients' configuration. Changing the clients' configuration fixed 
this. I'm curious about the parameter naming - in the 
server's /etc/amanda/DailySet1/amanda.conf  file, I define


...
define changer my_vtapes {
tpchanger chg-disk:/amandatest/vtape/DailySet1
property num-slot 10
property auto-create-slot yes
}
tpchanger my_vtapes
...


And in the clients'  /etc/amanda/amanda-client.conf, it's

tapedev  chg-disk://amandatest/vtape/DailySet1  # your tape
device


Just curious where 'tapedev' gets mapped to 'tpchanger'.

-M


On Tue, Nov 26, 2013 at 9:04 AM, Debra S Baddorf badd...@fnal.gov 
mailto:badd...@fnal.gov wrote:


Recovery from server would work if it's the same type node as the
client (has to be able to run same version of system dump  able
to read the saved file). It would place the recovered files in
your current directory on the server, not on the client.

As for your client's new problem, I'm adding the Amanda-users back
into this reply cuz I can diagnose that from home. Hope someone
else can step in here.

Deb  (from phone)

On Nov 25, 2013, at 9:08 PM, Michael Stauffer
mgsta...@gmail.com mailto:mgsta...@gmail.com wrote:


Thanks Deb. I found an amrecover log but first this:

I realized I've been trying to recover from the server (i.e. run
amrecover on the server), and not the client as directed in the
tutorial (but shouldn't recovery from the server work too?).

Running amrecover on the client, I get this:

  [root@cslim ~]# amrecover DailySet1
  AMRECOVER Version 3.3.4. Contacting server on
cback.uphs.upenn.edu http://cback.uphs.upenn.edu ...
  [request failed: No route to host]

From the client (cslim) I can ping and ssh to the server (even
passwordless ssh now). I'm using bsdtcp for auth - is there some
other setup for that?

Thanks.

-M


On Mon, Nov 25, 2013 at 6:16 PM, Debra S Baddorf
badd...@fnal.gov mailto:badd...@fnal.gov wrote:



 xtracting files using tape drive
cback://amandatest/vtape/DailySet1 on host localhost.
 Load tape DailySet1-3 now
 Continue [?/Y/n/s/d]? y

 [this is where it just hangs up]

 --
 Other info:

 /var/log/amanda/log.error/  is empty

 (As an aside, there are a large multitude of various log
files - is there an amanda command that parses them all to
look for errors and reports them?)


Have you tried
  $  grep  -ir  DailySet1-3  /tmp/amanda/

(substitute if your logs aren't being sent to that directory)

There should also be a file  *amrecover*mmdd*   though
the hangup might be in a *taper*  file or something else like
that.

Those are some first steps, in case better info doesn't come
soon!
Deb Baddorf
Fermilab








Re: Which blocksize do I need to set and where?

2013-12-17 Thread Tom Robinson
Hi Jean-Louis,

Thanks for clarifying that. Interesting to see that the '-f' option for amlabel 
overrides the
readblocksize.

I got an error reading 512MiB but found a threshold at 1MiB where I could read 
the tape:
dd if=/dev/rmt/0bn bs=1024K count=1 of=/dev/null
0+1 records in
0+1 records out
32768 bytes (33 kB) copied, 0.0103029 s, 3.2 MB/s

This doesn't make sense as I had written to the tape 2MiB blocks using 
amtapetype previously:
$ amtapetype -f -b 2048k -t ULT3580-TD5 weekly /dev/rmt/0bn
Checking for FSF_AFTER_FILEMARK requirement
device-property FSF_AFTER_FILEMARK false
Applying heuristic check for compression.
Wrote random (uncompressible) data at 87839727.2131148 bytes/sec
Wrote fixed (compressible) data at 282011755.789474 bytes/sec
Compression: enabled
Writing one file to fill the volume.
Wrote 1519520841728 bytes at 86133 kb/sec
Writing smaller files (15193866240 bytes) to determine filemark.
define tapetype ULT3580-TD5 {
comment Created by amtapetype; compression enabled
length 1483907072 kbytes
filemark 1820 kbytes
speed 86133 kps
blocksize 2048 kbytes
}
# LEOM is not supported for this drive and kernel

I powered off, then on the tape unit and got this:
dd if=/dev/rmt/0bn bs=1024K count=1 of=/dev/null
0+1 records in
0+1 records out
1047552 bytes (1.0 MB) copied, 0.0172134 s, 60.9 MB/s

On further inspection I think I have a driver issue. I see this in my logs when 
I try to write with
blocksizes over 1MiB:

dd if=/dev/rmt/0b bs=1048577 count=1 of=/dev/null
dd: reading ‘/dev/rmt/0b’: Invalid argument
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.00532612 s, 0.0 kB/s

Dec 18 15:09:50 monza.motec.com.au scsi: [ID 107833 kern.notice]
/pci@0,0/pci8086,3c0a@3,2/pci1000,3020@0/iport@f/tape@w5000e11156304003,0 (st5):
Dec 18 15:09:50 monza.motec.com.au Read Write scsi_init_pkt() failure
Dec 18 15:09:50 monza.motec.com.au scsi: [ID 107833 kern.warning] WARNING:
/pci@0,0/pci8086,3c0a@3,2/pci1000,3020@0/iport@f/tape@w5000e11156304003,0 (st5):
Dec 18 15:09:50 monza.motec.com.au errors after pkt alloc (b_flags=0x2200065, 
b_error=0x16)

Any thoughts?

Kind regards,
Tom


On 18/12/13 01:14, Jean-Louis Martineau wrote:
 Tom,

 You can define the block size as the BLOCK-SIZE device property in the 
 changer section or in the
 tapetype, the device-property is used if it is set.

 You can define the read_block_size as the READ-BLOCK-SIZE device property in 
 the changer section
 or in the tapetype, the device-property is used if it is set.

 The problem is the tape is already written with a block larger than 2048k.

 dd if=/dev/rmt/0bn bs=512m count=1 of=/dev/null
 should print the size of the block (if = 512m)

 You can increase the value of the READ-BLOCK-SIZE device property, the 
 readblocksize tapetype
 setting or simply use the '-f' flag of amlabel: amlabel -f weekly weekly00 
 slot 1

 Jean-Louis


 On 12/16/2013 08:01 PM, Tom Robinson wrote:
 Amanda 3.3.3
 OmniOS (OpenSolaris derivative)

 Hi,

 I've got an IBM TS3200 robot working with mtx. The raw mtx command sees the 
 robot and tapes OK but
 when I use amtape I get a 'block size too small' error.

 The amlabel command also fails with:

 $ amlabel weekly weekly00 slot 1
 Reading label...
 Error reading volume label: Error reading Amanda header: block size too small
 Not writing label.

 In amanda.conf I adjusted the blocksize and readblocksize but amanda is 
 still not satisfied.

 Which blocksize is amanda unhappy about and where can I successfully adjust 
 the settings?

 Kind regards,
 Tom

 in amanda.conf:

 define changer robot {
 tpchanger chg-robot:/dev/scsi/changer/c1t5000E11156304003d1
 property tape-device 0=tape:/dev/rmt/0bn
 #property eject-before-unload yes
 property use-slots 1-23
 device-property BLOCK_SIZE 2048k
 }
 tapedev robot

 tapetype ULT3580-TD5

 define tapetype global {
 part_size 3G
 part_cache_type none
 }

 define tapetype ULT3580-TD5 {
 global
 comment Created by amtapetype; compression enabled
 length 1483907072 kbytes
 filemark 1820 kbytes
 speed 86133 kps
 blocksize 2048 kbytes
 readblocksize 2048 kbytes
 }

 $ mtx status
 Storage Changer /dev/scsi/changer/c1t5000E11156304003d1:1 Drives, 24 Slots ( 
 1 Import/Export )
 Data Transfer Element 0:Full (Storage Element 3 Loaded):VolumeTag = 050CHOL5
 Storage Element 1:Full :VolumeTag=WEEK00L5
 Storage Element 2:Full :VolumeTag=WEEK01L5
 Storage Element 3:Empty
 Storage Element 4:Full :VolumeTag=051CHOL5
 Storage Element 5:Full :VolumeTag=052CHOL5
 Storage Element 6:Full :VolumeTag=053CHOL5
 Storage Element 7:Full :VolumeTag=054CHOL5
 Storage Element 8:Empty
 Storage Element 9:Empty
 Storage Element 10:Empty
 Storage Element 11:Empty
 Storage Element 12:Empty
 Storage Element 13:Empty
 Storage Element 14:Empty
 Storage Element 15:Empty
 Storage Element 16:Empty
 Storage Element 17:Empty
 Storage Element 18:Empty
 Storage Element 19:Empty
 Storage Element 20:Empty
 Storage Element 21:Empty
 Storage Element 22:Empty
 Storage Element 23:Empty
 Storage Element 24