|
|
茫茫網海中的冷日
發生過的事,不可能遺忘,只是想不起來而已! |
|
恭喜您是本站第 1735167
位訪客!
登入 | 註冊
|
|
|
|
發表者 |
討論內容 |
冷日 (冷日) |
發表時間:2007/6/26 8:35 |
- Webmaster

- 註冊日: 2008/2/19
- 來自:
- 發表數: 15773
|
- [分享]DDS on Linux(小企鵝上磁帶機)
- 關於 RedHat 7.1 磁帶機使用方法 我的環境是 RedHat 7.1 加 Seagate Scorpion 40 DDS-4
1. 先檢查有無找到磁帶機:
# dmesg |grep tape
Attached scsi tape st0 at scsi1, channel 0, id 6, lun 0
表示找到了磁帶機,於/dev/st0
2.備份資料。 以上是將 / 這個目錄備份到 st0這個磁帶裝置裡面 先查看有沒有檔案在跑,理應會有一堆包含完整路徑的名依序跑出來,如果有的話,表示有在進行備份。 (tar 之所以沒有加參數z是因為磁帶機大都有自己的壓縮,就不用在跑cpu啦)
3.如何叫回資料。 所以檔案將以“原始路徑”一個一個跑回去。
以上為簡易的使用方式,希望大家派的上用場,謝謝。
以上由 梁楓 製作
|
|
|
冷日 (冷日) |
發表時間:2007/6/26 8:39 |
- Webmaster

- 註冊日: 2008/2/19
- 來自:
- 發表數: 15773
|
- [分享]磁帶機裝置代碼說明
- HP DAT24單捲磁帶機
HP DL380G3 SCSI card Redhat AS 4 /dev/下面出現了 st0,st0a,st0m,nst0,nst0a,nst0m st0預設會回帶,啟動壓縮 n表示不回帶 請問 a 和 m 表示什麼意思?
就如您所說的, scsi磁帶機的device file為/dev/stX會迴帶, /dev/nstX的n代表不會迴帶, 在tape device中另外還有其他三種模式(包含st0為四種, 代表不同的壓縮比率)./dev/stX{l,m,a}及/dev/nstX{l,m,a}則分別對應到不同的壓縮比率{low,medium,high}及迴帶,不迴帶.
|
|
冷日 (冷日) |
發表時間:2007/6/26 8:42 |
- Webmaster

- 註冊日: 2008/2/19
- 來自:
- 發表數: 15773
|
- [分享]Linux tape backup with mt and tar command - howto
- Linux (and other Unixish system) use mt command to control magnetic tape drive operation. You need to use mt command while working with tape drive. It allows you to reading and writing to tape.
The default tape drive under Linux is /dev/st0 (first SCSI tape device name). You can read more about tape drives naming convention used under Linux here. Following paragraph summaries command you need to use control tape drive for backup/restore purpose.
Rewind tape drive: Backup directory /www and /home with tar command (z - compressed):
# tar -czf /dev/st0 /www /home
Find out what block you are at with mt command:
Display list of files on tape drive:
Restore /www directory:
# cd /
# mt -f /dev/st0 rewind
# tar -xzf /dev/st0 www
Unload the tape:
Display status information about the tape unit:
Erase the tape:
You can go BACKWARD or FORWARD on tape with mt command itself: (a) Go to end of data:
(b) Goto previous record:
(c) Forward record:
Replace /dev/st0 with your actual tape drive name.
|
|
冷日 (冷日) |
發表時間:2007/7/9 4:43 |
- Webmaster

- 註冊日: 2008/2/19
- 來自:
- 發表數: 15773
|
- [轉貼]How to archive data SCSI Tape Drive
- All XRF users will be able to read from and write to the tape drive. Since it is the only SCSI tape drive it has the device allocation of /dev/st0 and its status can be checked using the mt command and data archived using tar command. Typical commands that are used during archiving are listed below with a brief explanation:
mt –f /dev/st0 status |Check status of the first SCSI tape drive /dev/st0
tar cvf /dev/st0 my_dir |Write contents of my_dir to tape
tar tvf /dev/st0 |Look at or list contents of previously archived tape
tar -xvf /dev/st0 parent_dir/my_dir |Extract contents of my_dir
mt= magnetic tape; tar= tape archive; -c= create; -v= verbose;-x= extract; st= scsi tape; -t= list; -f= file(system).
Reading DDS-3/4 media
[root@raccoon /]# mt -f /dev/st0 status |Check status of tape drive
SCSI 2 tape drive: File number=0, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x25 (DDS-3).
General status bits on (45010000):
BOT WR_PROT ONLINE IM_REP_EN |Beginning of tape; write-protected tape
[root@raccoon DDS]# tar tvf /dev/st0 |List contents of tape
drwxr-xr-x soma/users 0 2001-09-19 15:04:14 TapeDDS3-024/
drwxr-xr-x soma/users 0 2001-09-18 13:44:17 TapeDDS3-024/4mmtp116/
drwxr-xr-x soma/users 0 2001-09-18 12:39:05 TapeDDS3-024/4mmtp116/AdamekF1
[root@raccoon DDS]# tar-xvf /dev/st0 |Extract contents of the tape media
fire2/soma/
fire2/soma/all.list
fire2/soma/Blaber_Fgf/
fire2/soma/Blaber_Fgf/fgf_2/
fire2/soma/Blaber_Fgf/fgf_2/snap.runlist
fire2/soma/Blaber_Fgf/fgf_2/snap_0_001.img
[root@raccoon DDS]# tar -xvf /dev/st0 fire2/soma/Blaber_Fgf |Extract contents of only Blaber_Fgf directory and NOT all
fire2/soma/Blaber_Fgf/
fire2/soma/Blaber_Fgf/fgf_2/
fire2/soma/Blaber_Fgf/fgf_2/snap.runlist
fire2/soma/Blaber_Fgf/fgf_2/snap_0_001.img
[root@raccoon DDS]# mt -f /dev/st0 offline |Eject the tape
Writing DDS-3/4 media
[root@raccoon /]# mt -f /dev/st0 status |Check status of tape drive
SCSI 2 tape drive: File number=0, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x25 (DDS-3).
General status bits on (45010000):
BOT ONLINE IM_REP_EN |Beginning of tape; ready to write
[soma@spruce ~]$ tar -cvvf /dev/st0 tmp/ |Write contents of tmp directory
drwxrwxr-x soma/marccd 0 2003-04-30 16:41:21 tmp/
-rwxr-xr-x soma/marccd 103756 2000-12-22 23:53:35 tmp/font.exe
-rw------- soma/marccd 7223800 2001-05-16 11:36:03 tmp/abc10003.osc
-rw-rw-r-- soma/marccd 1737 2001-08-07 15:10:20 tmp/uniqueify.log
[soma@spruce ~]$ tar -cvvf /dev/st0 erase |Erase contents of tape. Careful!!!
[soma@spruce ~]$ tar -cvf /dev/st0 my_dir | & tee dds4-listing & |Simultaneously (tee) archive data from my_dir to a tape and write the filenames into another file (dds4-listing).
spruce.sb.fsu.edu (128.186.103.109; RedHat Linux 8.0) Spruce.sb.fsu.edu the 650 MHz Linux machine located in KLB 410A that controls marCCD165 data collection has an internal DDS-4 tape drive. This SCSI DDS-4 tape drive can read and write to DDS2, DDS3 and DDS4 media. However, it is best to use DDS4 media, since it has a native/compressed capacity of 20/40 GB. IP/CCD data will compress anywhere between 10 to 60% depending upon the level of detail in the original image. The same tar and mt commands shown above can be used to archive data using this tape drive. Please read the mt and tar man pages or check with Soma, or Mike for further help. General Information & Trouble Shooting of Tape Drive/Media 原文出處
|
|
|
|