免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3115 | 回复: 3

有关数据库主机用磁带机备份的问题 [复制链接]

论坛徽章:
0
发表于 2012-07-05 18:57 |显示全部楼层
本帖最后由 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.

通过检查系统已加载上磁带机

[root@CN11 informix]# 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

[root@CN11 informix]# lsmod

Module                  Size  Used by

st                     72677  0

usb_storage           122913  0

lockd                 101425  0

sunrpc                203145  2 lockd

bonding               143049  0

ipv6                  437857  81 bonding

xfrm_nalgo             43333  1 ipv6

crypto_api             42945  1 xfrm_nalgo

dm_round_robin         36801  1

dm_multipath           58969  2 dm_round_robin

scsi_dh                42561  1 dm_multipath



同时我在informix账户下用tar命令能正常备份一个文件到磁带机

[informix@CN11 ~]$ ls

cy_info.sql  cy_province.TXT  online.log  ?.sql  zzzz.sql  zzz.sql  tmp

[informix@CN11 ~]$ tar cvf /dev/st0 zzz.sql

zzz.sql

[informix@CN11 ~]$ tar tvf /dev/st0

-rw-r--r-- informix/informix 45616 2012-06-20 11:31:50 zzz.sql

[informix@CN11 ~]$ ll /dev/st0

crw-rw-rw- 1 root disk 9, 0 Jun 27 17:24 /dev/st0

[informix@CN11 ~]$

然后我这边修改onconfig的配置文件

[informix@SXCYCN11 etc]$ vi onconfig.hdr11

#TAPEDEV /dev/null

#TAPEDEV STDIO

TAPEDEV /dev/st0

TAPEBLK 128

TAPESIZE 40000000

###################################################################

LTAPEDEV /dev/null

LTAPEBLK 32

LTAPESIZE 0

但我在informix账户用数据库0备,显示如下情况

[informix@CN11 ~]$ 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不行,也重启过数据库仍不行,请各位大虾帮忙看看这个应该是什么问题?

论坛徽章:
1
15-16赛季CBA联赛之江苏
日期:2017-04-05 11:23:15
发表于 2012-07-05 22:07 |显示全部楼层
chmod 660 /dev/st0后再试试!

论坛徽章:
0
发表于 2012-07-05 22:46 |显示全部楼层
st0文件本来就是660
[root@CN11 dev]# 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

论坛徽章:
0
发表于 2012-08-01 14:55 |显示全部楼层
没有人知道吗?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP