Solstice DiskSuite 4.2.1 User's Guide

Creating Trans Metadevices

This section describes how to create trans metadevices (UFS logging).

Preliminary Information for Creating Trans Metadevices


Caution - Caution -

Mirroring logging devices is strongly recommended. Losing the data in a logging device because of device errors can leave a file system in an inconsistent state which fsck(1M) may not be able to fix without user intervention. Using a mirror for the master device is a good idea to ensure data redundancy.


How to Create a Trans Metadevice for a File System That Can Be Unmounted (DiskSuite Tool)

Before beginning, identify the slice or metadevice that contains the file system. You'll need this when creating the master device. Also, decide if you want to mirror the logging device. If so, use "How to Create a Trans Metadevice Using Mirrors (DiskSuite Tool)". If you are mirroring the logging device, it is a good idea that the master device be a mirror also.

You can create a file system on the trans metadevice later if the master device doesn't already have a file system.

To create a trans metadevice for a file system, such as /usr, that cannot be unmounted during normal system operation, refer to "How to Create a Trans Metadevice for a File System That Cannot Be Unmounted (DiskSuite Tool)".

  1. Make sure you have met the prerequisites ("Prerequisites for Creating DiskSuite Objects") and have read the preliminary information ("Preliminary Information for Creating Trans Metadevices").

  2. Click the trans metadevice template.

    An unassigned and uncommitted Trans Metadevice object appears on the canvas. The metadevice name is automatically assigned.

  3. [Optional] Change the default metadevice name.

    Display the object's pop-up menu and choose Info. Type the new metadevice name in the Device Name field and click Attach. Then click Close.

  4. Drag the slice or metadevice that will contain the master device to the master rectangle in the trans metadevice template.

    When you can drag a slice from the Slice Browser, or drag a metadevice from the Objects list, a warning dialog box is displayed. Click Continue.


    Note -

    If an entry exists in the /etc/vfstab file for the file system, and the file system is currently mounted, DiskSuite Tool automatically updates it to use the trans metadevice's name.


  5. Select the slice or metadevice that will contain the logging device, and drag it to the log rectangle of the trans metadevice template.

    A Warning dialog box appears if the logging device is not mirrored.

  6. Click the top rectangle of the Trans Metadevice object then click Commit.

  7. Unmount then remount the file system on the trans metadevice.

    Logging becomes effective for the file system when you remount the system. On subsequent reboots, instead of checking the file system, fsck(1M) displays this message:


    /dev/md/rdsk/dx: is logging.
  8. To verify that the trans metadevice was committed, display the Configuration Log.

Example -- Committed Trans Metadevice Object

This example shows a committed trans metadevice, d8, consisting of slice c3t0d0s5 for the master device, and a mirror, d5, for the logging device. Notice how the master and logging devices are displayed within the trans object.

Graphic

How to Create a Trans Metadevice for a File System That Can Be Unmounted (Command Line)

After checking the prerequisites ("Prerequisites for Creating DiskSuite Objects"), and the preliminary information ("Preliminary Information for Creating Trans Metadevices"), create the trans metadevice with the metainit(1M) command. Refer to the metainit(1M) man page for more information.

Example -- Creating a Trans Metadevice With a Slice for the Master Device


# umount /home1
# metainit d63 -t c0t2d0s2 c2t2d0s1
d63: Trans is setup
(Edit the /etc/vfstab file so that the file system references the trans metadevice 
# umount /home1

Slice /dev/dsk/c0t2d0s2 contains a file system mounted on /home1. The slice to contain the logging device is /dev/dsk/c2t2d0s1. First, the file system is unmounted. The metainit command with the -t option creates the trans metadevice, d63.

Next, the /etc/vfstab file must be edited to change the entry for the file system to reference the trans metadevice. For example, the following line:


/dev/dsk/c0t2d0s2 /dev/rdsk/c0t2d0s2 /home1 ufs 2 yes -

should be changed to:


/dev/md/dsk/d63 /dev/md/rdsk/d63 /home1 ufs 2 yes -

Logging becomes effective for the file system when it is remounted.

On subsequent reboots, instead of checking the file system, fsck(1M) displays a logging message for the trans metadevice:


# reboot
...
/dev/md/rdsk/d63: is logging

Example -- Creating a Trans Metadevice With a Stripe for the Master Device


# umount /home2
# metainit d40 -t d2 c1t2d0s0
d40: Trans is setup
(Edit the /etc/vfstab file so that the file system references the trans metadevice)
# mount /home2

Stripe d2 contains a file system mounted on /home2. The slice to contain the logging device is /dev/dsk/c1t2d0s0. First, the file system is unmounted. The metainit command with the -t option creates the trans metadevice, d40.

Next, the /etc/vfstab file must be edited to change the entry for the file system to reference the trans metadevice. For example, the following line:


/dev/md/dsk/d2 /dev/md/rdsk/d2 /home2 ufs 2 yes -

should be changed to:


/dev/md/dsk/d40 /dev/md/rdsk/d40 /home2 ufs 2 yes -

Logging becomes effective for the file system when it is remounted.

On subsequent reboots, instead of checking the file system, fsck(1M) displays a logging message for the metadevice:


# reboot
...
/dev/md/rdsk/d40: is logging

How to Create a Trans Metadevice for a File System That Cannot Be Unmounted (DiskSuite Tool)

Use this procedure to log a file system, such as /usr, that cannot be unmounted during normal system operation.

  1. Make sure you have met the prerequisites ("Prerequisites for Creating DiskSuite Objects"), and have read the preliminary information ("Preliminary Information for Creating Trans Metadevices").

  2. Click the trans metadevice template.

    An unassigned and uncommitted Trans Metadevice object appears on the canvas. The metadevice name is automatically assigned.

  3. [Optional] Change the default metadevice name.

    Display the object's pop-up menu and choose Info. Type the new metadevice name in the Device Name field and click Attach. Then click Close.

  4. Click Slices to open the Slice Browser.

  5. Select the slice or metadevice that contains the file system to be logged, and drag it to the master rectangle in the Trans Metadevice object.

    This must be the slice or metadevice that contains the file system.

  6. Confirm the device that will be the master.

    Click the Continue button on the dialog box that appears.

  7. Select the slice or metadevice that will contain the logging device, and drag it to the log rectangle of the Trans Metadevice object.

  8. Confirm the slice that will be the log.

    Click the Continue button on the dialog box that appears.

  9. Click the top rectangle of the Trans Metadevice object then click Commit.

    Click the Really Commit button on the confirmation dialog box.

  10. To verify that the trans metadevice was committed, display the Configuration Log.

  11. Reboot.

    After the reboot, logging becomes effective for the file system.

Example -- Committed Trans Object for /usr

This example shows a trans metadevice that contains the /usr file system.

Graphic

How to Create a Trans Metadevice for a File System That Cannot Be Unmounted (Command Line)

After checking the prerequisites ("Prerequisites for Creating DiskSuite Objects"), and the preliminary information ("Preliminary Information for Creating Trans Metadevices"), use this procedure to log a file system, such as /usr, that cannot be unmounted during normal system operation. Refer to the metainit(1M) man page for more information.

Example -- Creating a Trans Metadevice for /usr


# metainit -f d20 -t c0t3d0s6 c1t2d0s1
d20: Trans is setup
(Edit the /etc/vfstab file so that the file system references the trans metadevice)
# reboot

Slice /dev/dsk/c0t3d0s6 contains the /usr file system. The slice to contain the logging device is /dev/dsk/c1t2d0s1. Because /usr cannot be unmounted, the metainit command is run with the -f option to force the creation of the trans device, d20. Next, the line in the /etc/vfstab file that mounts the file system must be changed to reference the trans metadevice. For example, the following line:


/dev/dsk/c0t3d0s6 /dev/rdsk/c0t3d0s6 /usr ufs 1 no -

should be changed to:


/dev/md/dsk/d20 /dev/md/rdsk/d20 /usr ufs 1 no -

Logging becomes effective for the file system when the system is rebooted.

How to Create a Trans Metadevice Using Mirrors (DiskSuite Tool)

You can increase data availability of a trans metadevice by using mirrors for the master and logging devices. Failure to mirror the logging device could result in significant data loss if the logging slice experiences errors. If you are mirroring the logging device, it is a good idea that the master device be a mirror also.

  1. Make sure you have met the prerequisites ("Prerequisites for Creating DiskSuite Objects"), and have read the preliminary information ("Preliminary Information for Creating Trans Metadevices").

  2. Refer to the tasks on creating mirrors ("How to Create a Mirror From Unused Slices (DiskSuite Tool)" to "How to Create a Mirror From a File System That Cannot Be Unmounted (Command Line)").

    Create two mirrors, one for the master device, and one for the logging device. The mirror for the master device must contain the file system.

  3. Refer to "How to Create a Trans Metadevice for a File System That Can Be Unmounted (DiskSuite Tool)".

    Use the mirrors created in step 2 for the master and logging devices.

How to Create a Trans Metadevice Using Mirrors (Command Line)

After checking the prerequisites ("Prerequisites for Creating DiskSuite Objects"), and the preliminary information ("Preliminary Information for Creating Trans Metadevices"), use the metainit(1M) to create the trans metadevice.

Example -- Creating a Trans Metadevice Using Mirrors


# umount /home1
# metainit d64 -t d30 d12
d64: Trans is setup
(Edit the /etc/vfstab file so that the file system references the trans metadevice)
# mount /home1

Mirror d30 contains a file system mounted on /home1. The mirror to contain the logging device is d12. First, the file system is unmounted. The metainit command with the -t option creates the trans metadevice, d64.

Next, the line in the /etc/vfstab file that mounts the file system must be changed to reference the trans metadevice. For example, the following line:


/dev/md/dsk/d30 /dev/md/rdsk/d30 /home1 ufs 2 yes -

should be changed to:


/dev/md/dsk/d64 /dev/md/rdsk/d64 /home1 ufs 2 yes -

Logging becomes effective for the file system when the file system is remounted.

On subsequent file system remounts or system reboots, instead of checking the file system, fsck(1M) displays a logging message for the metadevice:


# reboot
...
/dev/md/rdsk/d64: is logging