unix - Determine Which Hard Drive the Database-Files/Transaction-Files are Stored -
i have old sybase server database acting up. have tried rebuilding file-system , database file. problem returns. want replace hard drive database-files , transaction-files stored. want determine hard drive because not familiar unix. moreover, want see if files stored in same hard drive operating system or not; if are, need re-install operating system restoring database new hard drive. better if database-files , transaction-files not in same hard drive operating system. please me determine these 2 things.
so far, have found these:
(1) use sp_helpdb command , find database files , transaction files stored in these logical devices:
sybdbs syblogs master sybdbs2 (2) use sp_helpdevice command 4 logical devices shown above, , find logical devices in these physical devices:
/dev/rdsk/c0t0d0s1 /dev/rdsk/c0t3d0s4 d_master /dev/rdsk/sybdbs2 (3) when use sp_helpdevice show physical devices, see this:
device_name physical_name description status cntrltype device_number low high ------------------ ------------------------------------------- ------------------------------------------------ ------ --------- ------------- -------- -------- historydump /export/home/syb11.dump/history.dump disk, dump device 16 2 0 0 0 isproddump /export/home/syb11.dump/isprod.dump disk, dump device 16 2 0 0 0 istestdump /export/home/syb11.dump/istest.dump disk, dump device 16 2 0 0 0 master d_master special, physical disk, 100.00 mb 2 0 0 0 51199 masterdump /export/home/syb11.dump/master.dump disk, dump device 16 2 0 0 0 modeldump /export/home/syb11.dump/model.dump disk, dump device 16 2 0 0 0 prodtestdump /export/home/syb11.dump/prodtest.dump disk, dump device 16 2 0 0 0 sybdbs /dev/rdsk/c0t0d0s1 special, default disk, physical disk, 2000.00 mb 3 0 3 50331648 51355647 sybdbs2 /dev/rdsk/sybdbs2 special, physical disk, 1.00 mb 2 0 5 83886080 83886591 syblogs /dev/rdsk/c0t3d0s4 special, physical disk, 850.00 mb 2 0 4 67108864 67544063 sybscurty /dev/rdsk/c0t3d0s5 special, physical disk, 100.00 mb 2 0 2 33554432 33605631 sybsecuritydump /export/home/syb11.dump/sybsecurity.dump disk, dump device 16 2 0 0 0 sybsystemprocsdump /export/home/syb11.dump/sybsystemprocs.dump disk, dump device 16 2 0 0 0 sysprocsdev /dev/rdsk/c0t0d0s4 special, physical disk, 100.00 mb 2 0 1 16777216 16828415 tapedump1 /dev/rmt4 tape, 625 mb, dump device 16 3 0 0 20000 tapedump2 /dev/rst0 disk, dump device 16 2 0 0 20000 uniface724dump /export/home/syb11.dump/uniface724.dump disk, dump device 16 2 0 0 0 uniface7dump /export/home/syb11.dump/uniface7.dump disk, dump device 16 2 0 0 0 (4) want know more physical devices. use df command examine them:
df -k /dev/rdsk/c0t0d0s1 df -k /dev/rdsk/c0t3d0s4 df -k d_master df -k /dev/rdsk/sybdbs2 the df command complains first 3 devices “not block device, directory or mounted resource”.
on other hand, df command shows following info last device:
filesystem kbytes used avail capacity mounted on /dev/dsk/c0t3d0s0 576558 371019 147889 71% / in case, doesn’t tell me drive(s) devices on.
(5) when use mount command, see this:
/ on /dev/dsk/c0t3d0s0 read/write/setuid on mon jul 6 11:10:46 2015 /usr on /dev/dsk/c0t3d0s6 read/write/setuid on mon jul 6 11:10:46 2015 /proc on /proc read/write/setuid on mon jul 6 11:10:46 2015 /dev/fd on fd read/write/setuid on mon jul 6 11:10:46 2015 /tmp on swap read/write on mon jul 6 11:10:49 2015 /export on /dev/dsk/c0t3d0s7 setuid/read/write on mon jul 6 11:10:49 2015 /freespace on /dev/dsk/c0t0d0s5 setuid/read/write on mon jul 6 11:10:49 2015 /sybase on /dev/dsk/c0t0d0s0 setuid/read/write on mon jul 6 11:10:49 2015 /usr/openwin on /dev/dsk/c0t3d0s3 setuid/read/write on mon jul 6 11:10:49 2015 i cannot figure out connection between mounted devices above physical devices database-files , transaction-files. cannot link mounted devices above hard drives shown in next section.
(6) when use cat /etc/vfstab command, see these:
#device device mount fs fsck mount mount #to mount fsck point type pass @ boot options # #/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes - /proc - /proc proc - no - fd - /dev/fd fd - no - swap - /tmp tmpfs - yes - /dev/dsk/c0t3d0s0 /dev/rdsk/c0t3d0s0 / ufs 1 no - /dev/dsk/c0t3d0s6 /dev/rdsk/c0t3d0s6 /usr ufs 1 no - /dev/dsk/c0t3d0s7 /dev/rdsk/c0t3d0s7 /export ufs 2 yes - /dev/dsk/c0t0d0s5 /dev/rdsk/c0t0d0s5 /freespace ufs 2 yes - /dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 /sybase ufs 2 yes - /dev/dsk/c0t3d0s3 /dev/rdsk/c0t3d0s3 /usr/openwin ufs 2 yes - /dev/dsk/c0t3d0s1 - - swap - no - # following lines have been commented-out allow sybase access these # partitions , raw partitions. nov-24-1999 # /dev/dsk/c0t0d0s3 /dev/rdsk/c0t0d0s3 /master ufs 2 yes - # /dev/dsk/c0t0d0s1 /dev/rdsk/c0t0d0s1 /sybdbs ufs 2 yes - # /dev/dsk/c0t3d0s4 /dev/rdsk/c0t3d0s4 /syblogs ufs 2 yes - # /dev/dsk/c0t3d0s5 /dev/rdsk/c0t3d0s5 /sybscurty ufs 2 yes - # /dev/dsk/c0t0d0s4 /dev/rdsk/c0t0d0s4 /sybtemproc ufs 2 yes - (7) when use format command, see these 2 hard drives:
available disk selections: 0. c0t0d0 <ibm-dnes-309170-sa30 cyl 11195 alt 2 hd 5 sec 320> /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@0,0 1. c0t3d0 <seagate-st34520n-1206 cyl 9004 alt 2 hd 4 sec 246> /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@3,0 (8) don’t see external device attached sybase server. having said this, there backup sybase server, , backup sybase server has external device attached (through scsi cable). @ point, assume database-files , transaction-files stored inside sybase server.
by way, sybase server uses unix operating system:
sunos <my-server-name> 5.4 generic_101945-62 sun4m sparc and sybase version is:
sql server/11.0.3.2/p/sun_svr4/os 5.4/swr 7578 rollup/opt/mon nov 3 22:19:21 pst 1997 by way, have tried far repair database are:
• tried dbcc checkalloc(, fix). unfortunately, command not fix , not complete.
• tried drop-db/add-new-db/restore-db-from-backup. unfortunately restore failed complete.
• tried fsck-to-fix-the-devices. not complete , complained “magic number wrong”.
• tried analyze-option-in-format-command-to-repair-disk-0, , add-new-db , restore-db-from-backup. method seemed work. after 1 week or so, found table has i/o error. honestly, don’t know if databases in disk-0 or not.
please me determine hard drive database-files , transaction-files stored, , whether in same hard drive unix operating system.
thanks in advance.
jay chan
Comments
Post a Comment