REHL8.2斷電導致 generating /run/initramfs/rdsosreport.txt 問題
REHL8.2
斷電導致 generating /run/initramfs/rdsosreport.txt 問題
開機就進入命令視窗,視窗提示資訊如下:
generating “/run/initramfs/rdsosreport.txt” entering emergencymode. exit the shell to continue type “journalctl” to view system logs. you might want to save “/run/initramfs/rdsosreport.txt” to a usb stick or /boot after mounting them and attach it to a bug report。
解決方法:
xfs_repair /dev/mapper/centos-root -L
reboot
========================================================
參考文獻
If you're attempting to run
, getting the error message that suggests mounting the filesystem to replay the log, and after mounting still receiving the same error message, you may need to perform a forced repair (using the
-L
flag with
xfs_repair
).
This option should be a last resort.
For example, I'll use a case where I had a corrupt root partition on my CentOS 7 install. When attempting to mount the partition, I continually received the below error message:
mount: mount /dev/mapper/centos-root on /mnt/centos-root failed: Structure needs cleaning
Unfortunately, forcing a repair would involve zeroing out (destroying) the log before attempting a repair. When using this method, there is a potential of ending up with more corrupt data than initially anticipated; however, we can use the appropriate xfs tools to see what kind of damage may be caused before making any permanent changes.
Using and , you can create a metadata image of the affected partition and perform the forced repair on the image rather than the partition itself. The benefits of this is the ability to see the damage that comes with a forced repair before performing it on the partition.
To do this, you'll need a decent sized USB or external hard drive. Start by mounting the USB drive - my USB was located at
/dev/sdb1
, yours may be named differently.
mkdir -p /mnt/usbmount /dev/sdb1 /mnt/usb
Once mounted, run
xfs_metadump
to create a copy of the partition metadata to the USB - again, your affected partition may be different. In this case, I had a corrupt root partition located at
/dev/mapper/centos-root
:
xfs_metadump /dev/mapper/centos-root /mnt/usb/centos-root.metadump
Next, you'll want to restore the metadata in to an image so that we can perform a repair and measure the damage.
xfs_mdrestore /mnt/usb/centos-root.metadump /mnt/usb/centos-root.img
I found that in rescue mode
xfs_mdrestore
is not available, and instead you'll need to be in rescue mode of a live CentOS CD.
Finally, we can perform the repair on the image:
xfs_repair -L /mnt/usb/centos-root.img
After the repair has completed and you've assessed the output and potential damage, you can determine as to whether you'd like to perform the repair against the partition.
To run the repair against the partition, simply run:
xfs_repair -L /dev/mapper/centos-root
Don't forget to check the other partitions for corruption as well. After the repairs, reboot the system and you should be able to successfully boot.
Remember that the
-L
flag should be used as a last resort where there are no other possible options to repair.
fsck -vcfy /dev/sda3 會清空資料。
在未掛載狀態下試一試這個命令: # xfs_repair /dev/sdb1 /*後面跟目標驅動器路徑*/如果提示log什麼的有問題,則使用-L引數,這會重建log,然後再使用上面一條命令進行修復。 #xfs_repair -L /dev/sdb1
1 執行debugfs -w /dev/sdb (/dev/sdb出現 該情況檔案所在的分割槽) -w says that partition will be opened in read-write mode.
2 mount /dev/sdb /mnt/other 掛載到mnt/other 目錄下
3 執行 clri path/file 移除損壞檔案節點 注意path/file 值的是相對路徑 而不是/mnt/other/****
4 退出 debugfs 執行fsck -y /mnt/other 修復該分割槽
ext4檔案系統,使用命令 fsck.ext4 /dev/md0 修復,
如果是xfs檔案系統,使用命令 xfs_repair -L /dev/md0修復,
# mount /dev/sdb1 /disk2
mount: Structure needs cleaning
我用了下列的指令解決了. 雖然我不太清楚什麼東西導致它有問題 :
# xfs_repair -n /dev/sdb1
上面指令還不能完全解決
# xfs_check /dev/sdb1
ERROR: The filesystem has valuable metadata changes in a log which needs to
be replayed. Mount the filesystem to replay the log, and unmount it before
re-running xfs_check. If you are unable to mount the filesystem, then use
the xfs_repair -L option to destroy the log and attempt a repair.
Note that destroying the log may cause corruption — please attempt a mount
of the filesystem before doing this.
用 xfs_check 指令. 它建議我用 “xfs_repair -L ”
# xfs_repair -L /dev/sdb1
這樣弄玩之後. 在用 xfs_check 檢查一次
# xfs_check /dev/sdb1
就可以掛載了
# mount /dev/sdb1 /disk2
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31520497/viewspace-2736080/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- CentOS 7 斷電導致 generating /run/initramfs/rdsosreport.txt 問題CentOS
- rac 本地監聽問題導致資料斷斷續續連線
- 網路問題導致更多的資料中心中斷
- RHEL8.2-虛擬機器異常斷電導致Structure needs cleaning.問題虛擬機Struct
- 停電導致aix檔案系統掛載問題AI
- 膝上型電腦常見顯示卡故障導致電腦問題分析
- 電腦突然斷電導致檔案丟失怎麼辦?
- ANALYZE導致的阻塞問題分析
- MySQL Flush導致的等待問題MySql
- 非歸檔模式下異常斷電導致的資料庫無法啟動的問題修復模式資料庫
- SCHEDULER呼叫XDB程式導致效能問題
- Dell伺服器網路卡問題導致伺服器網路無故中斷伺服器
- CAS導致的ABA問題及解決
- MySQL8.0 view導致的效能問題MySqlView
- golang slice使用不慎導致的問題Golang
- redis AOF落地策略rewrite導致阻塞問題Redis
- AIX maxperm引數導致監聽問題AI
- RLM$SCHDNEGACTION 執行導致負載問題負載
- 克隆ORACLE軟體的導致的問題Oracle
- Centos7 開機時遇到initramfs-xxx.img not found錯誤導致虛擬機器無法開啟問題處理CentOS虛擬機
- ORA-00600,伺服器斷電導致日誌丟失伺服器
- latch 相關效能問題診斷: latch: row cache objects等待事件導致CPU負載高Object事件負載
- maven “Generating project in Batch mode“問題的解決MavenProjectBAT
- 關於 Laravel mix 導致 Bootstrap 失效的問題Laravelboot
- chorme自動升級導致跨域問題ORM跨域
- 建立index 使用Online導致的問題Index
- ORACLE資料檔名導致的奇怪問題Oracle
- Standby OS i/o問題導致Primary 庫不能正常歸檔問題
- EVA4400儲存斷電導致資料丟失如何恢復
- 聯想小新pro13.3靜電問題導致藍芽模組失靈解決方法藍芽模組
- 解決java socket在傳輸漢字時出現截斷導致亂碼的問題Java
- TSM配置不好導致備份不正常,從而導致資料庫效能問題資料庫
- vue的scope導致樣式修改不了問題Vue
- 【epoll問題】EPOLLRDHUP使用導致無法接受資料
- EfCore3的OwnedType會導致Sql效率問題SQL
- xcode升級導致cocoapods很多奇葩問題XCode
- 如何解決url傳參導致錯誤問題
- javascript小數乘法運算導致的精度問題JavaScript