新开传奇网站195合击,网站上的小动画咋做,昆山广告公司,贵阳网站建设哪家便宜今天干了一件蠢事#xff0c;距离删库跑路#xff0c;只差一步。把一块RAID0的磁盘给拔掉了,拔掉之后发现这是一块数据盘#xff0c;幸好这个数据库是一台备库。赶紧动手恢复#xff0c;以下是恢复的过程。 首先把拔下来的盘插回去#xff0c;通过Megacli查看状态是这样的… 今天干了一件蠢事距离删库跑路只差一步。把一块RAID0的磁盘给拔掉了,拔掉之后发现这是一块数据盘幸好这个数据库是一台备库。赶紧动手恢复以下是恢复的过程。 首先把拔下来的盘插回去通过Megacli查看状态是这样的 root# /opt/MegaRAID/MegaCli/MegaCli64 -pdlist -aall ......Enclosure Device ID: 32
Slot Number: 7
Enclosure position: 1
Device Id: 7
WWN: 5000c5004de11ef8
Sequence Number: 15
Media Error Count: 0
Other Error Count: 4
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATARaw Size: 1.819 TB [0xe8e088b0 Sectors]
Non Coerced Size: 1.818 TB [0xe8d088b0 Sectors]
Coerced Size: 1.818 TB [0xe8d00000 Sectors]
Sector Size: 0
Firmware state: Unconfigured(good), Spun Up
Device Firmware Level: PA07
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x4433221103000000
Connected Port Number: 5(path0)
Inquiry Data: Z1P3CVR1ST2000NM0011 PA07
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: Foreign
Foreign Secure: Drive is not secured by a foreign lock key
Device Speed: 3.0Gb/s
Link Speed: 3.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :38C (100.40 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Drives NCQ setting : N/A
Port-0 :
Port status: Active
Ports Linkspeed: 3.0Gb/s
Drive has flagged a S.M.A.R.T alert : No可以看到磁盘的状态变成了Firmware state: Unconfigured(good)Foreign State: Foreign。 查看原RAID0的组ID这里看到源RAID0组ID为1 rootproxmox35:~# /opt/MegaRAID/MegaCli/MegaCli64 -GetPreservedCacheList -a0Adapter #0Virtual Drive(Target ID 01): Missing.Exit Code: 0x00 先清除一下磁盘的Foreign状态 rootproxmox35:~# /opt/MegaRAID/MegaCli/MegaCli64 -cfgforeign -clear -a0Foreign configuration 0 is cleared on controller 0.Exit Code: 0x00 然后直接新建RAID0组 rootproxmox35:~# /opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r0[32:7] WB Direct -a0Adapter 0: Configure Adapter FailedFW error description: The current operation is not allowed because the controller has data in cache for offline or missing virtual drives. Exit Code: 0x54 这里报出有缓存需要清理我们做下清理操作 rootproxmox35:~# /opt/MegaRAID/MegaCli/MegaCli64 -DiscardPreservedCache -L1 -a0Adapter #0Virtual Drive(Target ID 01): Preserved Cache Data Cleared.Exit Code: 0x00#然后再次尝试添加RAID0组 rootproxmox35:~# /opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r0 [32:7] -a0Adapter 0: Created VD 1 Adapter 0: Configured the Adapter!! 通过fdisk查看磁盘已经能看到恢复回去的磁盘了而且里面是带有之前的分区信息 rootproxmox35:~# fdisk -l......Disk /dev/sdd: 1.8 TiB, 1999844147200 bytes, 3905945600 sectors
Units: sectors of 1 * 512 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xd9109a0aDevice Boot Start End Sectors Size Id Type
/dev/sdd1 2048 209717247 209715200 100G 83 Linux #这里的设备需要可能跟之前的不一样需要自己根据情况观察...... 剩下的就是把之前的挂载目录卸载重新挂载恢复回来的盘符就可以了。 rootproxmox35:/mnt# ls
ls: reading directory .: Input/output error
rootproxmox35:/mnt# cd ..
rootproxmox35:/# umount /mnt #这里如果出现 Device busy报错加个 -l 参数即可
rootproxmox35:/# mount /dev/sdd1 /mnt
rootproxmox35:/# cd /mnt
rootproxmox35:/mnt# ls
8.07.14_MegaCLI.txt 8-07-14_MegaCLI.zip a1 a2 a3 a4 b1 b2 b3 b4 c1 c2 c3 c4 CmdTool.log d1 d2 d3 d4 e1 e2 e3 e4 lostfound MegaSAS.log 转载于:https://www.cnblogs.com/DevinHomer/p/9898078.html