Po przypadkowym usunięciu volumenu z discpooli występują problemy z tzw. osieroconymi bitami( brak odzwierciedlenia tego co jest w bazie z tym co jest na volumenach).
Historia:
Administrator ADMIN issued command: QUERY ACTLOG search=orphan
Administrator IBM_SERVICE issued command: REPAIR ORPHANS reset
Administrator IBM_SERVICE issued command: REPAIR ORPHANS repair
AUDIT VOLUME f:\TSM\DISKPOOL\DISK2.dsm fix=yes
AUDIT VOLUME f:\TSM\DISKPOOL\DISK3.dsm fix=yes
AUDIT VOLUME f:\TSM\DISKPOOL\DISK4.dsm fix=yes
....
QUERY CONTENT F:\TSM\DISKPOOL\DISK2.DSM
UPDATE SCRIPT MAINTENANCE_PLAN "/* EXP_INV_START */" LINE=800
...
DELETE OBJECT 25666578
....
REGISTER ADMIN IBM_SERVICE ?***?
GRANT AUTHORITY IBM_SERVICE classes=system
....
z usera IBM_SERVICE
REPAIR ORPHANS scan
REPAIR ORPHANS reset
REPAIR ORPHANS repair
QUERY ACTLOG search=orphan
....
sprawdzanie zajętrosci w db2
z
"C:\Program Files\Tivoli\TSM\db2\BIN\"
"C:\Program Files\Tivoli\TSM\db2\BIN\DB2CMD.exe" DB2SETCP.BAT DB2.EXE
db2 => connect to tsmdb1
db2 => select * from tsmdb1.bv_master_supernode
MSNID CAPACITY
----------- -----------
3311 268435455
52 262143999
53 262143999
3312 268435455
3313 268435455
3865 134217727
Wybrano 6 rekordów.
db2 => select count(*) from tsmdb1.ds_segments where volid=2
1
-----------
18908
Wybrano 1 rekordów.
db2 => select count(*) from tsmdb1.ds_overflow where volid=2
1
-----------
47805
Wybrano 1 rekordów.
=========================================================================================================
As per my discussion with the developer involved, we would like to take a look at the aggregates that have the error.
So for each of these aggregates, do the following. Since you got an error on 18984687, I'll use that as an example:
1) show aggr 0 18984687
2) show bfo 18984687
The volume or volumes displayed at the end of this output is the most interesting part.
3) From a DB2 CLP session, connect to the database, and set the schema, then run the following SQL queries
a) db2 select bfid, poolid, numsegs, deleted from df_bitfiles
b) db2 select bfid, poolid, numsegs, deleted from af_bitfiles
c) db2 select bfid, superbfid from bf_aggregated_bitfiles where superbfid=18984687
d) db2 select superbfid from bf_aggregate_attributes where superbfid=18984687
The above step is an example, you will have to run these steps for the following aggregates values which I extracted for the last actlog you provided on 22nd April.
aggregate 20839005
aggregate 17882363
aggregate 17883214
aggregate 18984687
aggregate 24711315
aggregate 25018525
aggregate 25684545
aggregate 25686837
aggregate 15214541
aggregate 19026749
aggregate 19809140
aggregate 27393788
aggregate 18452031
aggregate 18452822
aggregate 19359395
aggregate 19366237
aggregate 19358395
aggregate 19359395
aggregate 18747979
aggregate 18748235
aggregate 19510353
After we have the above outputs, we'll figure out the next step.
=================================================================
Do wykonania sql'i DB2 wykonałem polecenia:
C:\Program Files\Tivoli\TSM\db2\BIN>db2 -r c:\sel1.txt -tf c:\options.log
W pliku c:\options.log
----------------
!db2start;
connect to tsmdb1;
select bfid, poolid, numsegs, deleted from tsmdb1.df_bitfiles;
terminate;
----------------
Na potrzeby analizy środowiska powstało kilka skryptów:
=============
Wyświetla informacje o bitach DF
begining: tsmDFbitfile.cmd
=============
REM #
rem #######CONFIGURATION##################################################
rem #
rem #
rem #ustawiam zmienna nazwy pliku
for /f "Tokens=1-4 Delims=- " %%i in ('date /t') do (
set dt=%%i-%%j-%%k
)
rem #"C:\Program Files\Tivoli\TSM\baclient\dsmadmc.exe" -se=10.101.110.150 -id=admin
rem # Application path
set APPPATH="%ProgramFiles%\Tivoli\TSM\baclient\dsmadmc.exe"
rem # Application path dir
set APPPATHDIR="%ProgramFiles%\Tivoli\TSM\baclient\"
rem
rem Application options
set APPOPT=-se=10.10.10.150 -id=admin -password=*****
rem #0
rem # Filename for show aggr
set S=K:\%dt%S.txt
rem #
rem #1
rem # Filename for show bfo
set bfo=K:\%dt%bfo.txt
rem #
rem #5 Filename with printable report
set REPORTPRINT=K:\%dt%REPORTPRINT.txt
rem #
rem #End of configuration. Do not edit lines below.
rem ######################################################################
for %%z in (18984687 17882363 17883214 24711315 25018525 25684545 25686837 15214541 19026749 19809140 27393788 18452031 18452822 19359395 19366237 19358395 19359395 18747979 18748235 19510353) do (
rem #0 Do show aggr for specified id's
cd %APPPATHDIR%
%APPPATH% %APPOPT% -outfile=%S% show aggr 0 %%z
type %S% >> %REPORTPRINT%
rem #1 Do show bfo for specified id's
cd %APPPATHDIR%
%APPPATH% %APPOPT% -outfile=%bfo% show bfo %%z
type %bfo% >> %REPORTPRINT%
)
rem join files to output print file
rem type %SCHEDULE% >> %REPORTPRINT%
rem print /D:\\spoler01\c099 %REPORTPRINT%
notepad.exe %REPORTPRINT%
rem delete all tmp files
del %S% %REPORTPRINT% %SCHEDULE% %tmp%\%dt%yesterday.txt
=============
end: tsmDFbitfile.cmd
=============
=============
begining: DB2DFbitfile.cmd
=============
REM script to report some important administrative
rem #######CONFIGURATION##################################################
rem #
rem #
rem #ustawiam zmienna nazwy pliku
for /f "Tokens=1-4 Delims=- " %%i in ('date /t') do (
set dt=%%i-%%j-%%k
)
rem #" db2cmd -c -w -i db2 -td@ -fInputFile
rem # Application path
set APPPATH="%ProgramFiles%\Tivoli\TSM\db2\BIN\DB2cmd.exe" -c -w -i DB2SETCP.BAT db2.exe
rem # Application path dir
set APPPATHDIR="%ProgramFiles%\Tivoli\TSM\db2\BIN\"
rem
rem #0
rem # Filename for select statement1
set S=F:\DVD\%dt%S.txt
rem #
rem #1
rem # Filename for select statement2
set ss=F:\DVD\%dt%ss.txt
rem #
rem #5 Filename with printable report1
set REPORTPRINT1=F:\DVD\%dt%REPORTPRINT1.txt
rem #5 Filename with printable report2
set REPORTPRINT2=F:\DVD\%dt%REPORTPRINT2.txt
rem #
rem #End of configuration. Do not edit lines below.
rem ######################################################################
for %%z in (18984687 17882363 17883214 24711315 25018525 25684545 25686837 15214541 19026749 19809140 27393788 18452031 18452822 19359395 19366237 19358395 19359395 18747979 18748235 19510353) do (
rem #0 Do select1 for specified id's
cd %APPPATHDIR%
echo !db2start;> f:\dvd\options.txt
echo connect to tsmdb1;>> f:\dvd\options.txt
echo select bfid, superbfid from tsmdb1.bf_aggregated_bitfiles where superbfid=%%z;
>> f:\dvd\options.txt
echo terminate;>> f:\dvd\options.txt
%APPPATH% -r %s% -tf f:\dvd\options.txt
type %s% >> %REPORTPRINT1%
rm %s%
rem #1 Do select2 for specified id's
cd %APPPATHDIR%
echo !db2start;> f:\dvd\options2.txt
echo connect to tsmdb1;>> f:\dvd\options2.txt
echo select superbfid from tsmdb1.bf_aggregate_attributes where superbfid=%%z;
>> f:\dvd\options2.txt
echo terminate;>> f:\dvd\options2.txt
%APPPATH% -r %ss% -tf f:\dvd\options2.txt
type %ss% >> %REPORTPRINT2%
rm %ss%
)
rem join files to output print file
rem type %SCHEDULE% >> %REPORTPRINT%
rem print /D:\\spoler01\c099 %REPORTPRINT%
notepad.exe %REPORTPRINT1%
notepad.exe %REPORTPRINT2%
rem delete all tmp files
del %S% %ss% %REPORTPRINT1% %REPORTPRINT2% %SCHEDULE% %tmp%\%dt%yesterday.txt
=============
end: DB2DFbitfile.cmd
=============