type_admin: introduce media-changer / tape admin wrapper

- tape_admin: helper script to handle common tape handling routines
- mtx: is used for media-changer functions
- json: define media-pools, corresponding volume-names and attributes

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
2018-08-24 17:40:22 +02:00
parent cf2de4d984
commit ec121aecd1
3 changed files with 1109 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ SNAPPER_TEMPLATES ?= /etc/snapper/config-templates
DSNAP_SYNC_EXAMPLES = /usr/share/doc/dsnap-sync
BIN_DIR = $(DESTDIR)$(PREFIX)/bin
ETC_DIR = $(DESTDIR)/etc
SYSTEMD_DIR = $(DESTDIR)$(PREFIX)/lib/systemd/system
DOC_DIR = $(DESTDIR)$(PREFIX)/share/doc/$(PKGNAME)
@@ -31,5 +32,6 @@ DOC_DIR = $(DESTDIR)$(PREFIX)/share/doc/$(PKGNAME)
install:
@./find_snapper_config || sed -i 's@^SNAPPER_CONFIG=.*@SNAPPER_CONFIG='$(SNAPPER_CONFIG)'@g' bin/$(PKGNAME)
@install -Dm755 bin/* -t $(BIN_DIR)/
@install -Dm644 etc/* -t $(DESTDIR)/$(ETC_DIR)/
@install -Dm644 $(SNAPPER_TEMPLATES)/* -t $(DESTDIR)/$(SNAPPER_TEMPLATES)/
@install -Dm644 $(DSNAP_SYNC_EXAMPLES)/* -t $(DESTDIR)/$(DOC_DIR)/

1075
bin/tape_admin Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,32 @@
{
"MediaPools": "Daywalker-Pools",
"MediaPool": [
{
"_comment": "MediaPool append",
"Name": "Pool 1",
"Member":[
{ "VolumeName": "Tape-0001", "VolumeId": "000001", "MediaPolicy": "append" },
{ "VolumeName": "Tape-0002", "VolumeId": "000002", "MediaPolicy": "append" },
{ "VolumeName": "Tape-0003", "VolumeId": "000003", "MediaPolicy": "append" },
{ "VolumeName": "Tape-0004", "VolumeId": "000004", "MediaPolicy": "append" },
{ "VolumeName": "Tape-0005", "VolumeId": "000005", "MediaPolicy": "append" },
{ "VolumeName": "Tape-0006", "VolumeId": "000006", "MediaPolicy": "append" },
{ "VolumeName": "Tape-0007", "VolumeId": "000007", "MediaPolicy": "append" },
{ "VolumeName": "Tape-0008", "VolumeId": "000008", "MediaPolicy": "append" }
]
},
{
"_comment": "MediaPool overwrite",
"Name": "Pool 2",
"Member":[
{ "VolumeName": "Tape-0009", "VolumeId": "000001", "MediaPolicy": "overwrite", "RetensionDate": "20182324T000000", "LastWrite": "20182224T09000" },
{ "VolumeName": "Tape-0010", "VolumeId": "000002", "MediaPolicy": "overwrite", "RetensionDate": "20182324T000000", "LastWrite": "20182224T09000" },
{ "VolumeName": "Tape-0011", "VolumeId": "000003", "MediaPolicy": "overwrite", "RetensionDate": "20182324T000000", "LastWrite": "20182224T09000" },
{ "VolumeName": "Tape-0012", "VolumeId": "000004", "MediaPolicy": "overwrite", "RetensionDate": "20182324T000000", "LastWrite": "20182224T09000" },
{ "VolumeName": "Tape-0013", "VolumeId": "000005", "MediaPolicy": "overwrite", "RetensionDate": "20182324T000000", "LastWrite": "20182224T09000" },
{ "VolumeName": "Tape-0014", "VolumeId": "000006", "MediaPolicy": "overwrite", "RetensionDate": "20182324T000000", "LastWrite": "20182224T09000" },
{ "VolumeName": "Tape-0015", "VolumeId": "000007", "MediaPolicy": "overwrite", "RetensionDate": "20182324T000000", "LastWrite": "20182224T09000" }
]
}
]
}