i7:~ # mt -f /dev/nst0 rewind; mt -f /dev/nst0 weof; mt -f /dev/nst0 rewind ############################################################################# ## set Maximum Block Size = 64412 in bareos-sd.conf ############################################################################# i7:~ # bareos-sd -f -d 200 bareos-sd (90): stored_conf.c:837-0 Inserting Director res: i7-mon bareos-sd (90): stored_conf.c:837-0 Inserting Device res: FileStorage i7-sd (100): jcr.c:141-0 read_last_jobs seek to 192 i7-sd (100): jcr.c:148-0 Read num_items=10 i7-sd (8): crypto_cache.c:55-0 Could not open crypto cache file. /var/lib/bareos/bareos-sd.9103.cryptoc ERR=No such file or directory i7-sd (10): socket_server.c:112-0 stored: listening on port 9103 i7-sd (100): bnet_server_tcp.c:166-0 Addresses host[ipv4;0.0.0.0;9103] i7-sd (90): stored.c:643-0 calling init_dev /dev/nst0 i7-sd (100): sd_backends.c:112-0 init_backend_dev: testing backend /usr/lib64/bareos/backends/libbareossd-tape.so i7-sd (100): dev.c:393-0 init_dev: tape=1 dev_name=/dev/nst0 i7-sd (100): dev.c:395-0 dev=/dev/nst0 dev_max_bs=64412 max_bs=64412 i7-sd (10): stored.c:645-0 SD init done /dev/nst0 i7-sd (100): block.c:130-0 created new block of blocksize 64412 (dev->max_block_size) i7-sd (20): stored.c:664-0 calling first_open_device "LTO-2" (/dev/nst0) i7-sd (120): device.c:266-0 start open_output_device() i7-sd (129): device.c:285-0 Opening device. i7-sd (100): dev.c:561-0 open dev: type=2 dev_name="LTO-2" (/dev/nst0) vol= mode=OPEN_READ_ONLY i7-sd (100): dev.c:572-0 call open_device mode=OPEN_READ_ONLY i7-sd (190): dev.c:1006-0 Enter mount i7-sd (100): generic_tape_device.c:49-0 Open dev: device is tape i7-sd (100): generic_tape_device.c:60-0 Try open "LTO-2" (/dev/nst0) mode=OPEN_READ_ONLY i7-sd (100): generic_tape_device.c:88-0 Rewind after open i7-sd (100): generic_tape_device.c:996-0 In set_os_device_parameters i7-sd (100): generic_tape_device.c:1018-0 MTSETDRVBUFFER i7-sd (100): generic_tape_device.c:144-0 open dev: tape 4 opened i7-sd (100): dev.c:580-0 preserve=0x268a0dc0 fd=4 i7-sd (129): device.c:291-0 open dev "LTO-2" (/dev/nst0) OK i7-sd (100): dev.c:502-0 setting minblocksize to 64512, maxblocksize to label_block_size=64512, on device "LTO-2" (/dev/nst0) i7-sd (100): block.c:130-0 created new block of blocksize 64512 (dev->max_block_size) i7-sd (100): dev.c:515-0 created new block of buf_len: 64512 on device "LTO-2" (/dev/nst0) i7-sd (100): label.c:76-0 Enter read_volume_label res=0 device="LTO-2" (/dev/nst0) vol= dev_Vol=*NULL* max_blocksize=64512 i7-sd (130): label.c:140-0 Big if statement in read_volume_label i7-sd (130): label.c:145-0 Requested Volume "" on "LTO-2" (/dev/nst0) is not a Bareos labeled Volume, because: ERR=block.c:1021 Read zero bytes at 0:0 on device "LTO-2" (/dev/nst0). i7-sd (100): label.c:173-0 No volume label - bailing out i7-sd (150): label.c:287-0 return 3 i7-sd (90): stored.c:643-0 calling init_dev /storage/---backup i7-sd (100): dev.c:393-0 init_dev: tape=0 dev_name=/storage/---backup i7-sd (100): dev.c:395-0 dev=/storage/---backup dev_max_bs=0 max_bs=0 i7-sd (10): stored.c:645-0 SD init done /storage/---backup i7-sd (100): block.c:127-0 created new block of blocksize 64512 (dev->device->label_block_size) as dev->max_block_size is zero i7-sd (200): job.c:457-0 Start stored free_jcr i7-sd (200): job.c:584-0 End stored free_jcr ############################################################################# ## (run bconsole and label) Result pasted here ############################################################################# i7:~ # bconsole Connecting to Director i7:9101 1000 OK: i7-dir Version: 15.2.2 (16 November 2015) Enter a period to cancel a command. *label storage=LTO-2 volume=BackupTape1 pool=DailyPool Automatically selected Catalog: MyCatalog Using Catalog "MyCatalog" Connecting to Storage daemon LTO-2 at i7:9103 ... Sending label command for Volume "BackupTape1" Slot 0 ... dev.c:466 Max block size 64412 not multiple of device "LTO-2" (/dev/nst0) block size=1024. block.c:630 Write error at 0:0 on device "LTO-2" (/dev/nst0). ERR=Invalid argument. block.c:644 Write error on fd=4 at file:blk 0:0 on device "LTO-2" (/dev/nst0). ERR=Invalid argument. Backspace record at EOT failed. ERR=Input/output error 3912 Failed to label Volume: ERR=generic_tape_device.c:726 ioctl MTBSR error on "LTO-2" (/dev/nst0). ERR=Input/output error. Label command failed for Volume BackupTape1. Do not forget to mount the drive!!! * ############################################################################# ## (end of bconsole paste) ############################################################################# ############################################################################# ## journalctl output happening at the same time: ############################################################################# Jan 08 15:05:18 i7 kernel: st 8:0:3:0: [st0] Write not multiple of tape block size. ############################################################################# ## (end of journalctl output), continuing with the output of bareos-sd: ############################################################################# i7-sd (110): socket_server.c:79-0 Conn: Hello Director i7-dir calling i7-sd (110): socket_server.c:97-0 Got a DIR connection at 08-Jan-2016 15:05:10 i7-sd (50): cram-md5.c:68-0 send: auth cram-md5 <780510422.1452258310@i7-sd> ssl=0 i7-sd (100): cram-md5.c:123-0 cram-get received: auth cram-md5 <1934464832.1452258310@i7-dir> ssl=0 i7-sd (99): cram-md5.c:143-0 sending resp to challenge: O7YTURQCI8+5SlBwe6gD8C i7-sd (90): dir_cmd.c:256-0 Message channel init completed. i7-sd (199): dir_cmd.c:267-0 device->label_block_size) as dev->max_block_size is zero i7-sd (100): dev.c:432-0 Device "LTO-2" (/dev/nst0) has dev->device->max_block_size of 64412 and dev->max_block_size of 0, dcr->VolMaxBlocksize is 0 i7-sd (100): dev.c:437-0 setting dev->max_block_size to dev->device->max_block_size=64412 on device "LTO-2" (/dev/nst0) because dcr->VolMaxBlocksize is 0 i7-sd (100): dev.c:474-0 set minblocksize to 0, maxblocksize to 64412 on device "LTO-2" (/dev/nst0) i7-sd (100): dev.c:483-0 created new block of buf_len: 64412 on device "LTO-2" (/dev/nst0) i7-sd (100): block.c:130-0 created new block of blocksize 64412 (dev->max_block_size) i7-sd (100): dev.c:487-0 created new block of buf_len: 64412 on device "LTO-2" (/dev/nst0), freeing block i7-sd (100): dir_cmd.c:666-0 Stole device "LTO-2" (/dev/nst0) lock, writing label. i7-sd (90): dir_cmd.c:668-0 try_autoload_device - looking for volume_info i7-sd (100): autochanger.c:99-0 Device "LTO-2" (/dev/nst0) is not an autochanger i7-sd (100): dev.c:544-0 Close fd for mode change. i7-sd (100): dev.c:561-0 open dev: type=2 dev_name="LTO-2" (/dev/nst0) vol=BackupTape1 mode=OPEN_READ_WRITE i7-sd (100): dev.c:572-0 call open_device mode=OPEN_READ_WRITE i7-sd (190): dev.c:1006-0 Enter mount i7-sd (100): generic_tape_device.c:49-0 Open dev: device is tape i7-sd (100): generic_tape_device.c:60-0 Try open "LTO-2" (/dev/nst0) mode=OPEN_READ_WRITE i7-sd (100): generic_tape_device.c:88-0 Rewind after open i7-sd (100): generic_tape_device.c:996-0 In set_os_device_parameters i7-sd (100): generic_tape_device.c:1018-0 MTSETDRVBUFFER i7-sd (100): generic_tape_device.c:144-0 open dev: tape 4 opened i7-sd (100): dev.c:580-0 preserve=0x268a0b10 fd=4 i7-sd (100): dev.c:502-0 setting minblocksize to 64512, maxblocksize to label_block_size=64512, on device "LTO-2" (/dev/nst0) i7-sd (100): block.c:130-0 created new block of blocksize 64512 (dev->max_block_size) i7-sd (100): dev.c:515-0 created new block of buf_len: 64512 on device "LTO-2" (/dev/nst0) i7-sd (100): label.c:76-0 Enter read_volume_label res=0 device="LTO-2" (/dev/nst0) vol=BackupTape1 dev_Vol=*NULL* max_blocksize=64512 i7-sd (130): label.c:140-0 Big if statement in read_volume_label i7-sd (130): label.c:145-0 Requested Volume "BackupTape1" on "LTO-2" (/dev/nst0) is not a Bareos labeled Volume, because: ERR=block.c:1021 Read zero bytes at 0:0 on device "LTO-2" (/dev/nst0). i7-sd (100): label.c:173-0 No volume label - bailing out i7-sd (150): label.c:287-0 return 3 i7-sd (100): dev.c:502-0 setting minblocksize to 64512, maxblocksize to label_block_size=64512, on device "LTO-2" (/dev/nst0) i7-sd (150): label.c:348-0 write_volume_label() i7-sd (150): label.c:367-0 New VolName=BackupTape1 i7-sd (150): label.c:378-0 Label type=0 i7-sd (130): label.c:689-0 Start create_volume_label() i7-sd (100): dev.c:921-0 Clear volhdr vol= Volume Label: Id : Bareos 2.0 immortal VerNo : 20 VolName : BackupTape1 PrevVolName : VolFile : 0 LabelType : PRE_LABEL LabelSize : 0 PoolName : DailyPool MediaType : LTO-2 PoolType : Backup HostName : i7 Date label written: 08-Jan-2016 15:05 i7-sd (150): label.c:679-0 Created Vol label rec: FI=PRE_LABEL len=158 i7-sd (130): label.c:426-0 Wrote label of 158 bytes to "LTO-2" (/dev/nst0) i7-sd (130): label.c:430-0 Call write_block_to_dev() i7-sd (100): block.c:659-0 === Write error. fd=4 size=194 rtn=-1 dev_blk=0 blk_blk=0 errno=22: ERR=Invalid argument i7-sd (129): generic_tape_device.c:368-0 === weof_dev="LTO-2" (/dev/nst0) i7-sd (50): block.c:839-0 dir_update_volume_info terminate writing -- OK i7-sd (50): block.c:867-0 *** Leave terminate_writing_volume -- OK i7-sd (100): generic_tape_device.c:608-0 bsf i7-sd (100): generic_tape_device.c:714-0 bsr_dev i7-sd (130): label.c:432-0 Bad Label write on "LTO-2" (/dev/nst0): ERR=generic_tape_device.c:726 ioctl MTBSR error on "LTO-2" (/dev/nst0). ERR=Input/output error. i7-sd (150): vol_mgr.c:705-0 vol_unused: no vol on "LTO-2" (/dev/nst0) i7-sd (100): dev.c:921-0 Clear volhdr vol=BackupTape1 i7-sd (150): vol_mgr.c:705-0 vol_unused: no vol on "LTO-2" (/dev/nst0) i7-sd (200): job.c:457-0 Start stored free_jcr i7-sd (200): job.c:584-0 End stored free_jcr ^C ############################################################################# ## set Maximum Block Size = 32768 in bareos-sd.conf ############################################################################# i7:~ # bareos-sd -f -d 200 bareos-sd (90): stored_conf.c:837-0 Inserting Director res: i7-mon bareos-sd (90): stored_conf.c:837-0 Inserting Device res: FileStorage i7-sd (100): jcr.c:141-0 read_last_jobs seek to 192 i7-sd (100): jcr.c:148-0 Read num_items=10 i7-sd (8): crypto_cache.c:55-0 Could not open crypto cache file. /var/lib/bareos/bareos-sd.9103.cryptoc ERR=No such file or directory i7-sd (10): socket_server.c:112-0 stored: listening on port 9103 i7-sd (100): bnet_server_tcp.c:166-0 Addresses host[ipv4;0.0.0.0;9103] i7-sd (90): stored.c:643-0 calling init_dev /dev/nst0 i7-sd (100): sd_backends.c:112-0 init_backend_dev: testing backend /usr/lib64/bareos/backends/libbareossd-tape.so i7-sd (100): dev.c:393-0 init_dev: tape=1 dev_name=/dev/nst0 i7-sd (100): dev.c:395-0 dev=/dev/nst0 dev_max_bs=32768 max_bs=32768 i7-sd (10): stored.c:645-0 SD init done /dev/nst0 i7-sd (100): block.c:130-0 created new block of blocksize 32768 (dev->max_block_size) i7-sd (20): stored.c:664-0 calling first_open_device "LTO-2" (/dev/nst0) i7-sd (120): device.c:266-0 start open_output_device() i7-sd (129): device.c:285-0 Opening device. i7-sd (100): dev.c:561-0 open dev: type=2 dev_name="LTO-2" (/dev/nst0) vol= mode=OPEN_READ_ONLY i7-sd (100): dev.c:572-0 call open_device mode=OPEN_READ_ONLY i7-sd (190): dev.c:1006-0 Enter mount i7-sd (100): generic_tape_device.c:49-0 Open dev: device is tape i7-sd (100): generic_tape_device.c:60-0 Try open "LTO-2" (/dev/nst0) mode=OPEN_READ_ONLY i7-sd (100): generic_tape_device.c:88-0 Rewind after open i7-sd (100): generic_tape_device.c:996-0 In set_os_device_parameters i7-sd (100): generic_tape_device.c:1018-0 MTSETDRVBUFFER i7-sd (100): generic_tape_device.c:144-0 open dev: tape 4 opened i7-sd (100): dev.c:580-0 preserve=0x88ceedc0 fd=4 i7-sd (129): device.c:291-0 open dev "LTO-2" (/dev/nst0) OK i7-sd (100): dev.c:502-0 setting minblocksize to 64512, maxblocksize to label_block_size=64512, on device "LTO-2" (/dev/nst0) i7-sd (100): block.c:130-0 created new block of blocksize 64512 (dev->max_block_size) i7-sd (100): dev.c:515-0 created new block of buf_len: 64512 on device "LTO-2" (/dev/nst0) i7-sd (100): label.c:76-0 Enter read_volume_label res=0 device="LTO-2" (/dev/nst0) vol= dev_Vol=*NULL* max_blocksize=64512 i7-sd (130): label.c:140-0 Big if statement in read_volume_label i7-sd (130): label.c:145-0 Requested Volume "" on "LTO-2" (/dev/nst0) is not a Bareos labeled Volume, because: ERR=block.c:1021 Read zero bytes at 0:0 on device "LTO-2" (/dev/nst0). i7-sd (100): label.c:173-0 No volume label - bailing out i7-sd (150): label.c:287-0 return 3 i7-sd (90): stored.c:643-0 calling init_dev /storage/---backup i7-sd (100): dev.c:393-0 init_dev: tape=0 dev_name=/storage/---backup i7-sd (100): dev.c:395-0 dev=/storage/---backup dev_max_bs=0 max_bs=0 i7-sd (10): stored.c:645-0 SD init done /storage/---backup i7-sd (100): block.c:127-0 created new block of blocksize 64512 (dev->device->label_block_size) as dev->max_block_size is zero i7-sd (200): job.c:457-0 Start stored free_jcr i7-sd (200): job.c:584-0 End stored free_jcr ############################################################################# ## (run bconsole and label) Result pasted here ############################################################################# i7:~ # bconsole Connecting to Director i7:9101 1000 OK: i7-dir Version: 15.2.2 (16 November 2015) Enter a period to cancel a command. *label storage=LTO-2 volume=BackupTape1 pool=DailyPool Automatically selected Catalog: MyCatalog Using Catalog "MyCatalog" Connecting to Storage daemon LTO-2 at i7:9103 ... Sending label command for Volume "BackupTape1" Slot 0 ... block.c:630 Write error at 0:0 on device "LTO-2" (/dev/nst0). ERR=Invalid argument. block.c:644 Write error on fd=4 at file:blk 0:0 on device "LTO-2" (/dev/nst0). ERR=Invalid argument. Backspace record at EOT failed. ERR=Input/output error 3912 Failed to label Volume: ERR=generic_tape_device.c:726 ioctl MTBSR error on "LTO-2" (/dev/nst0). ERR=Input/output error. Label command failed for Volume BackupTape1. Do not forget to mount the drive!!! * ############################################################################# ## (end of bconsole paste) ############################################################################# ############################################################################# ## journalctl output happening at the same time: ############################################################################# Jan 08 15:07:37 i7 kernel: st 8:0:3:0: [st0] Write not multiple of tape block size. ############################################################################# ## (end of journalctl output), continuing with the output of bareos-sd: ############################################################################# i7-sd (110): socket_server.c:79-0 Conn: Hello Director i7-dir calling i7-sd (110): socket_server.c:97-0 Got a DIR connection at 08-Jan-2016 15:07:29 i7-sd (50): cram-md5.c:68-0 send: auth cram-md5 <705195071.1452258449@i7-sd> ssl=0 i7-sd (100): cram-md5.c:123-0 cram-get received: auth cram-md5 <1146755885.1452258449@i7-dir> ssl=0 i7-sd (99): cram-md5.c:143-0 sending resp to challenge: w9+rqm+m55MdG8cymD/b3A i7-sd (90): dir_cmd.c:256-0 Message channel init completed. i7-sd (199): dir_cmd.c:267-0 device->label_block_size) as dev->max_block_size is zero i7-sd (100): dev.c:432-0 Device "LTO-2" (/dev/nst0) has dev->device->max_block_size of 32768 and dev->max_block_size of 0, dcr->VolMaxBlocksize is 0 i7-sd (100): dev.c:437-0 setting dev->max_block_size to dev->device->max_block_size=32768 on device "LTO-2" (/dev/nst0) because dcr->VolMaxBlocksize is 0 i7-sd (100): dev.c:474-0 set minblocksize to 0, maxblocksize to 32768 on device "LTO-2" (/dev/nst0) i7-sd (100): dev.c:483-0 created new block of buf_len: 32768 on device "LTO-2" (/dev/nst0) i7-sd (100): block.c:130-0 created new block of blocksize 32768 (dev->max_block_size) i7-sd (100): dev.c:487-0 created new block of buf_len: 32768 on device "LTO-2" (/dev/nst0), freeing block i7-sd (100): dir_cmd.c:666-0 Stole device "LTO-2" (/dev/nst0) lock, writing label. i7-sd (90): dir_cmd.c:668-0 try_autoload_device - looking for volume_info i7-sd (100): autochanger.c:99-0 Device "LTO-2" (/dev/nst0) is not an autochanger i7-sd (100): dev.c:544-0 Close fd for mode change. i7-sd (100): dev.c:561-0 open dev: type=2 dev_name="LTO-2" (/dev/nst0) vol=BackupTape1 mode=OPEN_READ_WRITE i7-sd (100): dev.c:572-0 call open_device mode=OPEN_READ_WRITE i7-sd (190): dev.c:1006-0 Enter mount i7-sd (100): generic_tape_device.c:49-0 Open dev: device is tape i7-sd (100): generic_tape_device.c:60-0 Try open "LTO-2" (/dev/nst0) mode=OPEN_READ_WRITE i7-sd (100): generic_tape_device.c:88-0 Rewind after open i7-sd (100): generic_tape_device.c:996-0 In set_os_device_parameters i7-sd (100): generic_tape_device.c:1018-0 MTSETDRVBUFFER i7-sd (100): generic_tape_device.c:144-0 open dev: tape 4 opened i7-sd (100): dev.c:580-0 preserve=0x88ceeb10 fd=4 i7-sd (100): dev.c:502-0 setting minblocksize to 64512, maxblocksize to label_block_size=64512, on device "LTO-2" (/dev/nst0) i7-sd (100): block.c:130-0 created new block of blocksize 64512 (dev->max_block_size) i7-sd (100): dev.c:515-0 created new block of buf_len: 64512 on device "LTO-2" (/dev/nst0) i7-sd (100): label.c:76-0 Enter read_volume_label res=0 device="LTO-2" (/dev/nst0) vol=BackupTape1 dev_Vol=*NULL* max_blocksize=64512 i7-sd (130): label.c:140-0 Big if statement in read_volume_label i7-sd (130): label.c:145-0 Requested Volume "BackupTape1" on "LTO-2" (/dev/nst0) is not a Bareos labeled Volume, because: ERR=block.c:1021 Read zero bytes at 0:0 on device "LTO-2" (/dev/nst0). i7-sd (100): label.c:173-0 No volume label - bailing out i7-sd (150): label.c:287-0 return 3 i7-sd (100): dev.c:502-0 setting minblocksize to 64512, maxblocksize to label_block_size=64512, on device "LTO-2" (/dev/nst0) i7-sd (150): label.c:348-0 write_volume_label() i7-sd (150): label.c:367-0 New VolName=BackupTape1 i7-sd (150): label.c:378-0 Label type=0 i7-sd (130): label.c:689-0 Start create_volume_label() i7-sd (100): dev.c:921-0 Clear volhdr vol= Volume Label: Id : Bareos 2.0 immortal VerNo : 20 VolName : BackupTape1 PrevVolName : VolFile : 0 LabelType : PRE_LABEL LabelSize : 0 PoolName : DailyPool MediaType : LTO-2 PoolType : Backup HostName : i7 Date label written: 08-Jan-2016 15:07 i7-sd (150): label.c:679-0 Created Vol label rec: FI=PRE_LABEL len=158 i7-sd (130): label.c:426-0 Wrote label of 158 bytes to "LTO-2" (/dev/nst0) i7-sd (130): label.c:430-0 Call write_block_to_dev() i7-sd (100): block.c:659-0 === Write error. fd=4 size=194 rtn=-1 dev_blk=0 blk_blk=0 errno=22: ERR=Invalid argument i7-sd (129): generic_tape_device.c:368-0 === weof_dev="LTO-2" (/dev/nst0) i7-sd (50): block.c:839-0 dir_update_volume_info terminate writing -- OK i7-sd (50): block.c:867-0 *** Leave terminate_writing_volume -- OK i7-sd (100): generic_tape_device.c:608-0 bsf i7-sd (100): generic_tape_device.c:714-0 bsr_dev i7-sd (130): label.c:432-0 Bad Label write on "LTO-2" (/dev/nst0): ERR=generic_tape_device.c:726 ioctl MTBSR error on "LTO-2" (/dev/nst0). ERR=Input/output error. i7-sd (150): vol_mgr.c:705-0 vol_unused: no vol on "LTO-2" (/dev/nst0) i7-sd (100): dev.c:921-0 Clear volhdr vol=BackupTape1 i7-sd (150): vol_mgr.c:705-0 vol_unused: no vol on "LTO-2" (/dev/nst0) i7-sd (200): job.c:457-0 Start stored free_jcr i7-sd (200): job.c:584-0 End stored free_jcr ^C i7:~ #