作業 |
如需相關說明,請參閱 … |
---|---|
針對 Solstice DiskSuite/Solaris Volume Manager,依 Solaris 復原程序以互動方式復原檔案 | |
針對 Solstice DiskSuite/Solaris Volume Manager,復原 root (/) 檔案系統 | |
|
如何復原元式裝置上的根 (/) 檔案系統 (Solstice DiskSuite/Solaris Volume Manager) |
針對 VERITAS Volume Manager,復原非封裝的根 (/) 檔案系統 | |
針對 VERITAS Volume Manager,復原已封裝的根 (/) 檔案系統 |
使用此程序復原一個或多個個別檔案。 請先確定叢集執行時沒有任何錯誤,再執行復原程序。
成為您要復原之叢集節點的超級使用者。
停止所有使用要儲存之檔案的資料服務。
# scswitch -z -g resource-group[,...] -h ““ |
使用 ufsrestore 指令復原檔案。
使用此程序復原 root (/) 檔案系統至新的磁碟,如取代故障根磁碟後。 要復原的節點應該不在啟動狀態。 請先確定叢集執行時沒有任何錯誤,再執行復原程序。
由於您必須將新磁碟分割成和故障磁碟相同的格式,請在進行本程序之前先識別分割區機制,同時適當地重新建立檔案系統。
在可存取 metaset 的叢集節點上,而不是您要復原的節點上,成為超級使用者。
從所有 metaset 中移除已復原的節點主機名稱。
從 metaset 中的節點執行這個指令,而不是從您正在移除的節點執行。
# metaset -s setname -f -d -h nodelist |
指定磁碟組名稱。
強迫。
從磁碟組刪除。
指定要從磁碟組刪除之節點的名稱。
置換節點上要復原 root (/) 檔案系統的故障磁碟。
請參閱隨附伺服器之說明文件中敘述的磁碟置換程序。
SPARC︰出現 OpenBoot PROM ok 提示符號時,請鍵入以下指令︰
ok boot cdrom -s |
x86︰將 CD 插入 系統的 CD 磁碟機,並透過關閉系統、然後關閉電源再開啟電源的方法來啟動系統。 在 [目前的啟動參數] 畫面上,鍵入以下指令︰
<<< Current Boot Parameters >>> Boot path: /pci@0,0/pci8086,2545@3/pci8086,1460@1d/pci8086,341a@ 7,1/sd@0,0:a Boot args: Type b [file-name] [boot-flags] <ENTER> to boot with options or i <ENTER> to enter boot interpreter or <ENTER> to boot with defaults <<< timeout in 5 seconds >>> Select (b)oot or (i)nterpreter: b -s |
如果您使用的是 Solaris JumpStartTM 伺服器︰
SPARC︰出現 OpenBoot PROM ok 提示符號時,請鍵入以下指令︰
ok boot net -s |
x86︰使用關閉系統、然後關閉電源再開啟電源的方法來啟動系統。 在 [目前的啟動參數] 畫面上,鍵入以下指令︰
<<< Current Boot Parameters >>> Boot path: /pci@0,0/pci8086,2545@3/pci8086,1460@1d/pci8086,341a@ 7,1/sd@0,0:a Boot args: Type b [file-name] [boot-flags] <ENTER> to boot with options or i <ENTER> to enter boot interpreter or <ENTER> to boot with defaults <<< timeout in 5 seconds >>> Select (b)oot or (i)nterpreter: b -s |
使用 format(1M) 指令,在根磁碟上建立所有的分割區與交換。
重新建立故障磁碟的原始分割機制。
使用 newfs( 1M) 指令,建立適當的 root (/) 檔案系統以及其他檔案系統。
重新建立故障磁碟的原始檔案系統。
請務必要建立 /global/.devices/node@nodeid 檔案系統。
將 root (/) 檔案系統裝載到暫時裝載點。
# mount device temp-mountpoint |
使用下列指令來復原 root (/) 檔案系統。
# cd temp-mountpoint # ufsrestore rvf dump-device # rm restoresymtable # cd / # umount temp-mountpoint # fsck raw-disk-device |
檔案系統現在完成復原。
在新磁碟上安裝新的啟動區塊。
# /usr/sbin/installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk raw-disk-device |
將節點重新啟動為單使用者模式。
# reboot -- "-s" |
使用 scdidadm( 1M) 指令替代磁碟 ID。
# scdidadm -R rootdisk |
使用 metadb( 1M) 指令重建狀態資料庫副本。
# metadb -c copies -af raw-disk-device |
指定要建立的複本數目。
要在其上建立複本的原始裝置。
新增複本。
將節點重新啟動為叢集模式。
在已復原節點以外的叢集節點上,使用 metaset 指令將復原的節點新增到所有 metaset。
phys-schost-2# metaset -s setname -a -h nodelist |
建立主機並將其新增到磁碟組。
節點重新啟動為叢集模式。 叢集已經備妥可以使用。
以下範例顯示 root (/) 檔案系統復原至節點 phys-schost-1 (從磁帶裝置 /dev/rmt/0)。 metaset 指令是從叢集 phys-schost-2 的另一個節點執行,以便先移除而後將 phys-schost-1 節點重新加入 schost-1 磁碟組中。 所有其他指令是由 phys-schost-1 執行。 在 /dev/rdsk/c0t0d0s0 上將建立新的啟動區段,並在 /dev/rdsk/c0t0d0s4 上重新建立三個狀態資料庫副本。
[Become superuser on a cluster node other than the node to be restored.] [Remove the node from the metaset:] phys-schost-2# metaset -s schost-1 -f -d -h phys-schost-1 [Replace the failed disk and boot the node:] |
SPARC︰出現 OpenBoot PROM ok 提示符號時,請鍵入以下指令︰
ok boot cdrom -s |
x86︰將 CD 插入 系統的 CD 磁碟機,並透過關閉系統、然後關閉電源再開啟電源的方法來啟動系統。 在 [目前的啟動參數] 畫面上,鍵入以下指令︰
<<< Current Boot Parameters >>> Boot path: /pci@0,0/pci8086,2545@3/pci8086,1460@1d/pci8086,341a@7,1/ sd@0,0:a Boot args: Type b [file-name] [boot-flags] <ENTER> to boot with options or i <ENTER> to enter boot interpreter or <ENTER> to boot with defaults <<< timeout in 5 seconds >>> Select (b)oot or (i)nterpreter: b -s |
[Use format and newfs to recreate partitions and file systems.] [Mount the root file system on a temporary mount point:] # mount /dev/dsk/c0t0d0s0 /a [Restore the root file system:] # cd /a # ufsrestore rvf /dev/rmt/0 # rm restoresymtable # cd / # umount /a # fsck /dev/rdsk/c0t0d0s0 [Install a new boot block:] # /usr/sbin/installboot /usr/platform/`uname \ -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t0d0s0 [Reboot in single-user mode:] # reboot -- "-s" [Replace the disk ID:] # scdidadm -R /dev/dsk/c0t0d0 [Recreate state database replicas:] # metadb -c 3 -af /dev/rdsk/c0t0d0s4 # reboot Press Control-d to boot into multiuser mode. [Add the node back to the metaset:] phys-schost-2# metaset -s schost-1 -a -h phys-schost-1 |
使用此程序復原執行備份時元式裝置上的根 (/) 檔案系統。 在根磁碟毀損而換成新磁碟等情況下執行這個程序。 要復原的節點應該不在啟動狀態。 請先確定叢集執行時沒有任何錯誤,再執行復原程序。
由於您必須將新磁碟分割成和故障磁碟相同的格式,請在進行本程序之前先識別分割區機制,同時適當地重新建立檔案系統。
在可存取 metaset 的叢集節點上,而不是您要復原的節點上,成為超級使用者。
從所有 metaset 中移除已復原的節點主機名稱。
# metaset -s setname -f -d -h nodelist |
指定 metaset 名稱。
強迫。
從 metaset 刪除。
指定要從 metaset 刪除之節點的名稱。
置換節點上要復原 root (/) 檔案系統的故障磁碟。
請參閱隨附伺服器之說明文件中敘述的磁碟置換程序。
SPARC︰出現 OpenBoot PROM ok 提示符號時,請鍵入以下指令︰
ok boot cdrom -s |
x86︰將 CD 插入 系統的 CD 磁碟機,並透過關閉系統、然後關閉電源再開啟電源的方法來啟動系統。 在 [目前的啟動參數] 畫面上,鍵入以下指令︰
<<< Current Boot Parameters >>> Boot path: /pci@0,0/pci8086,2545@3/pci8086,1460@1d/pci8086,341a@ 7,1/sd@0,0:a Boot args: Type b [file-name] [boot-flags] <ENTER> to boot with options or i <ENTER> to enter boot interpreter or <ENTER> to boot with defaults <<< timeout in 5 seconds >>> Select (b)oot or (i)nterpreter: b -s |
如果您使用的是 Solaris JumpStartTM 伺服器︰
SPARC︰出現 OpenBoot PROM ok 提示符號時,請鍵入以下指令︰
ok boot net -s |
x86︰使用關閉系統、然後關閉電源再開啟電源的方法來啟動系統。 在 [目前的啟動參數] 畫面上,鍵入以下指令︰
<<< Current Boot Parameters >>> Boot path: /pci@0,0/pci8086,2545@3/pci8086,1460@1d/pci8086,341a@ 7,1/sd@0,0:a Boot args: Type b [file-name] [boot-flags] <ENTER> to boot with options or i <ENTER> to enter boot interpreter or <ENTER> to boot with defaults <<< timeout in 5 seconds >>> Select (b)oot or (i)nterpreter: b -s |
使用 format 指令,在根磁碟上建立所有的分割區與交換。
重新建立故障磁碟的原始分割機制。
使用 newfs 指令,適當建立根 (/) 檔案系統以及其他檔案系統
重新建立故障磁碟的原始檔案系統。
請務必要建立 /global/.devices/node@nodeid 檔案系統。
將 root (/) 檔案系統裝載到暫時裝載點。
# mount device temp-mountpoint |
使用下列指令來復原 root (/) 檔案系統。
# cd temp-mountpoint # ufsrestore rvf dump-device # rm restoresymtable |
在新磁碟上安裝新的啟動區塊。
# /usr/sbin/installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk raw-disk-device |
移除在 /temp-mountpoint/etc/system 檔中 MDD 根資訊的行。
* Begin MDD root info (do not edit) forceload: misc/md_trans forceload: misc/md_raid forceload: misc/md_mirror forceload: misc/md_hotspares forceload: misc/md_stripe forceload: drv/pcipsy forceload: drv/glm forceload: drv/sd rootdev:/pseudo/md@0:0,10,blk * End MDD root info (do not edit) |
編輯 /temp-mount-point/etc/vfstab 檔,將在複合裝置部分的根磁碟上,用來作為每個檔案系統的根登錄從複合裝置變更為對應的一般片段。
Example: Change from— /dev/md/dsk/d10 /dev/md/rdsk/d10 / ufs 1 no - Change to— /dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no - |
卸載暫存檔案系統,然後檢查原始磁碟裝置。
# cd / # umount temp-mountpoint # fsck raw-disk-device |
將節點重新啟動為單使用者模式。
# reboot -- "-s" |
使用 scdidadm 指令置換磁碟 ID。
# scdidadm -R rootdisk |
使用 metadb 指令重新建立狀態資料庫副本。
# metadb -c copies -af raw-disk-device |
指定要建立的複本數目。
在指名的原始磁碟裝置上建立初始狀態資料庫複本。
將節點重新啟動為叢集模式。
在已復原節點以外的叢集節點上,使用 metaset 指令將復原的節點新增到所有 metaset。
phys-schost-2# metaset -s setname -a -h nodelist |
新增 (建立) metaset。
依照 Solstice DiskSuite 說明文件,設定 root (/) 的 metadevice/mirror。
節點重新啟動為叢集模式。 叢集已經備妥可以使用。
以下範例顯示 root (/) 檔案系統復原至節點 phys-schost-1 (從磁帶裝置 /dev/rmt/0)。 metaset 指令是從叢集的其他節點 phys-schost-2 執行,以便先移除而後將節點 phys-schost-1 重新加入 metaset schost-1 中。 所有其他指令是由 phys-schost-1 執行。 在 /dev/rdsk/c0t0d0s0 上將建立新的啟動區段,並在 /dev/rdsk/c0t0d0s4 上重新建立三個狀態資料庫副本。
[Become superuser on a cluster node with access to the metaset, other than the node to be restored.] [Remove the node from the metaset:] phys-schost-2# metaset -s schost-1 -f -d -h phys-schost-1 [Replace the failed disk and boot the node:] |
從 Solaris CD 啟動節點︰
SPARC︰出現 OpenBoot PROM ok 提示符號時,請鍵入以下指令︰
ok boot cdrom -s |
x86︰將 CD 插入 系統的 CD 磁碟機,並透過關閉系統、然後關閉電源再開啟電源的方法來啟動系統。 在 [目前的啟動參數] 畫面上,鍵入以下指令︰
<<< Current Boot Parameters >>> Boot path: /pci@0,0/pci8086,2545@3/pci8086,1460@1d/pci8086,341a@7,1/ sd@0,0:a Boot args: Type b [file-name] [boot-flags] <ENTER> to boot with options or i <ENTER> to enter boot interpreter or <ENTER> to boot with defaults <<< timeout in 5 seconds >>> Select (b)oot or (i)nterpreter: b -s |
[Use format and newfs to recreate partitions and file systems.] [Mount the root file system on a temporary mount point:] # mount /dev/dsk/c0t0d0s0 /a [Restore the root file system:] # cd /a # ufsrestore rvf /dev/rmt/0 # rm restoresymtable [Install a new boot block:] # /usr/sbin/installboot /usr/platform/`uname \ -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t0d0s0 [Remove the lines in /temp-mountpoint/etc/system file for MDD root information:] * Begin MDD root info (do not edit) forceload: misc/md_trans forceload: misc/md_raid forceload: misc/md_mirror forceload: misc/md_hotspares forceload: misc/md_stripe forceload: drv/pcipsy forceload: drv/glm forceload: drv/sd rootdev:/pseudo/md@0:0,10,blk * End MDD root info (do not edit) [Edit the /temp-mountpoint/etc/vfstabfile] Example: Change from— /dev/md/dsk/d10 /dev/md/rdsk/d10 / ufs 1 no - Change to— /dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 /usr ufs 1 no - [Unmount the temporary file system and check the raw disk device:] # cd / # umount /a # fsck /dev/rdsk/c0t0d0s0 [Reboot in single-user mode:] # reboot -- "-s" [Replace the disk ID:] # scdidadm -R /dev/dsk/c0t0d0 [Recreate state database replicas:] # metadb -c 3 -af /dev/rdsk/c0t0d0s4 # reboot Type Control-d to boot into multiuser mode. [Add the node back to the metaset:] phys-schost-2# metaset -s schost-1 -a -h phys-schost-1 |
使用此程序將非封裝的根 (/) 檔案系統復原至節點。 要復原的節點應該不在啟動狀態。 請先確定叢集執行時沒有任何錯誤,再執行復原程序。
由於您必須將新磁碟分割成和故障磁碟相同的格式,請在進行本程序之前先識別分割區機制,同時適當地重新建立檔案系統。
替代節點上要復原根檔案系統的故障磁碟。
請參閱隨附伺服器之說明文件中敘述的磁碟置換程序。
如果您使用的是 Solaris CD,在出現 OpenBoot PROM ok 提示符號時,請鍵入以下指令︰
ok boot cdrom -s |
如果您使用的是 Solaris JumpStartTM 伺服器,在出現 OpenBoot PROM ok 提示符號時,請鍵入以下指令︰
ok boot net -s |
使用 format 指令,在根磁碟上建立所有的分割區與交換。
重新建立故障磁碟的原始分割機制。
使用 newfs 指令,適當建立根 (/) 檔案系統以及其他檔案系統。
重新建立故障磁碟的原始檔案系統。
請務必要建立 /global/.devices/node@nodeid 檔案系統。
將 root (/) 檔案系統裝載到暫時裝載點。
# mount device temp-mountpoint |
從備份復原 root (/) 檔案系統,同時卸載並檢查檔案系統。
# cd temp-mountpoint # ufsrestore rvf dump-device # rm restoresymtable # cd / # umount temp-mountpoint # fsck raw-disk-device |
檔案系統現在完成復原。
在新磁碟上安裝新的啟動區塊。
# /usr/sbin/installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk raw-disk-device |
將節點重新啟動為單使用者模式。
使用 scdidadm 指令更新磁碟 ID。
# scdidadm -R /dev/rdsk/disk-device |
按下 Ctrl-d 重新啟動為多重使用者模式。
節點將重新啟動為叢集模式。 叢集已經備妥可以使用。
以下範例顯示從磁帶裝置 /dev/rmt/0 復原至節點 phys-schost-1 的非封裝 root (/) 檔案系統。
[Replace the failed disk and boot the node:] |
從 Solaris CD 啟動節點。 出現 OpenBoot PROM ok 提示符號時,請鍵入以下指令︰
ok boot cdrom -s ... [Use format and newfs to create partitions and file systems] [Mount the root file system on a temporary mount point:] # mount /dev/dsk/c0t0d0s0 /a [Restore the root file system:] # cd /a # ufsrestore rvf /dev/rmt/0 # rm restoresymtable # cd / # umount /a # fsck /dev/rdsk/c0t0d0s0 [Install a new boot block:] # /usr/sbin/installboot /usr/platform/`uname \ -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t0d0s0 [Reboot in single-user mode:] # reboot -- "-s" [Update the disk ID:] # scdidadm -R /dev/rdsk/c0t0d0 [Press Control-d to resume in multiuser mode] |
使用此程序將封裝的根 (/) 檔案系統復原至節點。 要復原的節點應該不在啟動狀態。 請先確定叢集執行時沒有任何錯誤,再執行復原程序。
由於您必須將新磁碟分割成和故障磁碟相同的格式,請在進行本程序之前先識別分割區機制,同時適當地重新建立檔案系統。
置換節點上要復原 root 檔案系統的故障磁碟。
請參閱隨附伺服器之說明文件中敘述的磁碟置換程序。
如果您使用的是 Solaris CD,在出現 OpenBoot PROM ok 提示符號時,請鍵入以下指令︰
ok boot cdrom -s |
如果您使用的是 Solaris JumpStartTM 伺服器,在出現 OpenBoot PROM ok 提示符號時,請鍵入以下指令︰
ok boot net -s |
使用 format 指令,在根磁碟上建立所有的分割區與交換。
重新建立故障磁碟的原始分割機制。
使用 newfs 指令,適當建立根 (/) 檔案系統以及其他檔案系統。
重新建立故障磁碟的原始檔案系統。
請務必要建立 /global/.devices/node@nodeid 檔案系統。
將 root (/) 檔案系統裝載到暫時裝載點。
# mount device temp-mountpoint |
從備份復原 root (/) 檔案系統。
# cd temp-mountpoint # ufsrestore rvf dump-device # rm restoresymtable |
建立空的 install-db 檔。
如此將使節點在下次重新啟動時進入 VxVM 安裝模式。
# touch /temp-mountpoint/etc/vx/reconfig.d/state.d/install-db |
從 /temp-mountpoint/etc/system 檔案移除下列指令或為指令下註解。
* rootdev:/pseudo/vxio@0:0 * set vxio:vol_rootdev_is_volume=1 |
編輯 /temp-mountpoint/etc/vfstab 檔,並將所有的 VxVM 裝載點換成根磁碟的標準磁碟裝置,例如 /dev/dsk/c0t0d0s0。
Example: Change from— /dev/vx/dsk/rootdg/rootvol /dev/vx/rdsk/rootdg/rootvol / ufs 1 no - Change to— /dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no - |
卸載暫時檔案系統,並檢查檔案系統。
# cd / # umount temp-mountpoint # fsck raw-disk-device |
在新磁碟上安裝啟動區塊。
# /usr/sbin/installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk raw-disk-device |
將節點重新啟動為單使用者模式。
# reboot -- "-s" |
使用 scdidadm( 1M) 來更新磁碟 ID。
# scdidadm -R /dev/rdsk/c0t0d0 |
執行 vxinstall 以密封磁碟並重新啟動。
# vxinstall |
如果有某個次要編號和其他系統衝突,請卸載整體裝置並重新指定磁碟群組。
卸載叢集節點上的整體裝置檔案系統。
# umount /global/.devices/node@nodeid |
重新指定叢集節點上的 rootdg 磁碟群組的次要編號。
# vxdg reminor rootdg 100 |
在叢集模式下關閉,並重新啟動節點。
# shutdown -g0 -i6 -y |
以下範例顯示封裝的 root (/) 檔案系統復原至節點 phys-schost-1 (從磁帶裝置 /dev/rmt/0)。
[Replace the failed disk and boot the node:] |
從 Solaris CD 啟動節點。 出現 OpenBoot PROM ok 提示符號時,請鍵入以下指令︰
ok boot cdrom -s ... [Use format and newfs to create partitions and file systems] [Mount the root file system on a temporary mount point:] # mount /dev/dsk/c0t0d0s0 /a [Restore the root file system:] # cd /a # ufsrestore rvf /dev/rmt/0 # rm restoresymtable [Create an empty install-db file:] # touch /a/etc/vx/reconfig.d/state.d/install-db [Edit /etc/system on the temporary file system and remove or comment out the following entries:] # rootdev:/pseudo/vxio@0:0 # set vxio:vol_rootdev_is_volume=1 [Edit /etc/vfstab on the temporary file system:] Example: Change from— /dev/vx/dsk/rootdg/rootvol /dev/vx/rdsk/rootdg/rootvol / ufs 1 no- Change to— /dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no - [Unmount the temporary file system, then check the file system:] # cd / # umount /a # fsck /dev/rdsk/c0t0d0s0 [Install a new boot block:] # /usr/sbin/installboot /usr/platform/`uname \ -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t0d0s0 [Reboot in single-user mode:] # reboot -- "-s" [Update the disk ID:] # scdidadm -R /dev/rdsk/c0t0d0 [Run vxinstall:] # vxinstall Choose to encapsulate the root disk. [If there is a conflict in minor number, reminor the rootdg disk group:] # umount /global/.devices/node@nodeid # vxdg reminor rootdg 100 # shutdown -g0 -i6 -y |
如需有關如何鏡像封裝的根磁碟之說明,請參閱Sun Cluster 軟體安裝指南 (適用於 Solaris 作業系統)。