The following procedure describes how to mount a mirrored metadevice during a failsafe boot. In this procedure, the root (/) file system that is used is /dev/dsk/c0t0d0s0.
1.Boot the failsafe archive.
SPARC platform: From the ok prompt, type the following command:
ok boot -F failsafe
If the system is already running, open a terminal window, become superuser, and type the following command:
# reboot -- "-F failsafe"
For more information, see How to Boot a SPARC Based System in Failsafe Mode.
x86 platform: Boot the system by selecting the failsafe boot entry in the GRUB menu.
For more information, see How to Boot an x86 Based System in Failsafe Mode.
Booting the system in failsafe mode produces the following output:
Starting shell.
#
2.During the failsafe boot, when prompted by the system to select a device to mount, type q to indicate none.
Please select a device to be mounted (q for none)[?,??,q]: q
3.Temporarily mount a submirror of the root (/) file system as read-only on the /a directory.
# mount -o ro /dev/dsk/c0t0d0s0 /a
4.Copy the md.conf file to the /kernel/drv directory.
# cp /a/kernel/drv/md.conf /kernel/drv/
5.Unmount the /a directory.
# unmount /a
6.Use the devfsadm command to load the md driver.
# update_drv -f md
Running this command causes the configuration to be read, and the necessary devices to be created.
--------------------------------------------------------------------------------
Note –
Before proceeding to the next step, wait a few seconds to ensure that the md driver has had time to load.
--------------------------------------------------------------------------------
7.Use the metasync command to ensure that the root (/) file system is in sync. For example:
# metasync d0
8.Mount the root mirror metadevice on the /a directory.
# mount /dev/md/dsk/d0 /a
9.Update the boot archive of the device that you mounted in the previous step.
# bootadm update-archive -v -R /a
If the boot archive fails to be updated, or an error message is displayed, do the following:
a.Update the timestamp on the md.conf file on the /a directory, which forces an update of the boot archive.
# touch /a/kernel/drv/md.conf
b.Update the boot archive by running the bootadm command.
# bootadm update-archive -v -R /a
The update of the boot archive takes a few minutes to complete. If the boot archive was updated successfully, a message similar to the following is displayed:
changed /a/etc/system
cannot find: /a/etc/cluster/nodeid: No such file or directory
cannot find: /a/etc/devices/mdi_ib_cache: No such file or directory
Creating ram disk on /a
updating /a/platform/i86pc/boot_archive
10.Unmount /a.
# unmount /a
11.Reboot the system.
1.Boot the failsafe archive.
SPARC platform: From the ok prompt, type the following command:
ok boot -F failsafe
If the system is already running, open a terminal window, become superuser, and type the following command:
# reboot -- "-F failsafe"
For more information, see How to Boot a SPARC Based System in Failsafe Mode.
x86 platform: Boot the system by selecting the failsafe boot entry in the GRUB menu.
For more information, see How to Boot an x86 Based System in Failsafe Mode.
Booting the system in failsafe mode produces the following output:
Starting shell.
#
2.During the failsafe boot, when prompted by the system to select a device to mount, type q to indicate none.
Please select a device to be mounted (q for none)[?,??,q]: q
3.Temporarily mount a submirror of the root (/) file system as read-only on the /a directory.
# mount -o ro /dev/dsk/c0t0d0s0 /a
4.Copy the md.conf file to the /kernel/drv directory.
# cp /a/kernel/drv/md.conf /kernel/drv/
5.Unmount the /a directory.
# unmount /a
6.Use the devfsadm command to load the md driver.
# update_drv -f md
Running this command causes the configuration to be read, and the necessary devices to be created.
--------------------------------------------------------------------------------
Note –
Before proceeding to the next step, wait a few seconds to ensure that the md driver has had time to load.
--------------------------------------------------------------------------------
7.Use the metasync command to ensure that the root (/) file system is in sync. For example:
# metasync d0
8.Mount the root mirror metadevice on the /a directory.
# mount /dev/md/dsk/d0 /a
9.Update the boot archive of the device that you mounted in the previous step.
# bootadm update-archive -v -R /a
If the boot archive fails to be updated, or an error message is displayed, do the following:
a.Update the timestamp on the md.conf file on the /a directory, which forces an update of the boot archive.
# touch /a/kernel/drv/md.conf
b.Update the boot archive by running the bootadm command.
# bootadm update-archive -v -R /a
The update of the boot archive takes a few minutes to complete. If the boot archive was updated successfully, a message similar to the following is displayed:
changed /a/etc/system
cannot find: /a/etc/cluster/nodeid: No such file or directory
cannot find: /a/etc/devices/mdi_ib_cache: No such file or directory
Creating ram disk on /a
updating /a/platform/i86pc/boot_archive
10.Unmount /a.
# unmount /a
11.Reboot the system.
No comments:
Post a Comment