Skip Navigation Links | |
Exit Print View | |
Oracle Solaris 11.1 Administration: ZFS File Systems Oracle Solaris 11.1 Information Library |
1. Oracle Solaris ZFS File System (Introduction)
2. Getting Started With Oracle Solaris ZFS
3. Managing Oracle Solaris ZFS Storage Pools
4. Managing ZFS Root Pool Components
5. Managing Oracle Solaris ZFS File Systems
6. Working With Oracle Solaris ZFS Snapshots and Clones
7. Using ACLs and Attributes to Protect Oracle Solaris ZFS Files
8. Oracle Solaris ZFS Delegated Administration
9. Oracle Solaris ZFS Advanced Topics
10. Oracle Solaris ZFS Troubleshooting and Pool Recovery
11. Archiving Snapshots and Root Pool Recovery
Overview of ZFS Recovery Process
ZFS Pool Recovery Requirements
Creating a ZFS Snapshot Archive for Recovery
How to Create a ZFS Snapshot Archive
12. Recommended Oracle Solaris ZFS Practices
If you need to recreate your root pool and recover you root pool snapshots, the general steps are as follows:
Prepare replacement root pool disk or disks and recreate the root pool
Restore the root pool file system snapshots
Select and activate the desired boot environment
Boot the system
Review the following considerations when recovering your root pool.
If a non-redundant root pool disk fails, you will need to boot the system from installation media or an install server to either re-install the OS or restore your root pool snapshots that you archived previously.
For information about replacing a disk on your system, see your hardware documentation.
If a mirrored root pool disk fails, then you can replace the failed disk while the system is still operational. For information on replacing a failed disk in a mirrored root pool, see How to Replace a Disk in a ZFS Root Pool (SPARC or x86/VTOC).
This disk is generally the default boot device or you can select another disk and then reset the default boot device.
DVD or USB install media (SPARC or x86) – Insert the media and select the appropriate device as the boot device.
If text-based media is used, select the Shell option from the text installer menu.
Live media (x86 only) – The GNOME desktop session can be used during the recovery procedure.
Automated installer or a local copy of AI media (SPARC or x86) – From the text installer menu, select the shell option. On a SPARC system, boot the AI media (either locally or over the network), and select the Shell option:
ok boot net:dhcp . . .Welcome to the Oracle Solaris 11 installation menu 1 Install Oracle Solaris 2 Install Additional Drivers 3 Shell 4 Terminal type (currently xterm) 5 Reboot Please enter a number [1]: 3
# format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c2t0d0 <FUJITSU-MAY2073RCSUN72G-0401 cyl 14087 alt 2 hd 24 sec 424> /pci@780/pci@0/pci@9/scsi@0/sd@0,0 1. c2t1d0 <FUJITSU-MAY2073RCSUN72G-0401 cyl 14087 alt 2 hd 24 sec 424> /pci@780/pci@0/pci@9/scsi@0/sd@1,0 2. c2t2d0 <SEAGATE-ST973402SSUN72G-0400-68.37GB> /pci@780/pci@0/pci@9/scsi@0/sd@2,0 3. c2t3d0 <SEAGATE-ST973401LSUN72G-0556-68.37GB> /pci@780/pci@0/pci@9/scsi@0/sd@3,0 Specify disk (enter its number): 0
Review the partition table to confirm that the root pool disk has an SMI label and a slice 0.
selecting c2t0d0 [disk formatted] format> partition partition> print
Use the following shortcut commands to relabel the disk. A caution is that these commands do not provide any error checking so make sure that you are relabeling the correct disk.
SPARC:
sysA# format -L vtoc -d c2t0d0
Confirm that slice 0 has disk space allocated appropriately. The default partition is applied in the above command, which might be too small for the root pool slice 0. For information about modifying the default partition table, see How to Replace a ZFS Root Pool Disk (EFI (GPT)) in Oracle Solaris 11.1 Administration: Devices and File Systems.
x86:
sysA# fdisk -B /dev/rdsk/c2t0d0p0 sysA# format -L vtoc -d c2t0d0
Confirm that slice 0 has disk space allocated appropriately. The default partition is applied in the above command, which might be too small for the root pool slice 0. For information about modifying the default partition table, see How to Replace a ZFS Root Pool Disk (EFI (GPT)) in Oracle Solaris 11.1 Administration: Devices and File Systems.
On a SPARC or an x86 (VTOC) system:
sysA# zpool create rpool c2t0d0s0
On an x86 based system with an EFI (GPT) labelled root pool disk, use syntax similar to the following:
sysA# zpool create -B rpool c2t0d0
sysA# mount -F nfs sysB:/tank/snaps /mnt
sysA# gzcat /mnt/rpool.snap1.qz | zfs receive -Fv rpool receiving full stream of rpool@rpool.snap1 into rpool@rpool.snap1 received 92.7KB stream in 1 seconds (92.7KB/sec) receiving full stream of rpool/export@rpool.snap1 into rpool/export@rpool.snap1 received 47.9KB stream in 1 seconds (47.9KB/sec) . . .
For example:
sysA# zfs create -V 4G rpool/swap sysA# zfs create -V 4G rpool/dump
For information about sizing swap and dump volumes, see Planning for Swap Space in Oracle Solaris 11.1 Administration: Devices and File Systems.
The next step requires that the BE is mounted so that the boot blocks can be installed.
sysA# beadm mount solaris /tmp/mnt
Use the following command on either a SPARC or an x86 based system.
sysA# bootadm install-bootloader -P rpool
# devfsadm -Cn -r /tmp/mnt # touch /tmp/mnt/reconfigure
#beadm unmount solaris
For example:
sysA# beadm list BE Active Mountpoint Space Policy Created -- ------ ---------- ----- ------ ------- solaris-1 - - 46.95M static 2012-07-20 10:25 solaris - - 3.83G static 2012-07-19 13:44 # beadm activate solaris
If necessary, reset the default boot device:
SPARC: Set up the system to boot automatically from the new disk, either by using the eeprom command or the setenv command from the boot PROM.
x86: Reconfigure the system BIOS.