Which procedure would you follow to restore the ZFS root file system on localSYS?

On localSYS, your SPARC based server, you back up the root file system with recursive
snapshots of the root pool. The snapshots are stored on a remote NTS file system.
This information describes the remote system where the snapshots are stored:
Remote system name: backupSYS
File system whore the snapshots are stored: /backups/localSYS
Mounted file system on localSYS: /rpool/snaps
Most recent backup name: rpool-1202
Disk c0t0d0 has failed in your root pool and has been replaced. The disk has already been part<
and labeled and now you need to restore the root file system. Which procedure would you follow
to restore the ZFS root file system on localSYS?

On localSYS, your SPARC based server, you back up the root file system with recursive
snapshots of the root pool. The snapshots are stored on a remote NTS file system.
This information describes the remote system where the snapshots are stored:
Remote system name: backupSYS
File system whore the snapshots are stored: /backups/localSYS
Mounted file system on localSYS: /rpool/snaps
Most recent backup name: rpool-1202
Disk c0t0d0 has failed in your root pool and has been replaced. The disk has already been part<
and labeled and now you need to restore the root file system. Which procedure would you follow
to restore the ZFS root file system on localSYS?

A.
boot cdrom -s
mount -f nfs backup_server:/rpool/snaps /rmt
zpool create rpool c0t0d0s0
cat /mnt/rpool.1202 | zfs receive -Fdu rpool
zpool set bootfs=rpool/ROOT/solaris rpool
Recreate swap and dump devices.
Reinstall the bootblock on c0t0d0.

B.
boot cdrom -s
mount -f nfs backup_server:/rpool/snaps /mnt
zpool create rpool c0t0d0s0
zfs create -o mountpoint=/ rpool/ROOT
cat /mnt/rpool.1011 | zfs receive -Fdu rpool
zpool set bootfs=rpool/ROOT/solaris rpool
Recreate swap and dump devices.
Reinstall the bootblock on c0t0d0.

C.
boot cdrom -s
mount -F nfs backup_server:/rpool/snaps /mnt
cat /mnt/rpool.1011 | zfs receive -Fdu rpool
zpool set bootfs=rpool/ROOT/solaris rpool c0t0d0s0
Reinstall the bootblock on c0t0d0s0

D.
boot cdrom -s
mount -f nfs backup_server:/rpool/snaps /rmt
zpool create rpool c0t0d0s0
zfs receive -Fdu /mnt/rpool.1011
zpool set bootfs=rpool/ROOT/solaris rpool
Reinstall the bootblock on c0t0d0.

Explanation:
How to Recreate a ZFS Root Pool and Restore Root Pool Snapshots
In this scenario, assume the following conditions:
* ZFS root pool cannot be recovered
* ZFS root pool snapshots are stored on a remote system and are shared over NFS
* The system is booted from an equivalent Solaris release to the root pool version so that the
Solaris release and the pool version match. Otherwise, you will need to add the -o
version=version-number property option and value when you recreate the root pool in step 4
below.
All steps below are performed on the local system.
1.
Boot from CD/DVD or the network.
On a SPARC based system, select one of the following boot methods:
ok boot net -s
ok boot cdrom -s
If you don’t use -s option, you’ll need to exit the installation program.
2.
Mount the remote snapshot dataset.
For example:
# mount -F nfs remote-system:/rpool/snaps /mnt

3.
Recreate the root pool.
For example:
# zpool create -f -o failmode=continue -R /a -m legacy -o cachefile=/etc/zfs/zpool.cache rpool
c1t0d0s0
4.
Restore the root pool snapshots.
This step might take some time. For example:
# cat /mnt/rpool.0311 | zfs receive -Fdu rpool
Using the -u option means that the restored archive is not mounted when the zfs receive operation
completes.
5.
Set the bootfs property on the root pool BE.
For example:
# zpool set bootfs=rpool/ROOT/osolBE rpool
6.
Install the boot blocks on the new disk.
On a SPARC based system:
# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c1t0d0s0
Reference: How to Recreate a ZFS Root Pool and Restore Root Pool Snapshots, Oracle Solaris
ZFS Administration Guide



Leave a Reply 5

Your email address will not be published. Required fields are marked *


nazmir

nazmir

y is A not C ?? it suppose to be to reinstall in root slices (s0) is it?

Shubham Gupta

Shubham Gupta

B is Correct Ans according to documentation of oracle
Reference: How to Recreate a ZFS Root Pool and Restore Root Pool Snapshots, Oracle Solaris,ZFS Administration Guide
option a in not mounting zpool

Andrea

Andrea

Recent backup name: rpool-1202

david

david

A is correct

In this procedure, assume the following conditions:

The ZFS root pool cannot be recovered.

The ZFS root pool snapshots are stored on a remote system and are shared over NFS.

All the steps are performed on the local system.

Boot from a CD/DVD or the network.

SPARC: Select one of the following boot methods:

ok boot net -s
ok boot cdrom -s
If you don’t use -s option, you’ll need to exit the installation program.

x86: Select the option for booting from the DVD or the network. Then, exit the installation program.

Mount the remote snapshot dataset.

For example:

# mount -F nfs remote-system:/rpool/snaps /mnt
If your network services are not configured, you might need to specify the remote-system’s IP address.

If the root pool disk is replaced and does not contain a disk label that is usable by ZFS, you must relabel the disk.

For more information about relabeling the disk, go to the following site:

http://www.solarisinternals.com/wiki/index.php/ZFS_Troubleshooting_Guide

Recreate the root pool.

For example:

# zpool create -f -o failmode=continue -R /a -m legacy -o cachefile=
/etc/zfs/zpool.cache rpool c1t1d0s0
Restore the root pool snapshots.

This step might take some time. For example:

# cat /mnt/rpool.0804 | zfs receive -Fdu rpool
Using the -u option means that the restored archive is not mounted when the zfs receive operation completes.

Verify that the root pool datasets are restored.

For example:

# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 6.17G 60.8G 98K /a/rpool
rpool@0804 0 – 98K –
rpool/ROOT 4.67G 60.8G 21K /legacy
rpool/ROOT@0804 0 – 21K –
rpool/ROOT/zfsBE 4.67G 60.8G 4.67G /a
rpool/ROOT/zfsBE@0804 398K – 4.67G –
rpool/dump 1.00G 60.8G 1.00G –
rpool/dump@0804 0 – 1.00G –
rpool/swap 517M 61.3G 16K –
rpool/swap@0804 0 – 16K –
Set the bootfs property on the root pool BE.

For example:

# zpool set bootfs=rpool/ROOT/zfsBE rpool
Install the boot blocks on the new disk.

SPARC:

# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c1t1d0s0
x86:

# installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c1t1d0s0
Reboot the system.

# init 6

http://docs.oracle.com/cd/E19253-01/819-5461/ghzur/index.html