]> git.proxmox.com Git - proxmox-backup.git/blame - docs/tape-backup.rst
improve code docs
[proxmox-backup.git] / docs / tape-backup.rst
CommitLineData
5f79dc28
DM
1Tape Backup
2===========
3
0bce2118
DM
4Proxmox tape backup provides an easy way to store datastore contents
5to a magnetic tapes. This increases data safety because you get:
5f79dc28
DM
6
7- an additional copy of the data
8- to a different media type (tape)
0bce2118 9- to an additional location (you can move tapes offsite)
5f79dc28 10
0bce2118
DM
11Statistics show that 95% of all restore jobs restores data from the
12last backup. Restore requests further declines the older the data
13gets. Considering this, tape backup may also help to reduce disk
14usage, because you can safely remove data from disk once archived on
15tape. This is especially true if you need to keep data for several
16years.
54d96866
DM
17
18Tape backups do not provide random access to the stored data. Instead,
19you need to restore the data to disk before you can access it
20again. Also, if you store your tapes offsite (using some kind of tape
21vaulting service), you need to bring them onsite before you can do any
22restore. So please consider that restores from tapes can take much
23longer than restores from disk.
5f79dc28
DM
24
25
26Tape Technology Primer
27----------------------
28
29.. _Linear Tape Open: https://en.wikipedia.org/wiki/Linear_Tape-Open
30
31As of 2021, the only broadly available tape technology standard is
32`Linear Tape Open`_, and different vendors offers LTO Ultrium tape
54d96866
DM
33drives, autoloaders and LTO tape cartridges.
34
35Of cause, there are a few vendor offering proprietary drives with
36slight advantages in performance and capacity, but they have
37significat disadvantages:
38
39- proprietary (single vendor)
40- a much higher purchase cost
41
42So we currently do no test such drives.
5f79dc28
DM
43
44In general, LTO tapes offer the following advantages:
45
46- Durable (30 years)
47- High Capacity (12 TB)
48- Relatively low cost per TB
49- Cold Media
50- Movable (storable inside vault)
51- Multiple vendors (for both media and drives)
d5efa18a 52
a174854a 53Please note that `Proxmox Backup Server` already stores compressed
0bce2118 54data, so we do not need/use the tape compression feature.
54d96866 55
d5efa18a
DM
56
57Supported Hardware
58------------------
59
60Proxmox Backup Server supports `Linear Tape Open`_ genertion 3
61(LTO3) or later. In general, all SCSI2 tape drives supported by
62the Linux kernel should work.
63
64Tape changer support is done using the Linux 'mtx' command line
65tool. So any changer devive supported by that tool work work.
66
67
8a192bed
DM
68Drive Performance
69~~~~~~~~~~~~~~~~~
70
71Current LTO8 tapes provide read/write speeds up to 360MB/s. Please
72note that it still takes a minimum of 9 hours to completely write or
73read a single tape (even at maximum speed).
74
75The only way to speed up that data rate is to use more than one
76drive. That way you can run several backup jobs in parallel, or run
77restore jobs while the other dives are used for backups.
78
baefbc44
DM
79Also consider that you need to read data first from your datastore
80(disk). But a single spinning disk is unable to deliver data at this
0bce2118
DM
81rate. We meassured a maximum rate about 60MB/s to 100MB/s in practive,
82so it takes 33 hours to read 12TB to fill up a LTO8 tape. If you want
83to run your tape at full speed, please make sure that the source
baefbc44
DM
84datastore is able to delive that performance (use SSDs).
85
d5efa18a
DM
86
87Terminology
88-----------
89
90:Tape Labels: are used to uniquely indentify a tape. You normally use
91 some sticky paper labels and apply them on the front of the
92 cartridge. We additionally store the label text magnetically on the
93 tape (first file on tape).
94
95.. _Code 39: https://en.wikipedia.org/wiki/Code_39
96
97.. _LTO Ultrium Cartridge Label Specification: https://www.ibm.com/support/pages/ibm-lto-ultrium-cartridge-label-specification
98
8001c82e
DM
99.. _LTO Barcode Generator: lto-barcode/index.html
100
d5efa18a
DM
101:Barcodes: are a special form of tape labels, which are electronically
102 readable. Most LTO tape robots use an 8 character string encoded as
103 `Code 39`_, as definded in the `LTO Ultrium Cartridge Label
104 Specification`_.
105
106 You can either bye such barcode labels from your cartidge vendor,
8001c82e
DM
107 or print them yourself. You can use our `LTO Barcode Generator`_ App
108 for that.
d5efa18a
DM
109
110.. Note:: Physical labels and the associated adhesive shall have an
111 environmental performance to match or exceed the environmental
112 specifications of the cartridge to which it is applied.
113
114:Media Pools: A media pool is a logical container for tapes. A backup
115 job targets one media pool, so a job only uses tapes from that
08d8b2a4
DM
116 pool. The pool additionally defines how long a backup job can
117 append data to tapes (allocation policy) and how long you want to
118 keep the data (retention policy).
119
120:Media Set: A group of continuously written tapes (all from the same
121 media pool).
d5efa18a
DM
122
123:Tape drive: The decive used to read and write data to the tape. There
124 are standalone drives, but drives often ship within tape libraries.
125
126:Tape changer: A device which can change the tapes inside a tape drive
127 (tape robot). They are usually part of a tape library.
128
129.. _Tape Library: https://en.wikipedia.org/wiki/Tape_library
130
131:`Tape library`_: A storage device that contains one or more tape drives,
132 a number of slots to hold tape cartridges, a barcode reader to
133 identify tape cartridges and an automated method for loading tapes
134 (a robot).
135
136 People als call this 'autoloader', 'tape robot' or 'tape jukebox'.
8a192bed 137
4cfb1234
DM
138:Inventory: The inventory stores the list of known tapes (with
139 additional status information).
140
141:Catalog: A media catalog stores information about the media content.
142
8a192bed
DM
143
144Tape Quickstart
145---------------
146
1471. Configure your tape hardware (drives and changers)
148
1492. Configure one or more media pools
150
1513. Label your tape cartridges.
152
1534. Start your first tape backup job ...
baefbc44
DM
154
155
156Configuration
157-------------
158
159Please note that you can configure anything using the graphical user
160interface or the command line interface. Both methods results in the
161same configuration.
162
163
164Tape changers
165~~~~~~~~~~~~~
166
167Tape changers (robots) are part of a `Tape Library`_. You can skip
168this step if you are using a standalone drive.
169
170Linux is able to auto detect those devices, and you can get a list
a174854a 171of available devices using::
baefbc44
DM
172
173 # proxmox-tape changer scan
a174854a
DM
174 ┌─────────────────────────────┬─────────┬──────────────┬────────┐
175 │ path │ vendor │ model │ serial │
176 ╞═════════════════════════════╪═════════╪══════════════╪════════╡
177 │ /dev/tape/by-id/scsi-CC2C52 │ Quantum │ Superloader3 │ CC2C52 │
178 └─────────────────────────────┴─────────┴──────────────┴────────┘
baefbc44
DM
179
180In order to use that device with Proxmox, you need to create a
04eba29c 181configuration entry::
baefbc44 182
a174854a 183 # proxmox-tape changer create sl3 --path /dev/tape/by-id/scsi-CC2C52
baefbc44
DM
184
185Where ``sl3`` is an arbitrary name you can choose.
186
04eba29c 187.. Note:: Please use stable device path names from inside
baefbc44
DM
188 ``/dev/tape/by-id/``. Names like ``/dev/sg0`` may point to a
189 different device after reboot, and that is not what you want.
190
a174854a 191You can show the final configuration with::
baefbc44 192
04eba29c
DM
193 # proxmox-tape changer config sl3
194 ┌──────┬─────────────────────────────┐
195 │ Name │ Value │
196 ╞══════╪═════════════════════════════╡
197 │ name │ sl3 │
198 ├──────┼─────────────────────────────┤
199 │ path │ /dev/tape/by-id/scsi-CC2C52 │
200 └──────┴─────────────────────────────┘
201
202Or simply list all configured changer devices::
203
baefbc44 204 # proxmox-tape changer list
a174854a
DM
205 ┌──────┬─────────────────────────────┬─────────┬──────────────┬────────────┐
206 │ name │ path │ vendor │ model │ serial │
207 ╞══════╪═════════════════════════════╪═════════╪══════════════╪════════════╡
208 │ sl3 │ /dev/tape/by-id/scsi-CC2C52 │ Quantum │ Superloader3 │ CC2C52 │
209 └──────┴─────────────────────────────┴─────────┴──────────────┴────────────┘
baefbc44
DM
210
211The Vendor, Model and Serial number are auto detected, but only shown
212if the device is online.
213
a174854a
DM
214To test your setup, please query the status of the changer device with::
215
216 # proxmox-tape changer status sl3
217 ┌───────────────┬──────────┬────────────┬─────────────┐
218 │ entry-kind │ entry-id │ changer-id │ loaded-slot │
219 ╞═══════════════╪══════════╪════════════╪═════════════╡
220 │ drive │ 0 │ vtape1 │ 1 │
221 ├───────────────┼──────────┼────────────┼─────────────┤
222 │ slot │ 1 │ │ │
223 ├───────────────┼──────────┼────────────┼─────────────┤
224 │ slot │ 2 │ vtape2 │ │
225 ├───────────────┼──────────┼────────────┼─────────────┤
226 │ ... │ ... │ │ │
227 ├───────────────┼──────────┼────────────┼─────────────┤
228 │ slot │ 16 │ │ │
229 └───────────────┴──────────┴────────────┴─────────────┘
230
0912878e
DM
231Tape libraries usually provide some special import/export slots (also
232called "mail slots"). Tapes inside those slots are acessible from
233outside, making it easy to add/remove tapes to/from the library. Those
234tapes are considered to be "offline", so backup jobs will not use
235them. Those special slots are auto-detected and marked as
236``import-export`` slot in the status command.
237
238It's worth noting that some of the smaller tape libraries don't have
239such slots. While they have something called "Mail Slot", that slot
240is just a way to grab the tape from the gripper. But they are unable
241to hold media while the robot does other things. They also do not
242expose that "Mail Slot" over the SCSI interface, so you wont see them in
243the status output.
244
245As a workaround, you can mark some of the normal slots as export
246slot. The software treats those slots like real ``import-export``
247slots, and the media inside those slots is considered to be 'offline'
248(not available for backup)::
249
250 # proxmox-tape changer update sl3 --export-slots 15,16
251
252After that, you can see those artificial ``import-export`` slots in
253the status output::
254
04eba29c 255 # proxmox-tape changer status sl3
0912878e
DM
256 ┌───────────────┬──────────┬────────────┬─────────────┐
257 │ entry-kind │ entry-id │ changer-id │ loaded-slot │
258 ╞═══════════════╪══════════╪════════════╪═════════════╡
259 │ drive │ 0 │ vtape1 │ 1 │
260 ├───────────────┼──────────┼────────────┼─────────────┤
261 │ import-export │ 15 │ │ │
262 ├───────────────┼──────────┼────────────┼─────────────┤
263 │ import-export │ 16 │ │ │
264 ├───────────────┼──────────┼────────────┼─────────────┤
265 │ slot │ 1 │ │ │
266 ├───────────────┼──────────┼────────────┼─────────────┤
267 │ slot │ 2 │ vtape2 │ │
268 ├───────────────┼──────────┼────────────┼─────────────┤
269 │ ... │ ... │ │ │
270 ├───────────────┼──────────┼────────────┼─────────────┤
271 │ slot │ 14 │ │ │
272 └───────────────┴──────────┴────────────┴─────────────┘
a174854a 273
baefbc44
DM
274
275Tape drives
276~~~~~~~~~~~
277
04eba29c
DM
278Linux is able to auto detect tape drives, and you can get a list
279of available tape drives using::
280
281 # proxmox-tape drive scan
282 ┌────────────────────────────────┬────────┬─────────────┬────────┐
283 │ path │ vendor │ model │ serial │
284 ╞════════════════════════════════╪════════╪═════════════╪════════╡
285 │ /dev/tape/by-id/scsi-12345-nst │ IBM │ ULT3580-TD4 │ 12345 │
286 └────────────────────────────────┴────────┴─────────────┴────────┘
287
288In order to use that drive with Proxmox, you need to create a
289configuration entry::
290
291 # proxmox-tape drive create mydrive --path /dev/tape/by-id/scsi-12345-nst
292
293.. Note:: Please use stable device path names from inside
294 ``/dev/tape/by-id/``. Names like ``/dev/nst0`` may point to a
295 different device after reboot, and that is not what you want.
296
297If you have a tape library, you also need to set the associated
298changer device::
299
300 # proxmox-tape drive update mydrive --changer sl3 --changer-drive-id 0
301
302The ``--changer-drive-id`` is only necessary if the tape library
303includes more than one drive (The changer status command lists all
304drive IDs).
305
306You can show the final configuration with::
307
308 # proxmox-tape drive config mydrive
309 ┌─────────┬────────────────────────────────┐
310 │ Name │ Value │
311 ╞═════════╪════════════════════════════════╡
312 │ name │ mydrive │
313 ├─────────┼────────────────────────────────┤
314 │ path │ /dev/tape/by-id/scsi-12345-nst │
315 ├─────────┼────────────────────────────────┤
316 │ changer │ sl3 │
317 └─────────┴────────────────────────────────┘
318
319.. NOTE:: The ``changer-drive-id`` value 0 is not stored in the
320 configuration, because that is the default.
321
322To list all configured drives use::
323
324 # proxmox-tape drive list
325 ┌──────────┬────────────────────────────────┬─────────┬────────┬─────────────┬────────┐
326 │ name │ path │ changer │ vendor │ model │ serial │
327 ╞══════════╪════════════════════════════════╪═════════╪════════╪═════════════╪════════╡
328 │ mydrive │ /dev/tape/by-id/scsi-12345-nst │ sl3 │ IBM │ ULT3580-TD4 │ 12345 │
329 └──────────┴────────────────────────────────┴─────────┴────────┴─────────────┴────────┘
330
331The Vendor, Model and Serial number are auto detected, but only shown
332if the device is online.
333
632756b6
DM
334For testing, you can simply query the drive status with::
335
336 # proxmox-tape status --drive mydrive
337 ┌───────────┬────────────────────────┐
338 │ Name │ Value │
339 ╞═══════════╪════════════════════════╡
340 │ blocksize │ 0 │
341 ├───────────┼────────────────────────┤
342 │ status │ DRIVE_OPEN | IM_REP_EN │
343 └───────────┴────────────────────────┘
344
345.. NOTE:: Blocksize should always be 0 (variable block size
346 mode). This is the default anyways.
347
baefbc44
DM
348
349Media Pools
350~~~~~~~~~~~
351
08d8b2a4
DM
352A media pool is a logical container for tapes. A backup job targets
353one media pool, so a job only uses tapes from that pool.
354
355.. topic:: Media Set
356
357 A media set is a group of continuously written tapes, used to split
358 the larger pool into smaller, restorable units. One or more backup
59217472
DM
359 jobs write to a media set, producing an ordered group of
360 tapes. Media sets are identified by an unique ID. That ID and the
361 sequence number is stored on each tape of that set (tape label).
08d8b2a4
DM
362
363 Media sets are the basic unit for restore tasks, i.e. you need all
59217472 364 tapes in the set to restore the media set content. Data is fully
08d8b2a4
DM
365 deduplicated inside a media set.
366
367
368.. topic:: Media Set Allocation Policy
369
370 The pool additionally defines how long backup jobs can append data
59217472 371 to a media set. The following settings are possible:
08d8b2a4 372
59217472 373 - Try to use the current media set.
08d8b2a4 374
59217472
DM
375 This setting produce one large media set. While this is very
376 space efficient (deduplication, no unused space), it can lead to
377 long restore times, because restore jobs needs to read all tapes in the
378 set.
08d8b2a4 379
59217472
DM
380 .. NOTE:: Data is fully deduplicated inside a media set. That
381 also means that data is randomly distributed over the tapes in
382 the set. So even if you restore a single VM, this may have to
383 read data from all tapes inside the media set.
384
385 Larger media sets are also more error prone, because a single
386 damaged media makes the restore fail.
387
388 Usage scenario: Mostly used with tape libraries, and you manually
389 trigger new set creation by running a backup job with the
390 ``--export`` option.
391
e84b801c
DM
392 .. NOTE:: Retention period starts with the existence of a newer
393 media set.
394
59217472
DM
395 - Always create a new media set.
396
397 With this setting each backup job creates a new media set. This
398 is less space efficient, because the last media from the last set
399 may not be fully written, leaving the remaining space unused.
400
401 The advantage is that this procudes media sets of minimal
402 size. Small set are easier to handle, you can move sets to an
403 off-site vault, and restore is much faster.
404
e84b801c
DM
405 .. NOTE:: Retention period starts with the creation time of the
406 media set.
407
59217472
DM
408 - Create a new set when the specified Calendar Event triggers.
409
410 .. _systemd.time manpage: https://manpages.debian.org/buster/systemd/systemd.time.7.en.html
411
412 This allows you to specify points in time by using systemd like
413 Calendar Event specifications (see `systemd.time manpage`_).
414
415 For example, the value ``weekly`` (or ``Mon *-*-* 00:00:00``)
416 will create a new set each week.
417
418 This balances between space efficency and media count.
08d8b2a4 419
e84b801c
DM
420 .. NOTE:: Retention period starts when the calendar event
421 triggers.
422
08d8b2a4
DM
423 Additionally, the following events may allocate a new media set:
424
59217472 425 - Required tape is offline (and you use a tape library).
08d8b2a4
DM
426
427 - Current set contains damaged of retired tapes.
428
59217472
DM
429 - Database consistency errors, e.g. if the inventory does not
430 contain required media info, or contain conflicting infos
431 (outdated data).
08d8b2a4
DM
432
433.. topic:: Retention Policy
434
e84b801c 435 Defines how long we want to keep the data.
08d8b2a4 436
3838ce33
DM
437 - Always overwrite media.
438
439 - Protect data for the duration specified.
440
441 We use systemd like time spans to specify durations, e.g. ``2
442 weeks`` (see `systemd.time manpage`_).
443
444 - Never overwrite data.
08d8b2a4 445
0bce2118 446
08d8b2a4
DM
447.. NOTE:: FIXME: Add note about global content namespace. (We do not store
448 the source datastore, so it is impossible to distinguish
449 store1:/vm/100 from store2:/vm/100. Please use different media
450 pools if the source is from a different name space)
451
452
0bce2118
DM
453The following command creates a new media pool::
454
455 // proxmox-tape pool create <name> --drive <string> [OPTIONS]
456
457 # proxmox-tape pool create daily --drive mydrive
458
08d8b2a4 459
0bce2118 460Additional option can be set later using the update command::
08d8b2a4 461
0bce2118
DM
462 # proxmox-tape pool update daily --allocation daily --retention 7days
463
464
465To list all configured pools use::
466
467 # proxmox-tape pool list
468 ┌───────┬──────────┬────────────┬───────────┬──────────┐
469 │ name │ drive │ allocation │ retention │ template │
470 ╞═══════╪══════════╪════════════╪═══════════╪══════════╡
471 │ daily │ mydrive │ daily │ 7days │ │
472 └───────┴──────────┴────────────┴───────────┴──────────┘
08d8b2a4 473
baefbc44
DM
474
475Tape Jobs
476~~~~~~~~~
477
478
479Administration
480--------------
481
44ce25e7
DM
482Many sub-command of the ``proxmox-tape`` command line tools take a
483parameter called ``--drive``, which specifies the tape drive you want
484to work on. For convenience, you can set that in an environment
485variable::
486
487 # export PROXMOX_TAPE_DRIVE=mydrive
488
489You can then omit the ``--drive`` parameter from the command. If the
490drive has an associated changer device, you may also omit the changer
491parameter from commands that needs a changer device, for example::
492
493 # proxmox-tape changer status
494
495Should displays the changer status of the changer device associated with
496drive ``mydrive``.
497
498
baefbc44
DM
499Label Tapes
500~~~~~~~~~~~
501
8001c82e
DM
502By default, tape cartidges all looks the same, so you need to put a
503label on them for unique identification. So first, put a sticky paper
504label with some human readable text on the cartridge.
505
506If you use a `Tape Library`_, you should use an 8 character string
507encoded as `Code 39`_, as definded in the `LTO Ultrium Cartridge Label
508Specification`_. You can either bye such barcode labels from your
509cartidge vendor, or print them yourself. You can use our `LTO Barcode
510Generator`_ App for that.
511
512Next, you need to write that same label text to the tape, so that the
513software can uniquely identify the tape too.
514
515For a standalone drive, manually insert the new tape cartidge into the
44ce25e7 516drive and run::
8001c82e 517
0bce2118
DM
518 # proxmox-tape label --changer-id <label-text> [--pool <pool-name>]
519
520You may omit the ``--pool`` argument to allow the tape to be used by any pool.
8001c82e
DM
521
522.. Note:: For safety reasons, this command fails if the tape contain
523 any data. If you want to overwrite it anways, erase the tape first.
524
44ce25e7 525You can verify success by reading back the label::
8001c82e 526
0bce2118
DM
527 # proxmox-tape read-label
528 ┌─────────────────┬──────────────────────────────────────┐
529 │ Name │ Value │
530 ╞═════════════════╪══════════════════════════════════════╡
531 │ changer-id │ vtape1 │
532 ├─────────────────┼──────────────────────────────────────┤
533 │ uuid │ 7f42c4dd-9626-4d89-9f2b-c7bc6da7d533 │
534 ├─────────────────┼──────────────────────────────────────┤
535 │ ctime │ Wed Jan 6 09:07:51 2021 │
536 ├─────────────────┼──────────────────────────────────────┤
537 │ pool │ daily │
538 ├─────────────────┼──────────────────────────────────────┤
539 │ media-set-uuid │ 00000000-0000-0000-0000-000000000000 │
540 ├─────────────────┼──────────────────────────────────────┤
541 │ media-set-ctime │ Wed Jan 6 09:07:51 2021 │
542 └─────────────────┴──────────────────────────────────────┘
543
544.. NOTE:: The ``media-set-uuid`` using all zeros indicates an empty
545 tape (not used by any media set).
8001c82e
DM
546
547If you have a tape library, apply the sticky barcode label to the tape
548cartridges first. Then load those empty tapes into the library. You
44ce25e7 549can then label all unlabeled tapes with a single command::
8001c82e 550
0bce2118 551 # proxmox-tape barcode-label [--pool <pool-name>]
8001c82e
DM
552
553
baefbc44
DM
554Run Tape Backups
555~~~~~~~~~~~~~~~~
556
9738dd54
DM
557To manually run a backup job use::
558
559 # proxmox-tape backup <store> <pool> [OPTIONS]
560
561The following options are available:
562
563--eject-media Eject media upon job completion.
564
565 It is normally good practice to eject the tape after use. This unmounts the
566 tape from the drive and prevents the tape from getting dirty with dust.
567
568--export-media-set Export media set upon job completion.
569
570 After a sucessful backup job, this moves all tapes from the used
571 media set into import-export slots. The operator can then pick up
572 those tapes and move them to a media vault.
573
574
baefbc44
DM
575Restore from Tape
576~~~~~~~~~~~~~~~~~
577
4cfb1234
DM
578Restore is done at media-set granularity, so you first need to find
579out which media set contains the data you want to restore. This
580information is stored in the media catalog. If you do not have media
581catalogs, you need to restore them first. Please note that you need
582the catalog to find your data, but restoring a complete media-set does
583not need media catalogs.
584
585The following command shows the media content (from catalog)::
586
587 # proxmox-tape media content
588 ┌────────────┬──────┬──────────────────────────┬────────┬────────────────────────────────┬──────────────────────────────────────┐
589 │ label-text │ pool │ media-set-name │ seq-nr │ snapshot │ media-set-uuid │
590 ╞════════════╪══════╪══════════════════════════╪════════╪════════════════════════════════╪══════════════════════════════════════╡
591 │ TEST01L8 │ p2 │ Wed Jan 13 13:55:55 2021 │ 0 │ vm/201/2021-01-11T10:43:48Z │ 9da37a55-aac7-4deb-91c6-482b3b675f30 │
592 ├────────────┼──────┼──────────────────────────┼────────┼────────────────────────────────┼──────────────────────────────────────┤
593 │ ... │ ... │ ... │ ... │ ... │ ... │
594 └────────────┴──────┴──────────────────────────┴────────┴────────────────────────────────┴──────────────────────────────────────┘
595
596
597A restore job reads the data from the media set and moves it back to
598data disk (datastore)::
599
600 // proxmox-tape restore <media-set-uuid> <datastore>
601
602 # proxmox-tape restore 9da37a55-aac7-4deb-91c6-482b3b675f30 mystore
603
604
605
baefbc44
DM
606Update Inventory
607~~~~~~~~~~~~~~~~
608
4cfb1234 609
baefbc44
DM
610Restore Catalog
611~~~~~~~~~~~~~~~
9738dd54 612
4cfb1234
DM
613
614
9738dd54
DM
615Tape Cleaning
616~~~~~~~~~~~~~
617
618LTO tape drives requires regular cleaning. This is done by loading a
619cleaning cartridge into the drive, which is a manual task for
620standalone drives.
621
622For tape libraries, cleaning cartridges are identified using special
623labels starting with letters "CLN". For example, our tape library has a
624cleaning cartridge inside slot 3::
625
626 # proxmox-tape changer status sl3
627 ┌───────────────┬──────────┬────────────┬─────────────┐
628 │ entry-kind │ entry-id │ changer-id │ loaded-slot │
629 ╞═══════════════╪══════════╪════════════╪═════════════╡
630 │ drive │ 0 │ vtape1 │ 1 │
631 ├───────────────┼──────────┼────────────┼─────────────┤
632 │ slot │ 1 │ │ │
633 ├───────────────┼──────────┼────────────┼─────────────┤
634 │ slot │ 2 │ vtape2 │ │
635 ├───────────────┼──────────┼────────────┼─────────────┤
636 │ slot │ 3 │ CLN001CU │ │
637 ├───────────────┼──────────┼────────────┼─────────────┤
638 │ ... │ ... │ │ │
639 └───────────────┴──────────┴────────────┴─────────────┘
640
641To initiate a cleaning operation simply run::
642
643 # proxmox-tape clean
644
645This command does the following:
646
647- find the cleaning tape (in slot 3)
648
649- unload the current media from the drive (back to slot1)
650
651- load the cleaning tape into the drive
652
653- run drive cleaning operation
654
655- unload the cleaning tape (to slot 3)