28570d19a6
tape restore: avoid multiple stat calls for same chunk
2021-04-16 13:17:17 +02:00
318b310638
tape: improve EOT error handling
2021-04-12 13:27:34 +02:00
109ccd300f
cleanup: move tape SCSI code to src/tape/drive/lto/sg_tape/
2021-04-09 11:34:45 +02:00
e29f456efc
tape: implement format/erase
2021-04-08 07:28:30 +02:00
a79082a0dd
tape: implement LTO userspace driver
2021-04-08 07:28:30 +02:00
0db5712493
tape: introduce trait BlockRead
2021-04-08 07:28:30 +02:00
c553407e98
tape: add --scan option for catalog restore
2021-03-25 13:08:34 +01:00
870681013a
tape: fix catalog restore
...
We need to rewind the tape if fast_catalog_restore() fail ...
2021-03-24 10:09:23 +01:00
074503f288
tape: implement fast catalog restore
2021-03-24 08:40:34 +01:00
30316192b3
tape: improve locking (lock media-sets)
...
- new helper: lock_media_set()
- MediaPool: lock media set
- Expose Inventory::new() to avoid double loading
- do not lock pool on restore (only lock media-set)
- change pool lock name to ".pool-{name}"
2021-03-24 06:32:59 +01:00
d1d74c4367
typo fixes all over the place
...
found and semi-manually replaced by using:
codespell -L mut -L crate -i 3 -w
Mostly in comments, but also email notification and two occurrences
of misspelled 'reserved' struct member, which where not used and
cargo build did not complain about the change, soo ...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com >
2021-03-10 16:39:57 +01:00
af76234112
tape: improve MediaPool allocation by sorting tapes by ctime and label_text
2021-03-09 08:33:21 +01:00
d95c74c6e7
tape: test tape alert flags after drive clean
2021-03-08 09:08:55 +01:00
b4975d3102
tape: finish api permission checks
2021-03-05 11:49:07 +01:00
8cd63df0dc
tape: impl api permissions for drive/changer/pool configuration
2021-03-03 12:10:00 +01:00
8bf5769382
api2/tape/drive: add state to DriveListEntry
...
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
2021-03-02 12:51:19 +01:00
1552d9699c
tape: add 'Restore Key' button
2021-03-01 11:11:38 +01:00
86d9f4e733
tape: extend MediaChange trait to return MtxStatus
2021-02-20 10:23:16 +01:00
3f16f1b006
tape: update changer status inside ScsiMediaChange implementation
2021-02-20 09:56:27 +01:00
cbd9899389
tape: update changer status cache after load/unload
2021-02-20 09:06:17 +01:00
41e66bfaf6
api2/tape/drive: wrap some api calls in run_drive_blocking_task
...
those calls could also block, so we have to run them in a blocking
tokio task, as to not block the current thread
nice side effect is that we now also update the state for that
drive in those instances
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
2021-02-19 10:14:08 +01:00
47a7241410
api2/tape/drive: use run_drive_blocking_task where possible
...
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
2021-02-19 10:13:36 +01:00
54c77b3d62
api2/tape/drive: add wrapper for tokio::task::spawn_blocking
...
similar to the worker wrapper, lock, write status, run code, unset status
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
2021-02-19 10:13:21 +01:00
a1c5575308
api2/tape/drive: use 'run_drive_worker' where possible
...
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
2021-02-19 10:11:04 +01:00
a44c934b5d
api2/tape/drive: add run_drive_worker wrapper
...
a wrapper for locking, starting the worker and writing the state
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
2021-02-19 10:08:27 +01:00
d0647e5a02
tape: use worker tasks for media load/unload
2021-02-18 09:04:51 +01:00
3cdd1a3424
tape: erase_media - automatically load media (with tape libraries).
2021-02-17 06:55:53 +01:00
be61c56c21
api2/tape/drive: add optional label-text to erase
...
if given, erases the tape only iff the inserted tape contains that label
used to safeguard tape erasing from ui for standalone drives
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
2021-02-17 06:55:53 +01:00
7b1bf4c098
tape: erase_media - automatically erase catalog and inventory
2021-02-12 11:30:34 +01:00
afcf8b3ed6
api2/tape/drive: add missing locks for some drive actions
...
else a backup/restore can easily be disrupted
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
2021-02-09 08:46:03 +01:00
25aa55b5f5
tape: correctly lock the tape device
2021-02-05 10:50:21 +01:00
b5b99a52cd
tape: API type cleanup, use serde flatten to derive types
2021-01-30 09:36:54 +01:00
9586ce2f46
tape: move scan_drives API code to correct file
2021-01-30 08:03:17 +01:00
c297835b01
tape: proxmox-tape - use API instead of direct functions calls
2021-01-29 11:49:11 +01:00
5243df4712
tape: proxmox-tape - use API instead of direct functions calls
2021-01-29 10:50:11 +01:00
41dacd5d3d
tape: use worker task for eject-media api
2021-01-28 16:49:08 +01:00
eb1dfb02b5
tape: proxmox-tape - use api for erase-media and rewind
2021-01-28 16:36:10 +01:00
cef4654ff4
api2/tape/drive: change methods of some api calls from put to get
...
makes more sense to have retrieving api calls as get instead of put
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
2021-01-28 15:02:52 +01:00
f45dceeb73
api2/tape/drive: add load_media as api call
...
code was already there, just add it as api call
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
2021-01-28 15:02:13 +01:00
18262a88c9
api2/tape/changer: add changer filter to list_drives api call
...
so that an api user can get the drives belonging to a changer
without having to parse the config listing themselves
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
2021-01-28 15:01:41 +01:00
d737adc6be
tape: rename changer_drive_id to changer_drivenum
2021-01-28 11:29:59 +01:00
5fdaecf6f4
api2/tape/drive: reorganize drive api
...
similar to the changers, create a listing at /tape/drive and put
the specific api calls below that
move the scan api call up one level
remove the status info from the config listing
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com >
2021-01-28 11:15:17 +01:00
5f34d69bcc
tape: add volume-statistics api/command
2021-01-22 08:45:35 +01:00
645a044bf6
tape: further hierarchy improvements
2021-01-21 17:25:32 +01:00
37796ff73f
tape: change code hierarchy to improve docs
2021-01-21 17:12:01 +01:00
d543587d34
Merge branch 'master' of ssh://proxdev.maurer-it.com/rust/proxmox-backup
2021-01-21 10:56:52 +01:00
780bc4cad2
tape: try to set encryption key with read-label command
2021-01-21 10:31:49 +01:00
18bd6ba13d
tape: restore_key - always update key, even if there is already an entry
2021-01-21 10:31:49 +01:00
8428063d9e
cleanup: KeyConfig::decrypt - show password hint on error
2021-01-21 10:31:49 +01:00
f490dda05a
tape: use type Uuid instead of String
2021-01-21 10:31:49 +01:00