作業 |
相關資訊,請進到 ... |
---|---|
在 Solstice DiskSuite,依 Solaris 復原程序以互動方式復原檔案。 | |
在 Solstice DiskSuite,請復原 root(/)檔案系統。 | |
| |
在 VERITAS 容體管理者,請復原非密封的 root(/)檔案系統。 | |
在 VERITAS 容體管理者,請復原密封的 root(/)檔案系統。 |
請使用這個程序來復原一個或多個個別的檔案。請先確定叢集執行沒任何錯誤再執行復原程序。
成為您要復原之叢集節點的超級使用者(superuser)。
停止所有使用要復原之檔案的資料服務。
# scswitch -z -g rgname -h "" |
使用 ufsrestore 指令復原檔案。
請使用這個程序將將 root(/)檔案系統復原到新磁碟,例如在更換損壞的根磁碟的情況。要復原的節點應該不在啟動狀態。請先確定叢集執行沒任何錯誤再執行復原程序。
由於您必須將新磁碟的分割區製作成和失效磁碟完全相同的格式,請在開啟本程序之前先識別分割機制,同時適當地重新建立檔案系統。
在您要復原之節點以外的節點上成為超級使用者(superuser)。
使用 metaset(1M) 指令,從所有中繼組移除復原之節點的主機名稱。請在中繼組,而不是您要移除的節點,執行這個指令。
# metaset -s setname -f -d -h node |
指定磁碟組名稱。
強迫。
從磁碟組刪除。
指定要從磁碟組刪除之節點的名稱。
置換節點上要復原 root(/)檔案系統的失效磁碟。
請參閱附隨伺服器之文件中敘述的磁碟置換程序。
啟動正在復原的啟動。
如果您使用 Solaris CD-ROM,請執行下列指令:
ok boot cdrom -s |
如果您使用 JumpStartTM 伺服器時,請執行下列指令:
ok boot net -s |
使用 format(1M) 指令,在根磁碟上建立所有的分割區與交換。
重新建立失效磁碟的原始分割機制。
使用 newfs(1M) 指令,建立適當的 root(/)檔案系統以及其他檔案系統。
重新建立失效磁碟的原始檔案系統。
請務必要建立 /global/.devices/node@nodeid 檔案系統。
將 root(/)檔案系統裝載到暫時裝載點。
# mount device temp-mount-point |
使用下列指令來復原 root(/)檔案系統。
# cd temp-mount-point # ufsrestore rvf dump-device # rm restoresymtable # cd / # umount temp-mount-point # fsck raw-disk-device |
檔案系統現在完成復原。
在新磁碟安裝新的啟動區塊。
# /usr/sbin/installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk raw-disk-device |
將節點重新開機為單用戶模式。
# reboot -- "-s" |
使用 scdidadm 指令置換磁碟 ID。
# scdidadm -R rootdisk |
使用 metadb(1M) 指令重新建立狀態資料庫抄本。
# metadb -c copies -af raw-disk-device |
指定要建立的抄本數目。
要在其上建立抄本的原始裝置。
新增抄本。
將節點重新啟動為叢集模式。
在復原的節點以外的叢集節點上,使用 metaset(1M) 指令將復原的節點新增到所有中繼組。
phys-schost-2# metaset -s setname -a -h node |
建立並新增主機到磁碟組。
節點重新啟動為叢集模式。叢集已經備妥可以使用。
以下範例顯示 root(/)檔案系統從磁帶裝置 /dev/rmt/0 復原到節點 phys-schost-1。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:] ok boot cdrom -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 CTL-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 |
請使用這個程序來復原執行備份時在中繼裝置上的 root(/)檔案系統。並在根磁碟毀壞而換成新磁碟等的情況執行這個程序。要復原的節點應該不在啟動狀態。請先確定叢集執行沒任何錯誤再執行復原程序。
由於您必須將新磁碟的分割區製作成和失效磁碟完全相同的格式,請在開啟本程序之前先識別分割機制,同時適當地重新建立檔案系統。
在可存取中繼組的叢集節點上,而不是您要復原的節點,成為超級使用者(superuser)。
使用 metaset(1M) 指令從所有中繼組移除要復原之節點的主機名稱。
# metaset -s setname -f -d -h node |
指定中繼組名稱名稱。
強迫。
從中繼組刪除。
指定要從中繼組刪除之節點的名稱。
置換節點上要復原 root(/)檔案系統的失效磁碟。
請參閱附隨伺服器之文件中敘述的磁碟置換程序。
啟動正在復原的啟動。
如果您使用 Solaris CD-ROM,請執行下列指令:
ok boot cdrom -s |
如果您使用 JumpStart 伺服器,請執行下列指令:
ok boot net -s |
使用 format(1M) 指令,在根磁碟上建立所有的分割區與交換。
重新建立失效磁碟的原始分割機制。
使用 newfs(1M) 指令,適當建立 root(/)檔案系統以及其他檔案系統。
重新建立失效磁碟的原始檔案系統。
請務必要建立 /global/.devices/node@nodeid 檔案系統。
Mount the root (/) file system on a temporary mount point.
# mount device temp-mount-point |
使用以下指令復原(/)檔案系統。
# cd temp-mount-point # ufsrestore rvf dump-device # rm restoresymtable |
在新磁碟安裝新的啟動區塊。
# /usr/sbin/installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk raw-disk-device |
移除 /temp-mount-point/etc/system 檔中下列與 MDD root 資訊相關的行。
* 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 檔,將作為中繼裝置之一部份的根磁碟上每一個檔案系統的根登錄從中繼裝置改成對應的一般片段(normal slice)。
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 - |
卸載暫時檔案系統,接著檢查原始磁碟裝置。
# cd / # umount temp-mount-point # fsck raw-disk-device |
將節點重新開機為單用戶模式。
# reboot -- "-s" |
使用 scdidadm 指令置換磁碟 ID。
# scdidadm -R rootdisk |
使用 metadb(1M) 指令重新建立狀態資料庫抄本。
# metadb -c copies -af raw-disk-device |
指定要建立的抄本數目。
在指名的原始磁碟裝置上建立初始狀態資料庫抄本。
將節點重新啟動為叢集模式。
在復原的節點以外的叢集節點上,使用 metaset(1M) 指令將復原的節點新增到所有中繼組。
phys-schost-2# metaset -s setname -a -h node |
增加(建立)中繼組。
依循 Solstice DiskSuite 說明文件,將 metadevice/mirror 設成 root(/)。
節點重新啟動為叢集模式。叢集已經備妥可以使用。
以下範例顯示 root(/)檔案系統從磁帶裝置 /dev/rmt/0 復原到節點 phys-schost-1。metaset 指令是從叢集 phys-schost-2 的其他節點執行,以移除及稍後將節點 phys-schost-1 新增到中繼組 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:] ok boot cdrom -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-mount-point/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-mount-point/etc/vfstab file] 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 CTRL-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 |
請使用這個程序來復原非密封的 root(/)檔案系統到節點。要復原的節點應該不在啟動狀態。請先確定叢集執行沒任何錯誤再執行復原程序。
由於您必須將新磁碟的分割區製作成和失效磁碟完全相同的格式,請在開啟本程序之前先識別分割機制,同時適當地重新建立檔案系統。
置換節點上要復原 root 檔案系統的失效磁碟。
請參閱附隨伺服器之文件中敘述的磁碟置換程序。
啟動正在復原的啟動。
如果您使用 Solaris CD-ROM,請執行下列指令:
ok boot cdrom -s |
如果您使用 JumpStart 伺服器,請執行下列指令:
ok boot net -s |
使用 format(1M) 指令,在根磁碟上建立所有的分割區與交換。
重新建立失效磁碟的原始分割機制。
使用 newfs(1M) 指令,建立適當的 root(/)檔案系統以及其他檔案系統。
重新建立失效磁碟的原始檔案系統。
請務必要建立 /global/.devices/node@nodeid 檔案系統。
將 root(/)檔案系統裝載到暫時裝載點。
# mount device temp-mount-point |
從備份復原 root(/)檔案系統,同時卸載並檢查檔案系統。
# cd temp-mount-point # ufsrestore rvf dump-device # rm restoresymtable # cd / # umount temp-mount-point # fsck raw-disk-device |
檔案系統現在完成復原。
在新磁碟安裝新的啟動區塊。
# /usr/sbin/installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk raw-disk-device |
將節點重新開機為單用戶模式。
判斷根磁碟是否在根磁碟的一個單一片段上。
如果是,請建立並設置根磁碟群組:
# vxdctl init # vxdg init rootdg # vxdctl add disk diskslice type=simple # vxdisk -f init diskslice type=simple # vxdg adddisk diskslice # vxdctl enable |
如果沒有,請進到 步驟 10。
使用 scdidadm 指令更新磁碟 ID。
# scdidadm -R /dev/rdsk/diskdevice |
按 CTRL-d 重新啟動為多用戶模式。
節點將重新開機為叢集模式。叢集已經備妥可以使用。
以下範例顯示從磁帶裝置 /dev/rmt/0 復原至節點 phys-schost-1 的非密封(/)檔案系統。
[Replace the failed disk and boot the node:] 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" [If the root disk group is on a single slice on the root disk, create the new root disk group:] # vxdctl init # vxdg init rootdg # vxdctl add disk c0t0d0s4 type=simple # vxdisk -f init c0t0d0s4 type=simple # vxdg adddisk c0t0d0s4 # vxdctl enable [Update the disk ID:] # scdidadm -R /dev/rdsk/c0t0d0 [Press CTRL-d to resume in multiuser mode] |
請使用這個程序來復原密封的 root(/)檔案系統到節點。要復原的節點應該不在啟動狀態。請先確定叢集執行沒任何錯誤再執行復原程序。
由於您必須將新磁碟的分割區製作成和失效磁碟完全相同的格式,請在開啟本程序之前先識別分割機制,同時適當地重新建立檔案系統。
置換節點上要復原 root 檔案系統的失效磁碟。
請參閱附隨伺服器之文件中敘述的磁碟置換程序。
啟動正在復原的啟動。
如果您使用 Solaris CD-ROM,請執行下列指令:
ok boot cdrom -s |
如果您使用 JumpStart 伺服器,請執行下列指令:
ok boot net -s |
使用 format(1M) 指令,在根磁碟上建立所有的分割區與交換。
重新建立失效磁碟的原始分割機制。
使用 newfs(1M) 指令,建立適當的 root(/)檔案系統以及其他檔案系統。
重新建立失效磁碟的原始檔案系統。
請務必要建立 /global/.devices/node@nodeid 檔案系統。
將 root(/)檔案系統裝載到暫時裝載點。
# mount device temp-mount-point |
從備份復原 root(/)檔案系統。
# cd temp-mount-point # ufsrestore rvf dump-device # rm restoresymtable |
建立一個空的 install-db 檔。
這會使節點在下一次重新開機時進入 VxVM 安裝模式。
# touch /temp-mount-point/etc/vx/reconfig.d/state.d/install-db |
在 /temp-mount-point/etc/system 檔中刪除下列登錄或標示成註解使其不作。
* rootdev:/pseudo/vxio@0:0 * set vxio:vol_rootdev_is_volume=1 |
編輯 /temp-mount-point/etc/vfstab 檔並將所有的 VxVM 裝載點換成根磁碟的標準磁碟裝置,例如 /dev/dsk/c0t0d0s0。
範例: 變更前- /dev/vx/dsk/rootdg/rootvol /dev/md/rdsk/rootdg/rootvol / ufs 1 no - 變更後- /dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no - |
卸載暫時檔案系統並檢查檔案系統。
# cd / # umount temp-mount-point # 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 -i 6 -y |
以下範例顯示密封 root(/)檔案系統從磁帶裝置 /dev/rmt/0 復原至節點 phys-schost-1。
[Replace the failed disk and boot the node:] 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/md/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 -i 6 -y |