markh794 / mhvtl

Linux based Virtual Tape Library
http://sites.google.com/site/linuxvtl2/
Other
137 stars 65 forks source link

mhvtl not creating library contents in /opt/mhvtl #109

Closed superbarney closed 1 year ago

superbarney commented 1 year ago

I cannot get mhvtl to create the 'tapes' in /opt/mhvtl for some reason.

I'm using the latest version from git (2022-10-13). AlmaLinux 8.6.

I have the following configuration:

#
# mhvtl.conf
#

# Home directory for tape emulation files
MHVTL_HOME_PATH=/opt/mhvtl

# Default media capacity (500 M)
CAPACITY=100

# Set default verbosity [0|1|2|3]
VERBOSE=1

# Set kernel module debugging [0|1]
VTL_DEBUG=0

# vtltape and vtllibrary debugging [Blank or -d]
#DAEMON_DEBUG=-d

device.conf

VERSION: 5

Library: 10 CHANNEL: 00 TARGET: 00 LUN: 00
 Vendor identification: STK
 Product identification: L700
 Unit serial number: XYZZY_A
 NAA: 10:22:33:44:ab:00:00:00
 Home directory: /opt/mhvtl
 PERSIST: False
 Backoff: 400

Drive: 11 CHANNEL: 00 TARGET: 01 LUN: 00
 Library ID: 10 Slot: 01
 Vendor identification: IBM
 Product identification: ULT3580-TD8
 Unit serial number: XYZZY_A1
 NAA: 10:22:33:44:ab:00:01:00
 Compression: factor 1 enabled 1
 Compression type: lzo
 Backoff: 400

Drive: 12 CHANNEL: 00 TARGET: 02 LUN: 00
 Library ID: 10 Slot: 02
 Vendor identification: IBM
 Product identification: ULT3580-TD8
 Unit serial number: XYZZY_A2
 NAA: 10:22:33:44:ab:00:02:00
 Compression: factor 1 enabled 1
 Compression type: lzo
 Backoff: 400

Library: 40 CHANNEL: 02 TARGET: 07 LUN: 00
 Vendor identification: STK
 Product identification: L700
 Unit serial number: CCZZY_X
 NAA: 40:22:33:44:ab:02:07:00
 Home directory: /opt/mhvtl
 PERSIST: False
 Backoff: 400

Drive: 41 CHANNEL: 02 TARGET: 08 LUN: 00
 Library ID: 40 Slot: 01
 Vendor identification: IBM
 Product identification: ULT3580-TD6
 Unit serial number: CCZZY_X1
 NAA: 40:22:33:44:ab:02:08:00
 Compression: factor 1 enabled 1
 Compression type: lzo
 Backoff: 400

Drive: 42 CHANNEL: 02 TARGET: 09 LUN: 00
 Library ID: 40 Slot: 02
 Vendor identification: IBM
 Product identification: ULT3580-TD6
 Unit serial number: CCZZY_X2
 NAA: 40:22:33:44:ab:02:09:00
 Compression: factor 1 enabled 1
 Compression type: lzo
 Backoff: 400

library_contents.10

VERSION: 2

Drive 1:
Drive 2:

Picker 1:

MAP 1:
MAP 2:
MAP 3:
MAP 4:

Slot 1: E01001L8
Slot 2: E01002L8
Slot 3: E01003L8
Slot 4: E01004L8
Slot 5: E01005L8
Slot 6: E01006L8
Slot 7: E01007L8
Slot 8: E01008L8
Slot 9: E01009L8
Slot 10: E01010L8
Slot 11: E01011L8
Slot 12: E01012L8
Slot 13: E01013L8
Slot 14: E01014L8
Slot 15: E01015L8
Slot 16: E01016L8
Slot 17: E01017L8
Slot 18: E01018L8
Slot 19: E01019L8
Slot 20: E01020L8
Slot 21:
Slot 22:
Slot 23:
Slot 24:
Slot 25:
Slot 26:
Slot 27:
Slot 28:
Slot 29:
Slot 30: F01030L8
Slot 31: F01031L8
Slot 32: F01032L8
Slot 33: F01033L8
Slot 34: F01034L8
Slot 35: F01035L8
Slot 36: F01036L8
Slot 37: F01037L8
Slot 38: F01038L8
Slot 39: F01039L8

library_contents.40

VERSION: 2

Drive 1:
Drive 2:

Picker 1:

MAP 1:
MAP 2:
MAP 3:
MAP 4:

Slot 1: V01001L6
Slot 2: V01002L6
Slot 3: V01003L6
Slot 4: V01004L6
Slot 5: V01005L6
Slot 6: V01006L6
Slot 7: V01007L6
Slot 8: V01008L6
Slot 9: V01009L6
Slot 10: V01010L6
Slot 11: V01011L6
Slot 12: V01012L6
Slot 13: V01013L6
Slot 14: V01014L6
Slot 15: V01015L6
Slot 16: V01016L6
Slot 17: V01017L6
Slot 18: V01018L6
Slot 19: V01019L6
Slot 20: V01020L6
Slot 21:
Slot 22:
Slot 23:
Slot 24:
Slot 25:
Slot 26:
Slot 27:
Slot 28:
Slot 29:
Slot 30: X01030L6
Slot 31: X01031L6
Slot 32: X01032L6
Slot 33: X01033L6
Slot 34: X01034L6
Slot 35: X01035L6
Slot 36: X01036L6
Slot 37: X01037L6
Slot 38: X01038L6
Slot 39: X01039L6

The drives are shown in lsscsi

root@al {~}# lsscsi -g
[0:0:0:0]    disk    QEMU     QEMU HARDDISK    2.5+  /dev/sda   /dev/sg0
[2:0:0:0]    cd/dvd  QEMU     QEMU DVD-ROM     2.5+  /dev/sr0   /dev/sg1
[3:0:0:0]    mediumx STK      L700             0107  -          /dev/sg7
[3:0:1:0]    tape    IBM      ULT3580-TD8      0107  /dev/st0   /dev/sg2
[3:0:2:0]    tape    IBM      ULT3580-TD8      0107  /dev/st1   /dev/sg3
[3:2:7:0]    mediumx STK      L700             0107  -          /dev/sg6
[3:2:8:0]    tape    IBM      ULT3580-TD6      0107  /dev/st3   /dev/sg5
[3:2:9:0]    tape    IBM      ULT3580-TD6      0107  /dev/st2   /dev/sg4

The contents of /opt/mhvtl is what gets created during make install

root@al {~}# \ls /opt/mhvtl
CLN101L8  E01001L8  E01004L8  E01007L8  E01010L8  E01013L8  E01016L8  E01019L8  F01031L6  F01034L6  F01037L6  G03001TA  G03004TA  G03007TA  G03010TA  G03013TA  G03016TA  G03019TA  G03022TA  G03025TA  G03028TA  G03031TA  G03034TA  G03037TA
CLN102L6  E01002L8  E01005L8  E01008L8  E01011L8  E01014L8  E01017L8  E01020L8  F01032L6  F01035L6  F01038L6  G03002TA  G03005TA  G03008TA  G03011TA  G03014TA  G03017TA  G03020TA  G03023TA  G03026TA  G03029TA  G03032TA  G03035TA  G03038TA
CLN303TA  E01003L8  E01006L8  E01009L8  E01012L8  E01015L8  E01018L8  F01030L6  F01033L6  F01036L6  F01039L6  G03003TA  G03006TA  G03009TA  G03012TA  G03015TA  G03018TA  G03021TA  G03024TA  G03027TA  G03030TA  G03033TA  G03036TA  G03039TA

I have tried deleting the contents of /opt/mhvtl and running generate_library_contents. It runs OK with no errors reported but no tapes that are in library_contents.* were generated.

root@al {~}# generate_library_contents
===> Generating: ./library_contents.10 ...
===> Generating: ./library_contents.40 ...

Running make_vtl_media after that

root@al {/etc/mhvtl}# make_vtl_media -C /etc/mhvtl

root@sal8ids {/etc/mhvtl}# make_vtl_media -C /etc/mhvtl
===> Reading from /etc/mhvtl/device.conf file to find Tape Libraries and Drives ...
===> Scanning for 'Slot' entries in /etc/mhvtl/library_contents.10 ...
Directory already exists: /opt/mhvtl/E01001L8: skipping
Directory already exists: /opt/mhvtl/E01002L8: skipping
Directory already exists: /opt/mhvtl/E01003L8: skipping
Directory already exists: /opt/mhvtl/E01004L8: skipping
Directory already exists: /opt/mhvtl/E01005L8: skipping
Directory already exists: /opt/mhvtl/E01006L8: skipping
Directory already exists: /opt/mhvtl/E01007L8: skipping
Directory already exists: /opt/mhvtl/E01008L8: skipping
Directory already exists: /opt/mhvtl/E01009L8: skipping
Directory already exists: /opt/mhvtl/E01010L8: skipping
Directory already exists: /opt/mhvtl/E01011L8: skipping
Directory already exists: /opt/mhvtl/E01012L8: skipping
Directory already exists: /opt/mhvtl/E01013L8: skipping
Directory already exists: /opt/mhvtl/E01014L8: skipping
Directory already exists: /opt/mhvtl/E01015L8: skipping
Directory already exists: /opt/mhvtl/E01016L8: skipping
Directory already exists: /opt/mhvtl/E01017L8: skipping
Directory already exists: /opt/mhvtl/E01018L8: skipping
Directory already exists: /opt/mhvtl/E01019L8: skipping
Directory already exists: /opt/mhvtl/E01020L8: skipping
===> Creating entry: /opt/mhvtl/F01030L8 ...
Creating tape data ...
Creating new media directory: /opt/mhvtl/F01030L8
Creating new media data file: /opt/mhvtl/F01030L8/data
Creating new media index file: /opt/mhvtl/F01030L8/indx
Creating new media meta file: /opt/mhvtl/F01030L8/meta
mktape: create_tape(): /opt/mhvtl/F01030L8 files created
===> Creating entry: /opt/mhvtl/F01031L8 ...
Creating tape data ...
Creating new media directory: /opt/mhvtl/F01031L8
Creating new media data file: /opt/mhvtl/F01031L8/data
Creating new media index file: /opt/mhvtl/F01031L8/indx
Creating new media meta file: /opt/mhvtl/F01031L8/meta
mktape: create_tape(): /opt/mhvtl/F01031L8 files created
===> Creating entry: /opt/mhvtl/F01032L8 ...
Creating tape data ...
Creating new media directory: /opt/mhvtl/F01032L8
Creating new media data file: /opt/mhvtl/F01032L8/data
Creating new media index file: /opt/mhvtl/F01032L8/indx
Creating new media meta file: /opt/mhvtl/F01032L8/meta
mktape: create_tape(): /opt/mhvtl/F01032L8 files created
===> Creating entry: /opt/mhvtl/F01033L8 ...
Creating tape data ...
Creating new media directory: /opt/mhvtl/F01033L8
Creating new media data file: /opt/mhvtl/F01033L8/data
Creating new media index file: /opt/mhvtl/F01033L8/indx
Creating new media meta file: /opt/mhvtl/F01033L8/meta
mktape: create_tape(): /opt/mhvtl/F01033L8 files created
===> Creating entry: /opt/mhvtl/F01034L8 ...
Creating tape data ...
Creating new media directory: /opt/mhvtl/F01034L8
Creating new media data file: /opt/mhvtl/F01034L8/data
Creating new media index file: /opt/mhvtl/F01034L8/indx
Creating new media meta file: /opt/mhvtl/F01034L8/meta
mktape: create_tape(): /opt/mhvtl/F01034L8 files created
===> Creating entry: /opt/mhvtl/F01035L8 ...
Creating tape data ...                                                                                                                                                                                                                                                                                     [74/198]
Creating new media directory: /opt/mhvtl/F01035L8
Creating new media data file: /opt/mhvtl/F01035L8/data
Creating new media index file: /opt/mhvtl/F01035L8/indx
Creating new media meta file: /opt/mhvtl/F01035L8/meta
mktape: create_tape(): /opt/mhvtl/F01035L8 files created
===> Creating entry: /opt/mhvtl/F01036L8 ...
Creating tape data ...
Creating new media directory: /opt/mhvtl/F01036L8
Creating new media data file: /opt/mhvtl/F01036L8/data
Creating new media index file: /opt/mhvtl/F01036L8/indx
Creating new media meta file: /opt/mhvtl/F01036L8/meta
mktape: create_tape(): /opt/mhvtl/F01036L8 files created
===> Creating entry: /opt/mhvtl/F01037L8 ...
Creating tape data ...
Creating new media directory: /opt/mhvtl/F01037L8
Creating new media data file: /opt/mhvtl/F01037L8/data
Creating new media index file: /opt/mhvtl/F01037L8/indx
Creating new media meta file: /opt/mhvtl/F01037L8/meta
mktape: create_tape(): /opt/mhvtl/F01037L8 files created
===> Creating entry: /opt/mhvtl/F01038L8 ...
Creating tape data ...
Creating new media directory: /opt/mhvtl/F01038L8
Creating new media data file: /opt/mhvtl/F01038L8/data
Creating new media index file: /opt/mhvtl/F01038L8/indx
Creating new media meta file: /opt/mhvtl/F01038L8/meta
mktape: create_tape(): /opt/mhvtl/F01038L8 files created
===> Creating entry: /opt/mhvtl/F01039L8 ...
Creating tape data ...
Creating new media directory: /opt/mhvtl/F01039L8
Creating new media data file: /opt/mhvtl/F01039L8/data
Creating new media index file: /opt/mhvtl/F01039L8/indx
Creating new media meta file: /opt/mhvtl/F01039L8/meta
mktape: create_tape(): /opt/mhvtl/F01039L8 files created
error: not found: /etc/mhvtl/library_contents.20
have you ran 'generate_library_contents'?
root@al {/etc/mhvtl}# ll
total 28
-rw-r--r--  1 root root 5434 Oct 14 05:22 device.conf
-rw-r--r--  1 root root 3600 Oct 14 05:41 device.orig
-rw-r--r--. 1 root root 1659 Oct 13 14:26 library_contents.10
-rw-r--r--  1 root root 1659 Oct 14 05:24 library_contents.40
-rw-r--r--  1 root root 1673 Oct 14 05:41 library_contents.orig
-rw-r--r--. 1 root root  295 Oct 13 04:26 mhvtl.conf

Any help as to what is going wrong here for me would be appreciated. Thank you.

zengdabo commented 1 year ago

error: not found: /etc/mhvtl/library_contents.20 !!!