记一次古董级netapp存储更换故障硬盘全过程

1、案例背景

记一次某医院PACS存储NetApp FAS2554更换故障硬盘的过程。

这个netapp设备以前从未调试过,据客户说该设备上线也有快9年了,头一次故障硬盘。因为己经过保了,客户只是采购的硬盘,我这来免费服务了。。。

netapp调试基本全靠命令行,更换的过程中也遇到了一些麻烦,特此记录一下。

设备大概长这个样子(网上图片,现场没拍)

图片

2、更换过程

替换前,0a.00.2磁盘己经由热备盘替换,RAID-DP状态为normal,active

直接拔下该位置故障磁盘,替换为新的磁盘

检查磁盘状态


FAS2240-A> sysconfig -r          
Aggregate aggr0 (online, raid_dp) (block checksums)Plex /aggr0/plex0 (online, normal, active, pool0)RAID group /aggr0/plex0/rg0 (normal, block checksums)RAID DiskDevice  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)---------------  ------------- ---- ---- ---- ----- --------------    --------------dparity 0a.00.0 0a    0   0   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 parity  0a.00.110a    0   11  SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.4 0a    0   4   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.6 0a    0   6   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.7 0a    0   7   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.8 0a    0   8   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.9 0a    0   9   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.100a    0   10  SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.1 0a    0   1   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 Pool1 spare disks (empty)
Pool0 spare disks (empty)
Partner disks
RAID DiskDevice  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
---------------  ------------- ---- ---- ---- ----- --------------    --------------
partner 0a.00.5 0a    0   5   SA:A   0  BSAS  7200 0/0               1695759/3472914816 
partner 0a.00.3 0a    0   3   SA:A   0  BSAS  7200 0/0               1695759/3472914816

检查所有磁盘,发现磁盘0a.00.2识别到

FAS2240-A> disk show -v  DISK       OWNER                  POOL   SERIAL NUMBER           HOME                     CHKSUM
------------ -------------          -----  -------------           -------------            ------
0a.00.0      FAS2240-A (1897445747)    Pool0  WD-WCAY01059319       FAS2240-A (1897445747)  Block
0a.00.9      FAS2240-A (1897445747)    Pool0  WD-WCAY01110442       FAS2240-A (1897445747)  Block
0a.00.11     FAS2240-A (1897445747)    Pool0  WD-WCAY01118699       FAS2240-A (1897445747)  Block
0a.00.3      FAS2240-B (1897447544)    Pool0  WD-WCAY01148720       FAS2240-B (1897447544)  Block
0a.00.5      FAS2240-B (1897447544)    Pool0  WD-WCAY01110637       FAS2240-B (1897447544)  Block
0a.00.6      FAS2240-A (1897445747)    Pool0  WD-WCAY01138268       FAS2240-A (1897445747)  Block
0a.00.8      FAS2240-A (1897445747)    Pool0  WD-WCAY01140234       FAS2240-A (1897445747)  Block
0a.00.7      FAS2240-A (1897445747)    Pool0  WD-WCAY01148812       FAS2240-A (1897445747)  Block
0a.00.10     FAS2240-A (1897445747)    Pool0  WD-WCAY01059555       FAS2240-A (1897445747)  Block
0a.00.2      FAS3250-B (2017886517)    Pool0  YGHNUAWA              FAS3250-B (2017886517)  Block
0a.00.1      FAS2240-A (1897445747)    Pool0  WD-WCAY01110728       FAS2240-A (1897445747)  Block
0a.00.4      FAS2240-A (1897445747)    Pool0  WD-WCAY01140030       FAS2240-A (1897445747)  Block

0a.00.2为后替换的磁盘,默认分配到FAS3250-B,而B控制器目前只存储系统RAID4,使用磁盘0a.00.5,0a.00.3。B控无法使用0a.00.2,需要切换该磁盘到A控制器。

进入到维护模式

FAS2240-A> priv set diag 
Warning: These diagnostic commands are for use by NetApppersonnel only.

查看disk 命令提示


FAS2240-A*> disk
usage: disk <options>
Options are:
assign {<disk_name> | all | [-T <storage type> | -shelf <shelf name>] [-n <count>] | auto} [-p <pool>] [-o <ownername>] [-s <sysid>] [-c block|zoned] [-f] - assign a disk to a filer or all unowned disks by specifying "all"  or <count> number of unowned disks
ddr_label {repair | print | delete | dumpraw | modify [-c] -o <offset> -v <value> | start_scan | pause_scan | resume_scan | error_scan | rediscover | reinit } [-f] [-d all | <disk_list>]
encrypt { lock | rekey | destroy | sanitize | show } - perform tasks specific to self-encrypting disks
fail [-i] [-f] <disk_name>  - fail a file system disk
maint { start | abort | status | list} - run maintenance tests on one or more disks
power_cycle [ -f ] { [-d <disk_list>] | [ -c <channel_name> [ -s <shelf_number> ] ] } - power-cycle one or more disks
reassign {-o <old_name> | -s <old_sysid>} [-n <new_name>] [-d <new_sysid>] - reassign disks from old filer
remove [-w] <disk_name>     - remove a spare disk
remove_ownership [<disk_name> | all | -s <sysid>] [-f] - revert/remove disk ownership
replace {start [-f] [-m] <disk_name> <spare_disk_name>} | {stop <disk_name>} - replace a file system disk with a spare disk or stop replacing
sanitize { start | abort | status | release } - sanitize one or more disks
sanown_stats {start| stop| show }- collect sanown event stats
scrub  { start | stop }     - start or stop disk scrubbing
shm_stats [<disk_name> | asup | clear_errors]     - Storage Health Monitor statistics for a disk
show [-o <ownername> | -s <sysid> | -n | -v | -a]  - lists disks and owners
simpull <disk_name1> [<disk_name2> [<disk_name3> ... ]]  - simulate one or more disk pulls
simpush [<sim_disk_path_name1> [<sim_disk_path_name2> [<sim_disk_path_name3> ...]] | -l] - simulate one or more disk pushes or list available disks to push
unfail [-s] <disk_name>     - unfail a disk  (-s  not valid in maintenance mode)
zero spares                 - Zero all spare disks

记划从控制器中删除该磁盘,失败

FAS2240-A*> disk remove_ownership 0a.00.2 
disk remove_ownership: Disk 0a.00.2 is not owned by this node.
FAS2240-A*> disk remove_ownership 0a.00.2 -f
disk remove_ownership: Disk 0a.00.2 is not owned by this node.FAS2240-A*> sysconfig        
NetApp Release 8.1.3 7-Mode: Sat Jun  8 08:11:51 PDT 2013
System ID: 1897445747 (FAS2240-A); partner ID: 1897447544 (FAS2240-B)
System Serial Number: 700001384306 (FAS2240-A)
System Rev: D1
System Storage Configuration: Single-Path HA
System ACP Connectivity: Partial Connectivity
slot 0: System BoardProcessors:         4Processor type:     Intel(R) Xeon(R) CPU           C3528  @ 1.73GHzMemory Size:        6144 MBMemory Attributes:  HoistingNormal ECCController:         A
Service Processor           Status: Online
slot 0: Internal 10/100 Ethernet Controller
e0M MAC Address:    00:a0:98:3f:8b:05 (auto-100tx-fd-up)
e0P MAC Address:    00:a0:98:3f:8b:04 (auto-100tx-fd-up)
slot 0: Quad Gigabit Ethernet Controller 82580
e0a MAC Address:    00:a0:98:3f:8b:00 (auto-100tx-fd-up)
e0b MAC Address:    00:a0:98:3f:8b:01 (auto-1000t-fd-down)
e0c MAC Address:    00:a0:98:3f:8b:02 (auto-1000t-fd-down)
e0d MAC Address:    00:a0:98:3f:8b:03 (auto-1000t-fd-down)
slot 0: Interconnect HBA:   Mellanox IB MT25204
slot 0: SAS Host Adapter 0a 12 Disks:            20345.5GB
1 shelf with IOM6E
slot 0: SAS Host Adapter 0b 
slot 0: Intel ICH USB EHCI Adapter u0a (0xdf101000)
boot0Micron Technology Real SSD eUSB 2GB, class 0/0, rev 2.00/11.10, addr 2 1936MB 512B/sect (B9F0022700107745)slot 1: Fibre Channel Target Host Adapter 1aslot 1: Fibre Channel Target Host Adapter 1b

直接接使用命令在A控上分配该磁盘失败


FAS2240-A*> disk assign 0a.00.2
disk assign: Assign failed for one or more disks in the disk list.

使用强制-f参数,分配成功


FAS2240-A*> disk assign 0a.00.2 -f
FAS2240-A*> Sun Oct 20 20:10:18 CST [FAS2240-A:raid.assim.disk.nolabels:error]: Disk 0a.00.2 Shelf 0 Bay 2 [NETAPP   X306_HMARK02TSSA 4321] S/N [YGHNUAWA] has no valid labels. It will be taken out of service to prevent possible data loss.  
Sun Oct 20 20:10:18 CST [FAS2240-A:raid.config.disk.bad.label:error]: Disk 0a.00.2 Shelf 0 Bay 2 [NETAPP   X306_HMARK02TSSA 4321] S/N [YGHNUAWA] has bad label.  
Sun Oct 20 20:10:18 CST [FAS2240-A:callhome.dsk.label:CRITICAL]: Call home for DISK BAD LABEL

分配成功后,该盘标记为坏盘


FAS2240-A*> sysconfig -r
Aggregate aggr0 (online, raid_dp) (block checksums)Plex /aggr0/plex0 (online, normal, active, pool0)RAID group /aggr0/plex0/rg0 (normal, block checksums)RAID DiskDevice  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)---------------  ------------- ---- ---- ---- ----- --------------    --------------dparity 0a.00.0 0a    0   0   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 parity  0a.00.110a    0   11  SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.4 0a    0   4   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.6 0a    0   6   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.7 0a    0   7   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.8 0a    0   8   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.9 0a    0   9   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.100a    0   10  SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.1 0a    0   1   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 Pool1 spare disks (empty)
Pool0 spare disks (empty)
Broken disksRAID DiskDevice  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
---------------  ------------- ---- ---- ---- ----- --------------    --------------
bad label0a.00.2 0a    0   2   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 Partner disksRAID DiskDevice  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
---------------  ------------- ---- ---- ---- ----- --------------    --------------
partner 0a.00.5 0a    0   5   SA:A   0  BSAS  7200 0/0               1695759/3472914816 
partner 0a.00.3 0a    0   3   SA:A   0  BSAS  7200 0/0               1695759/3472914816 
FAS2240-A*> disk show -vDISK       OWNER                  POOL   SERIAL NUMBER           HOME                     CHKSUM
------------ -------------          -----  -------------           -------------            ------
0a.00.0      FAS2240-A (1897445747)    Pool0  WD-WCAY01059319       FAS2240-A (1897445747)  Block
0a.00.9      FAS2240-A (1897445747)    Pool0  WD-WCAY01110442       FAS2240-A (1897445747)  Block
0a.00.11     FAS2240-A (1897445747)    Pool0  WD-WCAY01118699       FAS2240-A (1897445747)  Block
0a.00.3      FAS2240-B (1897447544)    Pool0  WD-WCAY01148720       FAS2240-B (1897447544)  Block
0a.00.5      FAS2240-B (1897447544)    Pool0  WD-WCAY01110637       FAS2240-B (1897447544)  Block
0a.00.6      FAS2240-A (1897445747)    Pool0  WD-WCAY01138268       FAS2240-A (1897445747)  Block
0a.00.8      FAS2240-A (1897445747)    Pool0  WD-WCAY01140234       FAS2240-A (1897445747)  Block
0a.00.7      FAS2240-A (1897445747)    Pool0  WD-WCAY01148812       FAS2240-A (1897445747)  Block
0a.00.10     FAS2240-A (1897445747)    Pool0  WD-WCAY01059555       FAS2240-A (1897445747)  Block
0a.00.1      FAS2240-A (1897445747)    Pool0  WD-WCAY01110728       FAS2240-A (1897445747)  Block
0a.00.4      FAS2240-A (1897445747)    Pool0  WD-WCAY01140030       FAS2240-A (1897445747)  Block
0a.00.2      FAS2240-A (1897445747)    Pool0  YGHNUAWA              FAS2240-A (1897445747)  Block
FAS2240-A*> Sun Oct 20 20:11:00 CST [FAS2240-A:monitor.globalStatus.nonCritical:warning]: Disk on adapter 0a, shelf 0, bay 2, failed.

使用命令标记该盘为正常磁盘

FAS2240-A*> disk unfail  -s 0a.00.2
disk unfail: unfailing disk 0a.00.2...
FAS2240-A*> disk show -v           DISK       OWNER                  POOL   SERIAL NUMBER           HOME                     CHKSUM
------------ -------------          -----  -------------           -------------            ------
0a.00.0      FAS2240-A (1897445747)    Pool0  WD-WCAY01059319       FAS2240-A (1897445747)  Block
0a.00.9      FAS2240-A (1897445747)    Pool0  WD-WCAY01110442       FAS2240-A (1897445747)  Block
0a.00.11     FAS2240-A (1897445747)    Pool0  WD-WCAY01118699       FAS2240-A (1897445747)  Block
0a.00.3      FAS2240-B (1897447544)    Pool0  WD-WCAY01148720       FAS2240-B (1897447544)  Block
0a.00.5      FAS2240-B (1897447544)    Pool0  WD-WCAY01110637       FAS2240-B (1897447544)  Block
0a.00.6      FAS2240-A (1897445747)    Pool0  WD-WCAY01138268       FAS2240-A (1897445747)  Block
0a.00.8      FAS2240-A (1897445747)    Pool0  WD-WCAY01140234       FAS2240-A (1897445747)  Block
0a.00.7      FAS2240-A (1897445747)    Pool0  WD-WCAY01148812       FAS2240-A (1897445747)  Block
0a.00.10     FAS2240-A (1897445747)    Pool0  WD-WCAY01059555       FAS2240-A (1897445747)  Block
0a.00.1      FAS2240-A (1897445747)    Pool0  WD-WCAY01110728       FAS2240-A (1897445747)  Block
0a.00.4      FAS2240-A (1897445747)    Pool0  WD-WCAY01140030       FAS2240-A (1897445747)  Block
0a.00.2      FAS2240-A (1897445747)    Pool0  YGHNUAWA              FAS2240-A (1897445747)  Block
FAS2240-A*> sysconfig -r           
Aggregate aggr0 (online, raid_dp) (block checksums)Plex /aggr0/plex0 (online, normal, active, pool0)RAID group /aggr0/plex0/rg0 (normal, block checksums)RAID DiskDevice  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)---------------  ------------- ---- ---- ---- ----- --------------    --------------dparity 0a.00.0 0a    0   0   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 parity  0a.00.110a    0   11  SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.4 0a    0   4   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.6 0a    0   6   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.7 0a    0   7   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.8 0a    0   8   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.9 0a    0   9   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.100a    0   10  SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.1 0a    0   1   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 Pool1 spare disks (empty)
Pool0 spare disksRAID DiskDevice  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
---------------  ------------- ---- ---- ---- ----- --------------    --------------
Spare disks for block checksum
spare   0a.00.2 0a    0   2   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 (not zeroed)Partner disksRAID DiskDevice  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
---------------  ------------- ---- ---- ---- ----- --------------    --------------
partner 0a.00.5 0a    0   5   SA:A   0  BSAS  7200 0/0               1695759/3472914816 
partner 0a.00.3 0a    0   3   SA:A   0  BSAS  7200 0/0               1695759/3472914816 
FAS2240-A*> aggr status -sPool1 spare disks (empty)Pool0 spare disksRAID DiskDevice  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
---------------  ------------- ---- ---- ---- ----- --------------    --------------
Spare disks for block checksum
spare   0a.00.2 0a    0   2   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 (not zeroed)
FAS2240-A*> vol status -sPool1 spare disks (empty)Pool0 spare disksRAID DiskDevice  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
---------------  ------------- ---- ---- ---- ----- --------------    --------------
Spare disks for block checksum
spare   0a.00.2 0a    0   2   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 (not zeroed)

热备盘为not zeroed,重新格式化该磁盘


FAS2240-A*> disk zero spares

执行命令查看格式化进度,直至格式化完毕

FAS2240-A*> vol status -s   
Pool1 spare disks (empty)
Pool0 spare disksRAID DiskDevice  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
---------------  ------------- ---- ---- ---- ----- --------------    --------------
Spare disks for block checksum
spare   0a.00.2 0a    0   2   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 (zeroing, 0% done)FAS2240-A*> vol status -sPool1 spare disks (empty)Pool0 spare disksRAID DiskDevice  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
---------------  ------------- ---- ---- ---- ----- --------------    --------------
Spare disks for block checksum
spare   0a.00.2 0a    0   2   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 (zeroing, 8% done)FAS2240-A*> vol status -sPool1 spare disks (empty)Pool0 spare disksRAID DiskDevice  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
---------------  ------------- ---- ---- ---- ----- --------------    --------------
Spare disks for block checksum
spare   0a.00.2 0a    0   2   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 (zeroing, 11% done)FAS2240-A> vol status -sPool1 spare disks (empty)Pool0 spare disksRAID DiskDevice  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
---------------  ------------- ---- ---- ---- ----- --------------    --------------
Spare disks for block checksum
spare   0a.00.2 0a    0   2   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 
FAS2240-A> sysconfig -r
Aggregate aggr0 (online, raid_dp) (block checksums)Plex /aggr0/plex0 (online, normal, active, pool0)RAID group /aggr0/plex0/rg0 (normal, block checksums)RAID DiskDevice  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)---------------  ------------- ---- ---- ---- ----- --------------    --------------dparity 0a.00.0 0a    0   0   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 parity  0a.00.110a    0   11  SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.4 0a    0   4   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.6 0a    0   6   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.7 0a    0   7   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.8 0a    0   8   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.9 0a    0   9   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.100a    0   10  SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 data    0a.00.1 0a    0   1   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 Pool1 spare disks (empty)Pool0 spare disksRAID DiskDevice  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
---------------  ------------- ---- ---- ---- ----- --------------    --------------
Spare disks for block checksum
spare   0a.00.2 0a    0   2   SA:A   0  BSAS  7200 1695466/3472315904 1695759/3472914816 Partner disksRAID DiskDevice  HA  SHELF BAY CHAN Pool Type  RPM  Used (MB/blks)    Phys (MB/blks)
---------------  ------------- ---- ---- ---- ----- --------------    --------------
partner 0a.00.5 0a    0   5   SA:A   0  BSAS  7200 0/0               1695759/3472914816 
partner 0a.00.3 0a    0   3   SA:A   0  BSAS  7200 0/0               1695759/3472914816 

到这里,全流程更换完毕!

也欢迎关注我的公众号【徐sir的IT之路】,一起学习————————————————————————————
公众号:徐sir的IT之路
CSDN :https://blog.csdn.net/xxddxhyz?type=blog
墨天轮:https://www.modb.pro/u/3605
PGFANS:https://www.pgfans.cn/user/home?userId=5568————————————————————————————

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/bicheng/6122.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

docker 基础命令

docker 安装 更新系统 sudo apt update sudo apt -y dist-upgrade安装docker sudo apt-get -y install ca-certificates curl gnupg lsb-release sudo mkdir -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/…

Servlet(一些实战小示例)

文章目录 一、实操注意点1.1 代码修改重启问题1.2 Smart Tomcat的日志1.3 如何处理错误 一. 抓自己的包二、构造一个重定向的响应&#xff0c;让页面重定向到百度主页三、让服务器返回一个html数据四、表白墙4.1 约定前后端数据4.2 前端代码4.3 后端代码4.4 保存在数据库的版本…

力扣hot100:101. 对称二叉树(双指针以不同方式递归)

LeetCode&#xff1a;101. 对称二叉树 看了第一个样例&#xff0c;很容易直接层序遍历看每一层的前后是否相同。但接下来这个样例告诉你&#xff0c;不能这样做。 层序遍历 仔细思考会发现&#xff0c;层序遍历不能看本结点&#xff0c;但是可以看儿子结点是否对称&#xf…

【JAVA进阶篇教学】第九篇:MyBatis-Plus用法介绍

博主打算从0-1讲解下java进阶篇教学&#xff0c;今天教学第九篇&#xff1a;MyBatis-Plus用法介绍。 在 MyBatis-Plus 3.5.0 中&#xff0c;LambdaQueryWrapper支持多种条件构造方式&#xff0c;除了等于&#xff08;eq&#xff09;、不等于&#xff08;ne&#xff09;、大于&a…

tomcat篇-windows 运行tomcat的startup.bat时,终端打印的中文显示为乱码

当运行Tomcat的startup.bat时&#xff0c;如果终端中中文显示为乱码&#xff0c;这通常是因为Tomcat使用的日志输出编码与Windows命令行默认的编码不匹配。针对这一问题&#xff0c;你可以尝试以下步骤来解决&#xff1a; 1、执行startup.bat&#xff0c;在输出的窗口右击&…

【MyBatis】深入解析MyBatis:高效操作数据库技术详解

&#x1f493; 博客主页&#xff1a;从零开始的-CodeNinja之路 ⏩ 收录文章&#xff1a;【MyBatis】深入解析MyBatis&#xff1a;高效操作数据库技术详解 &#x1f389;欢迎大家点赞&#x1f44d;评论&#x1f4dd;收藏⭐文章 目录 动态SQL1. \<if>标签2. \<trim&…

Spring - 6 ( 9000 字 Spring 入门级教程 )

一&#xff1a; SpringBoot 配置文件 1.1 配置文件作用 配置文件通常是一个文本文件&#xff0c;其中包含了程序或系统的各种设置、选项和参数。比如C:\Users, C:\Windows 文件夹, 以及各种 .config, .xml 文件 配置文件主要是为了解决硬编码&#xff08;代码写死&#xff0…

专业渗透测试 Phpsploit-Framework(PSF)框架软件小白入门教程(一)

本系列课程&#xff0c;将重点讲解Phpsploit-Framework框架软件的基础使用&#xff01; 本文章仅提供学习&#xff0c;切勿将其用于不法手段&#xff01; Phpsploit-Framework&#xff08;简称 PSF&#xff09;框架软件&#xff0c;是一款什么样的软件呢&#xff1f; Phpspl…

模拟实现memcpy,memmove,memset,memcmp

memcpy void * memcpy ( void * destination, const void * source, size_t num ); 使用注意事项&#xff1a; 从source的位置向后复制num个字节数据到destination所指向的内存位置中。 这个函数遇到如果源空间和⽬标空间出现重叠&#xff0c;就得使⽤memmove函数处理。 …

【Linux入门】基础开发工具

本篇博客整理了Linux&#xff08;centOS版本&#xff09;中基础开发工具的用途和用法&#xff0c;旨在透过开发工具的使用&#xff0c;帮助读者更好地理解可执行程序的编写、编译、运行等。 目录 一、软件包管理器 yum 1.软件的下载与安装 2.Linux应用商店&#xff1a;yum …

C#描述-计算机视觉OpenCV(4):图像分割

C#描述-计算机视觉OpenCV&#xff08;4&#xff09;&#xff1a;图像分割 前言用 GrabCut 算法分割图像实例展示 前言 本文中如果有什么没说明的地方&#xff0c;大概率在前文中描述过了。 C#描述-计算机视觉OpenCV&#xff08;1&#xff09;&#xff1a;基础操作 C#描述-计算…

VTK —— 二、教程五 - 通过鼠标事件与渲染交互(附完整源码)

代码效果 本代码编译运行均在如下链接文章生成的库执行成功&#xff0c;若无VTK库则请先参考如下链接编译vtk源码&#xff1a; VTK —— 一、Windows10下编译VTK源码&#xff0c;并用Vs2017代码测试&#xff08;附编译流程、附编译好的库、vtk测试源码&#xff09; 教程描述 本…

Unity类银河恶魔城学习记录15-3 p155 More example on audio effects

Alex教程每一P的教程原代码加上我自己的理解初步理解写的注释&#xff0c;可供学习Alex教程的人参考 此代码仅为较上一P有所改变的代码 【Unity教程】从0编程制作类银河恶魔城游戏_哔哩哔哩_bilibili ​ AudioManager.cs using System.Collections; using System.Collections.…

XYCTF2024 RE Trustme 复现

但是只得到用户名 admin 法一&#xff1a;猜Sql注入&#xff0c;直接万能密码 法二&#xff1a;正常逆向 jadx中的AndroidManifest.xml有奇怪之处 怀疑有加壳&#xff0c;进ProxyApplication看看 大量安卓一代壳的特征 Android第一代壳加固原理及实现 - 知乎 GitHub - Huye…

基于双层优化的电动汽车优化调度研究(附matlab程序)

基于双层优化的电动汽车优化调度研究 0.代码链接 基于双层优化的电动汽车优化调度研究(matlab程序)资源-CSDN文库 1.简述 关键词&#xff1a;双层优化 选址定容 输配协同 时空优化 参考文档&#xff1a;《考虑大规模电动汽车接入电网的双层优化调度策略_胡文平》…

confluence 设置https代理

使用nginx反待confluence并开启https后&#xff0c;登录confluence会一直提示&#xff1a;scheme、proxyName、proxyPort设置错误。 解决办法&#xff1a; find / -name server.xmlvi /opt/atlassian/confluence/conf/server.xml HTTP反代配置 HTTPS反代配置

[leetcode] 61. 旋转链表

文章目录 题目描述解题方法遍历java代码复杂度分析 相似题目 题目描述 给你一个链表的头节点 head &#xff0c;旋转链表&#xff0c;将链表每个节点向右移动 k 个位置。 示例 1&#xff1a; 输入&#xff1a;head [1,2,3,4,5], k 2 输出&#xff1a;[4,5,1,2,3]示例 2&…

ICode国际青少年编程竞赛- Python-1级训练场-for循环练习

ICode国际青少年编程竞赛- Python-1级训练场-for循环练习 1、 for i in range(3):Dev.step(4)Dev.turnLeft()2、 for i in range(3):Dev.step(2)Dev.turnRight()Dev.step(2)Dev.turnLeft()3、 for i in range(3):Dev.step(2)Dev.turnRight()Dev.step(2)Dev.turnLeft()4、 for…

Deep learning Part Five RNN--24.4.29

接着上期&#xff0c;CBOW模型无法解决文章内容过长的单词预测的&#xff0c;那该如何解决呢&#xff1f; 除此之外&#xff0c;根据图中5-5的左图所示&#xff0c;在CBOW模型的中间层求单词向量的和&#xff0c;这时就会出现另一个问题的&#xff0c;那就是上下文的单词的顺序…

PC通过串口发送指令控制LED+串口中断

如何让单片机接收数据&#xff1f; 首先要打开SCON中的串行接收控制位REN。当REN1时为允许接收状态&#xff0c;可以接收信息。 因此令SCON 0x50&#xff1b; 怎么知道收到数据&#xff1f; 利用RI接收中断请求标志位。当串行接收到第8位结束时由内部硬件自动置为RI1&#…