我们如何查看 3PAR 存储 TOC (Table Of Content)数据结构内部内容
我们如何查看 3PAR 存储 TOC (Table Of Content)数据结构内部内容
TOCTOOL 分析过程
存储 3PAR 8400 有19块磁盘:
root@1690216-0 Tue Jan 12 15:53:59:~# showpd -c
-------- Normal Chunklets -------- ---- Spare Chunklets ----
- Used -- -------- Unused -------- - Used - ---- Unused ----
Id CagePos Type State Total OK Fail Free Uninit Unavail Fail OK Fail Free Uninit Fail
0 0:3:0 FC normal 408 211 0 106 0 0 0 0 0 91 0 0
1 0:1:0 FC normal 408 179 0 138 0 0 0 0 0 91 0 0
2 0:2:0 FC normal 408 203 0 114 0 0 0 0 0 91 0 0
3 1:1:0 FC normal 408 212 0 105 0 0 0 0 0 91 0 0
4 1:0:0 FC normal 408 166 0 151 0 0 0 0 0 91 0 0
5 0:4:0 FC normal 408 165 0 152 0 0 0 0 0 91 0 0
6 1:2:0 FC normal 408 176 0 142 0 0 0 0 0 90 0 0
7 1:3:0 FC normal 408 201 0 117 0 0 0 0 0 90 0 0
8 1:4:0 FC normal 408 158 0 160 0 0 0 0 0 90 0 0
10 0:5:0 SSD normal 446 374 0 72 0 0 0 0 0 0 0 0
11 0:6:0 SSD normal 446 361 0 85 0 0 0 0 0 0 0 0
12 0:7:0 SSD normal 446 373 0 73 0 0 0 0 0 0 0 0
13 1:5:0 SSD normal 446 374 0 72 0 0 0 0 0 0 0 0
14 1:6:0 SSD normal 446 361 0 85 0 0 0 0 0 0 0 0
15 1:7:0 SSD normal 446 373 0 73 0 0 0 0 0 0 0 0
16 0:8:0 NL normal 902 498 0 157 0 0 0 0 0 247 0 0
17 0:9:0 NL normal 902 497 0 158 0 0 0 0 0 247 0 0
18 1:8:0 NL normal 902 498 0 157 0 0 0 0 0 247 0 0
19 1:9:0 NL normal 902 499 0 156 0 0 0 0 0 247 0 0
-----------------------------------------------------------------------------------------
19 total 9956 5879 0 2273 0 0 0 0 0 1804 0 0
root@1690216-0 Tue Jan 12 15:55:22:~#
我们查看存储 3PAR 8400 的 TOC (Table Of Content):
root@1690216-0 Tue Jan 12 15:53:47:~# toctool -s
Generation 1395614 15 of 15 found Version 193 Sysname ss8400b Sysid 90216
Generation 0 4 of 0 found Version 0 Sysname ss8400b Sysid 90216
我们可以得出这19块磁盘并非所有磁盘都有TOC,其中有15块磁盘有 TOC, 4块磁盘没有存放 TOC。
root@1690216-0 Tue Jan 12 15:53:53:~# toctool -l
WWN 5000CCA05507355F Generation 1395614 Total_TOCs 15 Version 193 Sysname ss8400b Sysid 90216
WWN 5000CCA055071FBF Generation 1395614 Total_TOCs 15 Version 193 Sysname ss8400b Sysid 90216
WWN 5000CCA05507550F Generation 1395614 Total_TOCs 15 Version 193 Sysname ss8400b Sysid 90216
WWN 5000CCA04E4F2AEF Generation 1395614 Total_TOCs 15 Version 193 Sysname ss8400b Sysid 90216
WWN 5000CCA04E4E745B Generation 1395614 Total_TOCs 15 Version 193 Sysname ss8400b Sysid 90216
WWN 5000CCA04E4E34DF Generation 1395614 Total_TOCs 15 Version 193 Sysname ss8400b Sysid 90216
WWN 5000C500850FE27C Generation 0 Total_TOCs 0 Version 0 Sysname ss8400b Sysid 90216
WWN 5000C50083CC3B5C Generation 0 Total_TOCs 0 Version 0 Sysname ss8400b Sysid 90216
WWN 5000CCA055073E93 Generation 1395614 Total_TOCs 15 Version 193 Sysname ss8400b Sysid 90216
WWN 5000CCA04E4E364B Generation 1395614 Total_TOCs 15 Version 193 Sysname ss8400b Sysid 90216
WWN 5000CCA04E4E1F37 Generation 1395614 Total_TOCs 15 Version 193 Sysname ss8400b Sysid 90216
WWN 5000CCA04E4E406F Generation 1395614 Total_TOCs 15 Version 193 Sysname ss8400b Sysid 90216
WWN 5000C500850EFC34 Generation 0 Total_TOCs 0 Version 0 Sysname ss8400b Sysid 90216
WWN 5000C500850FC5BC Generation 0 Total_TOCs 0 Version 0 Sysname ss8400b Sysid 90216
WWN 5000CCA0550737F7 Generation 1395614 Total_TOCs 15 Version 193 Sysname ss8400b Sysid 90216
WWN 5000CCA0550720A7 Generation 1395614 Total_TOCs 15 Version 193 Sysname ss8400b Sysid 90216
WWN 5000CCA0550721EF Generation 1395614 Total_TOCs 15 Version 193 Sysname ss8400b Sysid 90216
WWN 5000CCA05507206F Generation 1395614 Total_TOCs 15 Version 193 Sysname ss8400b Sysid 90216
WWN 5000CCA055070D3B Generation 1395614 Total_TOCs 15 Version 193 Sysname ss8400b Sysid 90216
root@1690216-0 Tue Jan 12 15:53:59:~#
显示当前的存储的 TOC
root@1690216-0 Tue Jan 12 15:55:22:~# showtoc
gltab toc generation: 1395614
Toc modified time: 2021-01-12 15:49:03 CST
Toc header magic num: 42444854
Toc in use len: 652051
Toc not in use len: 2199
Toc on disk len: 98304
Toc version: 193
Toc generation: 1395614
Toc pd_entries: 19
Toc ld_entries: 125
Toc vv_entries: 73
Toc cage_entries: 2
root@1690216-0 Tue Jan 12 16:01:47:~#
Dump 3PAR TOC
root@1690216-0 Tue Jan 12 16:46:16:/common/support# toctool -r
Created /common/tocs/complete_toc_90216_1395617.tar
root@1690216-0 Tue Jan 12 16:47:06:/common/tocs# ls -al
-rw-r--r-- 1 root root 8499200 Jan 12 16:46 complete_toc_90216_1395617.tar
-rw-r--r-- 1 root root 98304 Jan 12 16:46 toc_90216_1395617_base0
-rw-r--r-- 1 root root 512 Jan 12 16:46 toc_90216_1395617_label
-rw-r--r-- 1 root root 8388608 Jan 12 16:46 toc_90216_1395617_logs
-rw-r--r-- 1 root root 1024 Jan 12 16:46 toc_90216_1395617_pheaders
root@1690216-0 Tue Jan 12 16:47:09:/common/tocs#
显示 TOC 的结构内容
root@1690216-0 Tue Jan 12 16:49:19:/common/tocs# tocsvr --describe toc_90216_1395617|more
TOC Header:
th_struct_id = 0x42444854
th_toc_len = 36
th_toc_empty_len = 2199
th_version = 193
th_generation = 1395617
th_uncompressed_len = 652051
th_total_tocs = 15
th_base_toc_offset = 8398336
th_disk_len = 98304
th_mtoc_len = 652051
th_base_len = 98304
th_log_used = 140288
th_log_cnt = 1
th_modified_time = 1610440443
th_uuid = f6a8e62e-db83-4737-b00d-3d47414739b1
th_base_tocgen = 1395357
th_log_start = 3375104
th_old_base_tocgen = 0
th_old_mtoc_len = 0
th_old_base_toc_offset = 0
th_data_crc32 = 779236226
th_crc32 = 3853609877
MARKER Header at 0x64:
tm_struct_id = 0x424b4d54
tm_type = 38
tm_ver = 1
tm_len = 12
举例一块磁盘的信息
root@1690216-0 Tue Jan 12 17:01:48:~# showpd -i |grep -i 5000cca0550720a7
4 1:0:0 normal 5000CCA0550720A7 HITACHI HCBRE0450GBAS10K KHG3XJ0N 3P02 SAS Magnetic 2016-05-17 13:57:06 CST
root@1690216-0 Tue Jan 12 17:02:17:~#
==================================================================================
MARKER Header at 0x70c5:
tm_struct_id = 0x424b4d54
tm_type = 1
tm_ver = 1
tm_len = 292
PD_TYPE entry
tp_id = 4
tp_wwn = 0x5000cca0550720a7
tp_wwn_re = 0x0000000000000000
tp_node_wwn = 0x5000cca0550720a7
tp_op = 0
tp_sector_size = 512
tp_block_count = 879097968
tp_chunklet_size = 2097152
tp_jbod = 1
tp_sled = 0
tp_position = 0
tp_med_state = 0
tp_toc_mstate = 0
tp_singlebitflag = 0x0
tp_dis_path_bitmap = 0
tp_is_toc_pd = 1
tp_num_chunklets = 408
tp_devtype = 1
tp_fake_base = 0
tp_port0_lpid = 012
tp_port1_lpid = 0212
tp_port2_lpid = 0177774
tp_port3_lpid = 0177774
tp_port0_type = 0
tp_port1_type = 0
tp_port2_type = 0
tp_port3_type = 0
tp_devid = HCBRE0450GBAS10K
tp_vendor_id = HITACHI
tp_prod_rev_level = 3P02
tp_serial_num = KHG3XJ0N
tp_servicemag = 0
tpd_pad =
tp_not_need_dl = 2
tp_devspeed = 10
tp_br_vendor_id =
tp_br_product_id =
tp_br_fw_rev =
tp_thitemp = 50
tp_tmax = 58
tp_pad1 =
tp_admit_time = 1463464626
tp_scrubber_start = 0
tp_scrubber_end = 0
tp_wear_level_50 = 0
tp_wear_level_75 = 0
tp_wear_level_90 = 0
tp_wear_level_95 = 0
tp_thrott_rate = 4294967295
tp_last_wear_level_check = 0
tp_last_thrott_rate_update = 0
MARKER Header at 0x71f1:
tm_struct_id = 0x424b4d54
tm_type = 25
tm_ver = 1
tm_len = 136
PDCH_TYPE entry
tc_pdid = 4
tc_pad1 = 0
tc_first_pdpos = 0
tc_chunks[0].tc_ldid = 2330
tc_chunks[0].tc_ldch = 1
tc_chunks[0].tc_flags = 0x0
tc_chunks[1].tc_ldid = 2367
tc_chunks[1].tc_ldch = 13
tc_chunks[1].tc_flags = 0x0
tc_chunks[2].tc_ldid = 2330
tc_chunks[2].tc_ldch = 7
tc_chunks[2].tc_flags = 0x0
tc_chunks[3].tc_ldid = 2332
tc_chunks[3].tc_ldch = 14
tc_chunks[3].tc_flags = 0x0
tc_chunks[4].tc_ldid = 2331
tc_chunks[4].tc_ldch = 0
tc_chunks[4].tc_flags = 0x0
tc_chunks[5].tc_ldid = 4294967294
... ... ... ...
tc_chunks[12].tc_ldid = 4294967294
tc_chunks[12].tc_ldch = 0
tc_chunks[12].tc_flags = 0x2
tc_chunks[13].tc_ldid = 2338
tc_chunks[13].tc_ldch = 4
tc_chunks[13].tc_flags = 0x0
tc_chunks[14].tc_ldid = 2339
tc_chunks[14].tc_ldch = 0
tc_chunks[14].tc_flags = 0x0
tc_chunks[15].tc_ldid = 2333
tc_chunks[15].tc_ldch = 5
tc_chunks[15].tc_flags = 0x0
显示 TOC 中的 CPG 内容
MARKER Header at 0x16cd4:
tm_struct_id = 0x424b4d54
tm_type = 22
tm_ver = 1
tm_len = 1700
TP_TYPE entry
tt_id = 10
tt_name = SSD_r1
tt_domain = 0
tt_nodes = 0
tt_warnp = 0
tt_sacnt = 1
tt_sdcnt = 13
tt_svcnt = 1
tt_sgcnt = 0
tt_sagseq = 0
tt_sdgseq = 0
tt_sagwarn = 0
tt_sdgwarn = 0
tt_sagsize = 16777216
tt_sdgsize = 134217728
tt_sagpoint = 12582912
tt_sdgpoint = 12582912
tt_saglimit = 0
tt_sdglimit = 0
tt_sagparms = -p -devtype SSD -ha cage -p -devtype SSD
tt_sdgparms = -ss 32 -ssz 2 -t r1 -p -devtype SSD
tt_comments = Default R1 CPG using SSD drives
tt_uuid = 4f4f1a6c-adb5-4e40-b78c-5911b9396cef
tt_rmm_user_usage = 0
tt_rmm_snap_usage = 0
tt_dds_vid = 4294967294
tt_dedup_gc_kb = 0
TOC 是分布到部分磁盘的头信息,这些头信息是通过 tocsvr 后台进程去读取。如果 tocsvr 进程无法启动或 TOC 内容被破坏了,就会导致存储无法启动。首先我们要清楚数据结构内部的内容。
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作