テープ装置

提供: Wikinote
2010年2月19日 (金) 15:48時点におけるHagio (トーク | 投稿記録)による版 (使い方)

移動: 案内検索

使い方

ステータス確認

mt -f /dev/nst0 status

出力例

  • テープが入っていない場合
SCSI 2 tape drive:
File number=-1, block number=-1, partition=0.
Tape block size 0 bytes. Density code 0x0 (default).
Soft error count since last status=0
General status bits on (50000):
 DR_OPEN IM_REP_EN
  • 巻き戻ったテープが入っている場合
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x26 (DDS-4 or QIC-4GB).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN
  • テープが進んでいる場合
SCSI 2 tape drive:
File number=0, block number=66304, partition=0.
Tape block size 512 bytes. Density code 0x26 (DDS-4 or QIC-4GB).
Soft error count since last status=0
General status bits on (1010000):
 ONLINE IM_REP_EN

dump/restore

dump の際は、コマンド引き数の順番に気をつけること。

# dump -0uf /dev/st0 /dev/sde1
  DUMP: Date of this level 0 dump: Fri Feb 19 15:42:25 2010
  DUMP: Dumping /dev/sde1 (/boot) to /dev/st0
  DUMP: Label: /boot1
  DUMP: Writing 10 Kilobyte records
  DUMP: mapping (Pass I) [regular files]
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 12154 blocks.
  DUMP: Volume 1 started with block 1 at: Fri Feb 19 15:42:26 2010
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
  DUMP: Closing /dev/st0
  DUMP: Volume 1 completed at: Fri Feb 19 15:42:51 2010
  DUMP: Volume 1 12230 blocks (11.94MB)
  DUMP: Volume 1 took 0:00:25
  DUMP: Volume 1 transfer rate: 489 kB/s
  DUMP: 12230 blocks (11.94MB) on 1 volume(s)
  DUMP: finished in 15 seconds, throughput 815 kBytes/sec
  DUMP: Date of this level 0 dump: Fri Feb 19 15:42:25 2010
  DUMP: Date this dump completed:  Fri Feb 19 15:42:51 2010
  DUMP: Average transfer rate: 489 kB/s
  DUMP: DUMP IS DONE

restore で内容表示

# restore -tf /dev/st0
Dump   date: Fri Feb 19 15:42:25 2010
Dumped from: the epoch
Level 0 dump of /boot on localhost:/dev/sde1
Label: /boot1
         2      .
        11      ./lost+found
...