Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Solaris Volume Manager Administration Guide
Previous Next

Maintaining RAID-1 Volumes

How to View the Status of Mirrors and Submirrors

Before You Begin

For an overview of the status information associated with RAID-1 volumes and submirrors, see Understanding Submirror Status to Determine Maintenance Actions.

  • Use one of the following methods to the check mirror or submirror status.
    • From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node. Choose the mirror. Then, choose Action⇒Properties. Follow the onscreen instructions. For more information, see the online help.

    • Run the metastat command on the mirror to view the status of each submirror.

      # metastat mirror

      See How to Change RAID-1 Volume Options to change a mirror's pass number, read option, or write option.

      See metastat(1M) for more information about checking device status.

Example 11-12 Checking Status of RAID-1 Volumes

Here is sample output from the metastat command. Use metastat command without a mirror name to display all the status of all mirrors.

# metastatd70: Mirror
    Submirror 0: d71
      State: Okay         
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 12593637 blocks

d71: Submirror of d70
    State: Okay         
    Size: 12593637 blocks
    Stripe 0:
        Device              Start Block  Dbase State        Reloc  Hot Spare
        c1t3d0s3                   0     No    Okay         Yes    
    Stripe 1:
        Device              Start Block  Dbase State        Reloc  Hot Spare
        c1t3d0s4                   0     No    Okay         Yes    
    Stripe 2:
        Device              Start Block  Dbase State        Reloc  Hot Spare
        c1t3d0s5                   0     No    Okay         Yes    
d0: Mirror
    Submirror 0: d1
      State: Okay        
    Submirror 1: d2
      State: Okay        
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 5600 blocks
 
d1: Submirror of d0
    State: Okay        
    Size: 5600 blocks
    Stripe 0:
        Device              Start Block  Dbase State        Hot Spare
        c0t2d0s7                   0     No    Okay        
 
...

Use the metastat command with a mirror name argument to display output for a specific mirror.

metastat d70
d70: Mirror
    Submirror 0: d71
      State: Okay         
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 12593637 blocks

d71: Submirror of d70
    State: Okay         
    Size: 12593637 blocks
    Stripe 0:
        Device              Start Block  Dbase State        Reloc  Hot Spare
        c1t3d0s3                   0     No    Okay         Yes    
    Stripe 1:
        Device              Start Block  Dbase State        Reloc  Hot Spare
        c1t3d0s4                   0     No    Okay         Yes    
    Stripe 2:
        Device              Start Block  Dbase State        Reloc  Hot Spare
        c1t3d0s5                   0     No    Okay         Yes    

For each submirror in the mirror, the metastat command shows the status, an “invoke” line if there is an error, the assigned hot spare pool (if any), the size in blocks, and information about each slice in the submirror.

How to Change RAID-1 Volume Options

Before You Begin

Check About RAID-1 Volume Options.

  1. Make sure that you have root privilege and that you have a current backup of all data.
  2. Use one of the following methods to change the RAID-1 options.
    • From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node. Choose the mirror. Then, choose Action⇒Properties. Follow the onscreen instructions. For more information, see the online help.

    • Use the metaparam command to display and change a mirror's options.

      # metaparam [mirror options] mirror

      See About RAID-1 Volume Options for a description of mirror options. Also, see the metaparam(1M) man page.

Example 11-13 Changing a RAID-1 Volume's Read Policy
# metaparam -r geometric d30
# metaparam d30
d30: mirror current parameters are:
    Pass: 1
    Read option: geometric (-g)
    Write option: parallel (default)

In this example, the -r option changes a mirror's read policy to geometric.

Example 11-14 Changing a RAID-1 Volume's Write Policy
# metaparam -w serial d40
# metaparam d40
d40: mirror current parameters are:
    Pass: 1
    Read option: roundrobin (default)
    Write option: serial (-S)

In this example, the -w option changes a mirror's write policy to serial.

Example 11-15 Changing a RAID-1 Volume's Pass Number
# metaparam -p 5 d50
# metaparam d50
d50: mirror current parameters are:
    Pass: 5
    Read option: roundrobin (default)
    Write option: parallel (default)

In this example, the -p option changes a mirror's pass number to 5.

How to Expand a RAID-1 Volume

Before You Begin

Read Creating and Maintaining RAID-1 Volumes.

  1. Make sure that you have root privilege and that you have a current backup of all data.
  2. Use one of the following methods to expand a mirror.
    • From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node. Choose the mirror. Then, choose Action->Properties and click the Submirror tab. Follow the onscreen instructions. For more information, see the online help.

    • Use the metattach command to attach additional slices to each submirror.

      # metattach submirror slice

      Each submirror in a mirror must be expanded. See the metattach(1M) man page for more information.

  3. Use the metattach command to cause the mirror to recompute its size based on the size of the submirror.
    # metattach mirror
Example 11-16 Expanding a Two-Way Mirror That Contains a Mounted File System
# metastat
d8: Mirror
    Submirror 0: d9
      State: Okay        
    Submirror 1: d10
      State: Okay        
...
# metattach d9 c0t2d0s5
d9: component is attached
# metattach d10 c0t3d0s5
d10: component is attached
# metattach d8

This example shows how to expand a mirrored, mounted file system by concatenating two disk drives to the mirror's two submirrors. The mirror is named d8 and contains two submirrors named d9 and d10.

See Also

For a UFS, run the growfs(1M) command on the mirror volume. See How to Expand a File System.

An application, such as a database, that uses the raw volume must have its own way of expanding the added storage.

How to Cancel a Volume Resynchronization Process

  1. Assume the Primary Administrator role, or become superuser.

    The Primary Administrator role includes the Primary Administrator profile. To create the role and assign the role to a user, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.

  2. Use the metastat command to view the status of the RAID-1 volume and associated submirrors.
    # metastat mirror-name

    or

    metastat -a
  3. Use the metasync -c volume command to cancel the resynchronization process.
Example 11-17 Canceling a Volume Resynchronization Process

The following example illustrates how to cancel the resynchronization process on a volume that is part of the disk set blue. Notice that the submirrors are in the “Resync cancelled” state after running the metasync command.

# metastat -a


blue/d10: Mirror
    Submirror 0: blue/d1
      State: Resyncing
    Submirror 1: blue/d2
      State: Okay
    Resync in progress: 0 % done
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 10485760 blocks (5.0 GB)

blue/d1: Submirror of blue/d10
    State: Resyncing
    Size: 10485760 blocks (5.0 GB)
    Stripe 0:
        Device                             Start Block  Dbase        State Reloc
 Hot Spare
        /dev/dsk/c3t50020F230000FA57d0s0          0     No            Okay   Yes




blue/d2: Submirror of blue/d10
    State: Okay
    Size: 10485760 blocks (5.0 GB)
    Stripe 0:
        Device                             Start Block  Dbase        State Reloc
 Hot Spare
        /dev/dsk/c3t50020F230000FA57d0s1          0     No            Okay   Yes



Device Relocation Information:
Device                           Reloc  Device ID
/dev/dsk/c3t50020F230000FA57d0   Yes    id1,[email protected]
4

# metasync -s blue -c d10
Mar  1 12:46:18 SunSystem1 md_mirror: WARNING: md: blue/d10: Resync cancelled

# metastat -a


blue/d10: Mirror
    Submirror 0: blue/d1
      State: Resync cancelled
    Submirror 1: blue/d2
      State: Okay
    Resync cancelled: 3 % done
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 10485760 blocks (5.0 GB)

blue/d1: Submirror of blue/d10
    State: Resync cancelled
    Invoke: metasync blue/d10
    Size: 10485760 blocks (5.0 GB)
    Stripe 0:
        Device                             Start Block  Dbase        State Reloc
 Hot Spare
        /dev/dsk/c3t50020F230000FA57d0s0          0     No            Okay   Yes


blue/d2: Submirror of blue/d10
    State: Okay
    Size: 10485760 blocks (5.0 GB)
    Stripe 0:
        Device                             Start Block  Dbase        State Reloc
 Hot Spare
        /dev/dsk/c3t50020F230000FA57d0s1          0     No            Okay   Yes



Device Relocation Information:
Device                           Reloc  Device ID
/dev/dsk/c3t50020F230000FA57d0   Yes    id1,[email protected]
4

How to Resume a Volume Resynchronization Process

  1. Assume the Primary Administrator role, or become superuser.

    The Primary Administrator role includes the Primary Administrator profile. To create the role and assign the role to a user, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.

  2. Use the metastat command to view the status of the RAID-1 volume and associated submirrors.
    # metastat mirror-name

    or

    metastat -a
  3. Use the metasync volume command to resume the resynchronization process.
    # metasync volume
Example 11-18 Resuming a Volume Resynchronization Process

The following example illustrates how to resume the resynchronization process on a volume that is part of the disk set blue. Notice that the submirrors are in the “Resync cancelled” state before running the metasync command. Once the metasync command is issued, the resynchronization process resumes.

# metastat -a

blue/d10: Mirror
    Submirror 0: blue/d1
      State: Resync cancelled
    Submirror 1: blue/d2
      State: Okay
    Resync cancelled: 3 % done
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 10485760 blocks (5.0 GB)

blue/d1: Submirror of blue/d10
    State: Resync cancelled
    Invoke: metasync blue/d10
    Size: 10485760 blocks (5.0 GB)
    Stripe 0:
        Device                             Start Block  Dbase        State Reloc
 Hot Spare
        /dev/dsk/c3t50020F230000FA57d0s0          0     No            Okay   Yes


blue/d2: Submirror of blue/d10
    State: Okay
    Size: 10485760 blocks (5.0 GB)
    Stripe 0:
        Device                             Start Block  Dbase        State Reloc
 Hot Spare
        /dev/dsk/c3t50020F230000FA57d0s1          0     No            Okay   Yes



Device Relocation Information:
Device                           Reloc  Device ID
/dev/dsk/c3t50020F230000FA57d0   Yes    id1,[email protected]
4

# metasync -s blue d10
# metastat -a


blue/d10: Mirror
    Submirror 0: blue/d1
      State: Resyncing
    Submirror 1: blue/d2
      State: Okay
    Resync in progress: 3 % done
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 10485760 blocks (5.0 GB)

blue/d1: Submirror of blue/d10
    State: Resyncing
    Size: 10485760 blocks (5.0 GB)
    Stripe 0:
        Device                             Start Block  Dbase        State Reloc
 Hot Spare
        /dev/dsk/c3t50020F230000FA57d0s0          0     No            Okay   Yes


blue/d2: Submirror of blue/d10
    State: Okay
    Size: 10485760 blocks (5.0 GB)
    Stripe 0:
        Device                             Start Block  Dbase        State Reloc
 Hot Spare
        /dev/dsk/c3t50020F230000FA57d0s1          0     No            Okay   Yes



Device Relocation Information:
Device                           Reloc  Device ID
/dev/dsk/c3t50020F230000FA57d0   Yes    id1,[email protected]
4
Previous Next

 
 
  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire