Solaris 8 下RAID1和RAID5的安裝及恢復(轉)
本文件以SUN Fire V880 Server(6*73GB Dsik)為例講解在Solarsi8下使用命令列的方式安裝及維護RAID1和RAID5。本文件內容都經本人實踐驗證過,但對於不同機型僅供參考,謝謝支援!
Disk分佈情況:
0:c1t0d0
1:c1t1d0
2:c1t2d0
3:c1t3d0
4:c1t4d0
5:c1t5d0
注:0,1做映象;2,3,4,5做RAID5
系統盤(c1t0d0)分割槽及映象盤(c1t1d0)情況:
c1t0d0s0(d10) d0 c1t1d0s0(d20) / 1024M
c1t0d0s1(d11) d1 c1t1d0s1(d21) swap 8192M
c1t0d0s2 c1t1d0s2 overlap 69999M
c1t0d0s3(d13) d3 c1t1d0s3(d23) /usr 4096M
c1t0d0s4(d14) d4 c1t1d0s4(d24) /opt 10240M
c1t0d0s5(d15) d5 c1t1d0s5(d25) /var 2048M
c1t0d0s6(d16) d6 c1t1d0s6(d26) /home free
c1t0d0s7 c1t1d0s7 /metaDB 30M
系統安裝完成後,使用Solarsi8 software 2 of 2安裝DiskSuite_4.2.1軟體,安裝路徑:/cdrom/cdrom0/Solaris_8/EA/installer & 選擇預設安裝就可以。
用root使用者登陸,執行以下命令:
#prtvtoc /dev/rdsk/c1t0d0s2|fmthard –s – /dev/rdsk/c1t1d0s2
fmthard:New volume table of contents now in place
上面命令將第二塊硬碟(c1t1d0)的檔案分割槽表調整為和引導盤一致。
#umount /metaDB
#rm –r /metaDB
#vi /etc/vfstab
將下面這行註釋掉或刪除,如下:
#/dev/dsk/c1t0d0s7 /dev/rdsk/c1t0d0s7 /metaDB ufs 1 yes –
一、RAID1
對各個分割槽逐一作映象:
①先生成replicas,這是DiskSuite內部用的。
#metadb –a –f –c 3 c1t0d0s7 c1t1d0s7
#metadb
②Creating a mirror from swap
#metainit –f d11 1 1 c1t0d0s1
#metainit d21 1 1 c1t1t0s1
#metainit d1 –m d11
#vi /etc/vfstab
/dev/dsk/c1t0d0s1 - - swap – no –
should be changed to:
/dev/md/dsk/d1 - - swap – no -
#reboot
#metattach d1 d21
③Creating a mirror from /usr
#metainit –f d13 1 1 c1t0d0s3
#metainit d23 1 1 c1t1t0s3
#metainit d3 –m d13
#vi /etc/vfstab
/dev/dsk/c1t0d0s3 /dev/rdsk/c1t0d0s3 /usr ufs 1 yes –
should be changed to:
/dev/md/dsk/d3 /dev/md/rdsk/d3 /usr ufs 1 yes –
#reboot
#metattach d3 d23
④Creating a mirror from /opt
#metainit –f d14 1 1 c1t0d0s4
#metainit d24 1 1 c1t1t0s4
#metainit d4 –m d14
#vi /etc/vfstab
/dev/dsk/c1t0d0s4 /dev/rdsk/c1t0d0s4 /opt ufs 1 yes –
should be changed to:
/dev/md/dsk/d4 /dev/md/rdsk/d4 /opt ufs 1 yes –
#reboot
#metattach d4 d24
⑤Creating a mirror from /var
#metainit –f d15 1 1 c1t0d0s5
#metainit d25 1 1 c1t1t0s5
#metainit d5 –m d15
#vi /etc/vfstab
/dev/dsk/c1t0d0s5 /dev/rdsk/c1t0d0s5 /var ufs 1 yes –
should be changed to:
/dev/md/dsk/d5 /dev/md/rdsk/d5 /var ufs 1 yes –
#reboot
#metattach d5 d25
⑥Creating a mirror from /home
#metainit –f d16 1 1 c1t0d0s6
#metainit d26 1 1 c1t1t0s6
#metainit d6 –m d16
#vi /etc/vfstab
/dev/dsk/c1t0d0s6 /dev/rdsk/c1t0d0s6 /home ufs 1 yes –
should be changed to:
/dev/md/dsk/d6 /dev/md/rdsk/d6 /home ufs 1 yes –
#reboot
#metattach d6 d26
⑦Creating a mirror from /
#metainit –f d10 1 1 c1t0d0s0
#metainit d20 1 1 c1t1t0s0
#metainit d0 –m d10
#metaroot d0
#lockfs –fa
#reboot
#metattach d0 d20
#metastat (檢查映象進度)
映象完成後,還需作如下操作:
修改EEPROM
ok devalias(察看啟動裝置)
ok nvalias rootdisk /pci@8,600000/SUNW,qlc@4/fp@0,0/disk@0,0
ok nvalias mirrdisk /pci@8,600000/SUNW,qlc@4/fp@0,0/disk@1,0
ok setenv boot-device rootdisk mirrdisk
eeprom命令:
boot-device=rootdisk mirrdisk
boot-device=rootdisk mirrdisk
use-nvramrc?=true
nvramrc=devalias mirrdisk /pci@8,600000/SUNW,qlc@4/fp@0,0/disk@1,0
devalias rootdisk /pci@8,600000/SUNW,qlc@4/fp@0,0/disk@0,0
#ls -l c1t0d0s0
lrwxrwxrwx 1 root root 70 1月 2 10:45 c1t0d0s0 -> ../../devices/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000000870e80e7,0:a
對應:/pci@8,600000/SUNW,qlc@4/fp@0,0/disk@0,0
root@voiplnjvr4 # ls -l c1t1d0s0
lrwxrwxrwx 1 root root 70 1月 2 10:45 c1t1d0s0 -> ../../devices/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000000870fb287,0:a
對應:/pci@8,600000/SUNW,qlc@4/fp@0,0/disk@1,0
測試:
ok boot rootdisk 系統啟動正常。
ok boot mirrordisk 系統啟動正常。
假如c1t0d0盤壞掉,則停機更換硬碟後需做恢復工作,如下;
ok boot mirrordisk -s
#metadb -d c1t0d0s7
#prtvtoc /dev/rdsk/c1t1d0s2|fmthard –s – /dev/rdsk/c1t0d0s2
#metadb –a –f –c 3 c1t0d0s7
#halt
ok boot mirrordisk
#metareplace -e d0 c1t0d0s0
d0: device c1t0d0s0 is enabled
#metareplace -e d1 c1t0d0s1
d1: device c1t0d0s1 is enabled
#metareplace -e d3 c1t0d0s3
d3: device c1t0d0s3 is enabled
#metareplace -e d4 c1t0d0s4
d4: device c1t0d0s4 is enabled
#metareplace -e d5 c1t0d0s5
d5: device c1t0d0s5 is enabled
#metareplace -e d6 c1t0d0s6
d6: device c1t0d0s6 is enabled
#metastat (檢查映象恢復進度)
二、RAID5
#metainit d55 –r c1t2d0s2 c1t3d0s2 c1t4d0s2 c1t5d0s2
#metastat d55 (檢查RAID5的進度)
作完後reboot
#newfs /dev/md/rdsk/d55
#mkdir /raid5
#vi /etc/vfstab
新增一行:
/dev/md/dsk/d55 /dev/md/rdsk/d55 /raid5 ufs 2 yes –
#reboot
RAID5壞掉一個盤的恢復方法:
例c1t4d0盤壞掉,更換壞硬碟後作如下工作:
ok boot -r
#metareplace –e d55 c1t4d0s2
#metastat d55
卸去RAID5的方法:
#umount /raid5
#metaclear d55
#vi /etc/vfstab
註釋此行:
#/dev/md/dsk/d55 /dev/md/rdsk/d55 /raid5 ufs 2 yes
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10752019/viewspace-941579/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- SOLRSI8下RAID1和RAID5的安裝及恢復(轉)SolrAI
- Solaris 8 for Intel 作業系統的安裝(轉)Intel作業系統
- Solaris8作業系統安裝(轉)作業系統
- solaris下的gcc安裝GC
- solaris8安裝詳細的中文文件(轉)
- raid1資料恢復AI資料恢復
- solaris下安裝oracleOracle
- Solaris下安裝VNCVNC
- Raid0/raid1/raid5磁碟陣列資料恢復思路AI陣列資料恢復
- solaris下使用lsof恢復刪除的檔案
- Solaris8安裝筆記筆記
- Solaris8安裝記憶體分析工具memtool安裝使用文件(轉)記憶體
- 網路安裝solaris(轉)
- solaris8下安裝openldap2.2.30 & db-4.2.50LDA
- ORACLE8I FOR SUN SOLARIS2.7 安裝說明(轉)Oracle
- solaris下安裝應用包~~
- Solaris下安裝Oracle817Oracle
- Solaris 下解除安裝程式 pkgrm
- 網路安裝Solaris 10(轉)
- ubuntu 12.04 mediawiki 安裝配置及備份恢復Ubuntu
- SOLARIS磁碟鏡象(RAID1)AI
- Raid5資料恢復演算法原理+raid5資料恢復方法AI資料恢復演算法
- solaris下-silent方式安裝oracle clientOracleclient
- solaris 10 應用軟體的安裝/解除安裝方法(轉)
- 伺服器資料恢復—xfs下Raid5磁碟陣列資料恢復案例伺服器資料恢復AI陣列
- ClickHouse資料庫單機安裝及備份恢復資料庫
- 在solaris 10/x86下安裝oracle10——ZT(轉)Oracle
- Solaris2.6下面安裝qmail十步搞定(轉)AI
- Solaris下Oracle RAC 11.2.0.4 安裝方法Oracle
- 【伺服器資料恢復】reiserfs檔案系統下RAID5資料恢復案例伺服器資料恢復AI
- 伺服器(RAID1)資料丟失恢復伺服器AI
- 【伺服器資料恢復】SUN SOLARIS資料恢復案例伺服器資料恢復
- Solaris 9.0 x86 安裝心得(轉)
- 【伺服器資料恢復】raid5資料恢復案例伺服器資料恢復AI
- solaris mysql 安裝 解除安裝MySql
- openssh for solaris 安裝
- homebrew下載安裝及mysql的下載安裝MySql
- vnc在solaris的安裝VNC