有关数据库主机用磁带机备份的问题
本帖最后由 chowsen 于 2012-07-05 19:00 编辑数据库主机操作系统:Red Hat Enterprise Linux Server release 5.8 (Tikanga)
数据库版本:informix IDS11.5FC9
USB磁带机型号:HP Storage Works DAT72 USB external
目前在系统能识别USB磁带机并且用root和informix账户都能tar 文件到磁带机且能查看
用dmesg查看结果:
usb 1-7: USB disconnect, address 6
usb 5-1: new full speed USB device using uhci_hcd and address 3
usb 5-1: not running at top speed; connect to a high speed hub
usb 5-1: configuration #1 chosen from 1 choice
scsi8 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
Vendor: HP Model: C7438A Rev: ZU8B
Type: Sequential-Access ANSI SCSI revision: 03
st 8:0:0:0: Attached scsi tape st0
st0: try direct i/o: yes (alignment 512 B)
st 8:0:0:0: Attached scsi generic sg9 type 1
usb-storage: device scan complete
st0: Block limits 1 - 16777215 bytes.
通过检查系统已加载上磁带机
# mt -f /dev/st0 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x47 (TR-5).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN
# lsmod
Module SizeUsed by
st 726770
usb_storage 1229130
lockd 1014250
sunrpc 2031452 lockd
bonding 1430490
ipv6 43785781 bonding
xfrm_nalgo 433331 ipv6
crypto_api 429451 xfrm_nalgo
dm_round_robin 368011
dm_multipath 589692 dm_round_robin
scsi_dh 425611 dm_multipath
同时我在informix账户下用tar命令能正常备份一个文件到磁带机
$ ls
cy_info.sqlcy_province.TXTonline.log?.sqlzzzz.sqlzzz.sqltmp
$ tar cvf /dev/st0 zzz.sql
zzz.sql
$ tar tvf /dev/st0
-rw-r--r-- informix/informix 45616 2012-06-20 11:31:50 zzz.sql
$ ll /dev/st0
crw-rw-rw- 1 root disk 9, 0 Jun 27 17:24 /dev/st0
$
然后我这边修改onconfig的配置文件
$ vi onconfig.hdr11
#TAPEDEV /dev/null
#TAPEDEV STDIO
TAPEDEV /dev/st0
TAPEBLK 128
TAPESIZE 40000000
###################################################################
LTAPEDEV /dev/null
LTAPEBLK 32
LTAPESIZE 0
但我在informix账户用数据库0备,显示如下情况
$ ontape -s -L 0
Please mount tape 1 on /dev/st0 and press Return to continue ...
could not write archive tape.
Please mount tape 1 on /dev/st0 and press Return to continue ...
could not write archive tape.
Please mount tape 1 on /dev/st0 and press Return to continue ...
Interrupt received ...
我修改/dev/st0的属主为informix:informix不行,也重启过数据库仍不行,请各位大虾帮忙看看这个应该是什么问题?
chmod 660 /dev/st0后再试试! st0文件本来就是660
# ls -l st0*
crw-rw----1 informix informix 9, 0 Jun 27 17:24 st0
crw-rw----1 root disk 9, 96 Jun 27 17:24 st0a
crw-rw----1 root disk 9, 32 Jun 27 17:24 st0l
crw-rw----1 root disk 9, 64 Jun 27 17:24 st0m 没有人知道吗?
页:
[1]