系統磁碟損壞
前提:disk檔案為檔案儲存型別的雲主機。
步驟:1、檢視損壞os雲主機所在宿主機 nova show
2、找到或建立一台與損壞雲主機os版本一致的雲主機
3、將損壞雲主機a的磁碟檔案disk拷貝乙份至用於修復雲主機b disk_bak
ls /var/lib/nova/instances/8a902cdf-2967-48c0-b928-df46544c78d5/disk_bak4、在修雲主機b目錄下建立xml檔案-rw-r--r-- 1 root root 36662149120 6月 25 15:29 disk_bak
相關target 資訊根據在宿主機檢視的例項xml資訊變更:
virsh dumpxml instance-00021f44 1
2
3
4
5
6
cat
attach.xml
<
source
file
=
'/var/lib/nova/instances/8a902cdf-2967-48c0-b928-df46544c78d5/disk_bak'
/>
<
/disk
>
5、載入磁碟
檢視例項名稱
virsh list|grep 8a902cdf-2967-48c0-b928-df46544c78d5
通過名稱掛載disk
virsh attach-device instance-00008ba9 attach.xml
成功附加裝置
6、檢視是否掛載成功
在宿主機上檢視
virsh dumpxml instance-00008ba9
雲主機內檢視
fdisk -l 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
disk
/dev/vda
: 21.4 gb, 21474836480 bytes
16 heads, 63 sectors
/track
, 41610 cylinders
units = cylinders of 1008 * 512 = 516096 bytes
device boot start end blocks id system
/dev/vda1
* 1 407 205127+ 83 linux
/dev/vda2
408 41610 20766312 83 linux
disk
/dev/vdb
: 1073 mb, 1073741824 bytes
16 heads, 63 sectors
/track
, 2080 cylinders
units = cylinders of 1008 * 512 = 516096 bytes
disk
/dev/vdb
doesn't contain a valid partition table
disk
/dev/vdc
: 42.9 gb, 42949672960 bytes
16 heads, 63 sectors
/track
, 83220 cylinders
units = cylinders of 1008 * 512 = 516096 bytes
device boot start end blocks id system
/dev/vdc1
* 1 407 205127+ 83 linux
/dev/vdc2
408 83220 41737752 83 linux
7、操作完成後解除安裝
virsh detach-device instance-00008ba9 attach.xml
成功分離裝置
忘記密碼(rhel)、修復系統fsck
1、獲取uuid nova list --all-tenants --ip ip_addr
2、獲取url訪問介面 nova get-vnc-console uuid novnc
3、通過介面操作進入單使用者模式,修改密碼
i版nova stop uuid硬關機
在 icehouse 的版本中,執行 nova stop 時,會直接呼叫 virsh.destroy 硬關機
修改源**讓其軟關機超時後才執行硬關機解決
openstack宿主機故障,虛擬例項恢復
前言 因為機房伺服器執行不穩定的原因導致計算節點掛掉,然後上面的centos7虛擬機器在遷移之後開機報錯。這個解決方法同樣適用於其它作業系統的虛擬機器。基於映象建立的虛擬機器例項。i o error,can t read device dev vda 的報錯資訊 首先做疏散先把虛擬例項從宿主機上面疏...
線上故障處理
於 2016 年 12 月 09 日 處理流程 故障後處理 前段時間在團隊內整理了乙份線上事故處理的流程,修改後在這裡分享。1.1 系統 業務報警 這個是獲取故障最常用的手段。一般的系統正常運營過程中都會有一定的指標監控。如 在系統層面某種報錯出現的次數,系統常規指標,如可用記憶體,jvm gc,連...
RAC 故障處理
rac的故障定位 比單節點資料庫更複雜 日誌的儲存位置更多 日誌的資訊量更大 故障更複雜 rac的核心程序,cssd,crsd 這兩個程序出現問題,那麼 rac就宕了。rac比單例項資料庫程序要複雜的多。rac日誌存放的位置也多,種類也多,相對於單例項。對於單例項資料庫,所有的關於資料庫的資訊幾乎都...