Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
18.  Transactional Volumes (Tasks) Converting Transactional Volumes to UFS Logging How to Convert a Transactional Volume to UFS Logging Example--Converting From Transactional Volumes to UFS Logging  Previous   Contents   Next 
   
 

Maintaining Transactional Volumes

How to Check the State of Transactional Volumes

  • To check the status of a transactional volume, use one of the following methods:

    • From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, then view the status of the volumes. Right-click a transactional volume and choose Properties for more detailed status information. For more information, see the online help.

    • Use the metastat command.

      For more information, see the metastat(1M) man page.

Example--Checking the Status of Transactional Volumes

Here is sample transactional volume output from the metastat command:

# metastat
d20: Trans
    State: Okay        
    Size: 102816 blocks
    Master Device: c0t3d0s4
    Logging Device: c0t2d0s3
 
        Master Device       Start Block  Dbase
        c0t3d0s4                   0     No  
 
c0t2d0s3: Logging device for d0
    State: Okay        
    Size: 5350 blocks
 
        Logging Device      Start Block  Dbase
        c0t2d0s3                 250     No 

The metastat command also shows master devices and log devices. For each device, the following information is displayed:

  • "Device", which is the device name of the slice or volume

  • "Start Block", which is the block on which the device begins

  • "Dbase", which shows if the device contains a state database replica

  • "State", which shows the state of the log device

The following table explains transactional volume states and possible actions to take.

Table 18-1 Transactional Volume States

State

Meaning

Action

Okay

The device is functioning properly. If mounted, the file system is logging and will not be checked at boot.

None.

Attaching

The log device will be attached to the transactional volume when the volume is closed or unmounted. When this occurs, the device transitions to the Okay state.

None.

Detached

The transactional volume does not have a log device. All benefits from UFS logging are disabled.

The fsck command automatically checks the device at boot time. See the fsck(1M) man page.

Detaching

The log device will be detached from the transactional volume when the volume is closed or unmounted. When this occurs, the device transitions to the Detached state.

None.

Hard Error

A device error or panic has occurred while the device was in use. An I/O error is returned for every read or write until the device is closed or unmounted. The first open causes the device to transition to the Error state.

Fix the transactional volume. See "How to Recover a Transactional Volume With a Panic", or "How to Recover a Transactional Volume With Hard Errors".

Error

The device can be read and written to. The file system can be mounted read-only. However, an I/O error is returned for every read or write that actually gets a device error. The device does not transition back to the Hard Error state, even when a later device error occurs.

Fix the transactional volume. See "How to Recover a Transactional Volume With a Panic", or "How to Recover a Transactional Volume With Hard Errors". Successfully completing the fsck or newfs commands transitions the device into the Okay state. When the device is in the Hard Error or Error state, the fsck command automatically checks and repairs the file system at boot time. The newfs command destroys whatever data might be on the device.

How to Attach a Log Device to a Transactional Volume

  1. Check "Prerequisites for Creating Solaris Volume Manager Elements" and "Background Information for Transactional Volumes".

  2. Unmount the UFS file system for which you want to enable logging.

  3. Attach a log device to the transactional volume by using one of the following methods:

    • From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, then choose the transactional volume from the listing. Right-click the volume, and choose Properties. For more information, see the online help.

    • Use the following form of the metattach command:

      metattach master-volume logging-volume 

      master-volume is the name of the transactional volume that contains the file system to be logged.

      logging-volume is the name of the volume or slice that should contain the log.

      See the metattach(1M) man page for more information.

    # metattach d1 d23
  4. Remount the file system.

Example--Attaching a Log Device to a Transactional Volume

This example shows a log device, the slice (c1t1d0s1), being attached to the transactional volume d1, which is mounted on /fs2.

# umount /fs2
# metattach d1 c1t1d0s1
d1: log device d0c1t1d0s1 is attached
# mount /fs2

How to Detach a Log Device from a Transactional Volume

  1. Check "Prerequisites for Creating Solaris Volume Manager Elements" and "Background Information for Transactional Volumes".

  2. Unmount the UFS file system for which you want to disable logging or change the log device.

  3. Detach the log device from the transactional volume by using one of the following methods:

    • From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, then choose the transactional volume from the listing. Right-click the volume, and choose Properties. For more information, see the online help.

    • Use the following form of the metadetach command:

      metadetach master-volume 

      master-volume is the name of the transactional volume that contains the file system that is being logged.

      See the metadetach(1M) man page for more information.

  4. Remount the file system.

 
 
 
  Previous   Contents   Next