Solaris Volume Manager Administration Guide

Chapter 13 Soft Partitions (Tasks)

This chapter provides information about performing tasks that are associated with Solaris Volume Manager soft partitions. For conceptual information regarding soft partitions, see Chapter 12, Soft Partitions (Overview).

Soft Partitions (Task Map)

The following task map identifies the procedures that are needed to manage Solaris Volume Manager soft partitions.

Task 

Description 

For Instructions 

Create soft partitions 

Use the Solaris Volume Manager GUI or the metainit command to create soft partitions.

How to Create a Soft Partition

Check the status of soft partitions 

Use the Solaris Volume Manager GUI or the metastat command to check the status of soft partitions.

How to Check the Status of a Soft Partition

Expand soft partitions 

Use the Solaris Volume Manager GUI or the metattach command to expand soft partitions.

How to Expand a Soft Partition

Remove soft partitions 

Use the Solaris Volume Manager GUI or the metaclear command to remove soft partitions.

How to Remove a Soft Partition

Creating Soft Partitions

ProcedureHow to Create a Soft Partition

Before You Begin

Check the Configuration Guidelines for Soft Partitions.

    Use one of the following methods to create a soft partition:

    • From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node. Choose Action⇒Create Volume. Then, follow the instructions in the wizard. For more information, see the online help.

    • To create a soft partition, use the following form of the metainit command:


      # metainit [-s diskset] soft-partition -p [-e] component size
      
      -sdiskset

      Specifies which disk set is being used. If -s is not specified, the local (default) disk set is used.

      -p

      Specifies that a soft partition be configured.

      -e

      Specifies that the entire disk should be reformatted. Formatting the disk provides a slice 0, which takes most of the disk. Formatting the disk also provides a slice 7 of a minimum of 4 Mbytes in size. Slice 7 contains a state database replica.

      soft-partition

      Specifies the name of the soft partition. The name is of the form dnnn, where nnn is a number in a range between 0 and 8192.

      component

      Specifies the disk, slice, or logical volume from which to create the soft partition. All existing data on the component is destroyed because the soft partition headers are written at the beginning of the component.

      size

      Specifies the size of the soft partition. The size is specified as a number followed by one of the following:

      • M or m for megabytes

      • G or g for gigabytes

      • T or t for terabytes

      • B or b for blocks (sectors)

    See the following examples and the metainit(1M) man page for more information.


Example 13–1 Creating a Soft Partition

In the following example, a 4-Gbyte soft partition called d20 is created on c1t3d0s2.


# metainit d20 -p c1t3d0s2 4g


Example 13–2 Taking a Whole Disk for Soft Partitions

The following example creates a soft partition and formats disk c1t2d0. This action destroys any data on that disk and creates a new soft partition on slice 0.


# metainit d7 -p -e c1t2d0 1G

Maintaining Soft Partitions

Maintaining soft partitions is no different from maintaining other logical volumes.

ProcedureHow to Check the Status of a Soft Partition

Before You Begin

Read the Configuration Guidelines for Soft Partitions.

    Use one of the following methods to check the status of a soft partition:

    • From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node. Choose the soft partition that you want to monitor. Then, choose Action⇒Properties. Follow the onscreen instructions . For more information, see the online help.

    • To view the existing configuration, use the following form of the metastat command:


      # metastat soft-partition
      
      soft-partition

      Specifies the name of the partition you want to check.


Example 13–3 Checking the Status of a Soft Partition

In the following example, the status of soft partition d1 is checked. This soft partition includes two extents and is built on the RAID-1 volume d100.


# metastat d1
d1: soft partition 
    component:  d100 
    state: OKAY 
    size:  42674285 blocks 
             Extent              Start Block                Block Count 
             0                          10234                   40674285 
             1                       89377263                    2000000 
d100: Mirror 
    Submirror 0: d10 
    State: OKAY 
    Read option: roundrobin (default) 
    Write option: parallel (default) 
    Size: 426742857 blocks 

d10: Submirror of d100 
    State:  OKAY 
    Hot spare pool: hsp002 
    Size: 426742857 blocks 
    Stripe 0: (interlace: 32 blocks) 
        Device              Start Block  Dbase State        Hot Spare 
        c3t3d0s0                  0             No    Okay 
  

ProcedureHow to Expand a Soft Partition

When no other logical volumes have been built on a soft partition, you can add space to the soft partition. Free space is located and used to extend the partition. Existing data is not moved.


Note –

If a soft partition has been used to create another volume (for example, if it is a component of a RAID-0 volume), the soft partition cannot be expanded. In most cases, the same objective (providing more space for the device that contains the soft partition) can be achieved by concatenating other volumes onto the containing device. See Expanding Storage Capacity for more information.


Before You Begin

Read the Configuration Guidelines for Soft Partitions.

    Use one of the following methods to expand a soft partition:

    • From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node. Choose the soft partition that you want to expand, then choose Action⇒Properties. Follow the onscreen instructions. For more information, see the online help.

    • To add space to a soft partition, use the following form of the metattach command:


      # metattach [-s diskset] soft-partition size
      
      diskset

      Specifies the name of the disk set in which the soft partition exists.

      soft-partition

      Specifies the name of an existing soft partition.

      size

      Specifies the amount of storage space to add.


Example 13–4 Expanding a Soft Partition

The following example shows how to attach space to a soft partition. The file system is then expanded using the growfs command while the soft partition is online and mounted.


# mount /dev/md/dsk/d20 /home2
# metattach d20 10g
# growfs -M /home2 /dev/md/rdsk/d20

For more information on the growfs command, see Expanding a File System Using the growfs Command.


ProcedureHow to Remove a Soft Partition

Before You Begin

Read the Configuration Guidelines for Soft Partitions.

    Use one of the following methods to delete a soft partition:

    • From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node. Choose the soft partition that you want to delete. Then choose Action⇒Properties. Follow the onscreen instructions. For more information, see the online help.

    • To delete a soft partition, use one of the following forms of the metaclear command:


      # metaclear [-s diskset] component
      # metaclear [-s diskset] -r soft-partition
      # metaclear [-s diskset] -p component
      
      diskset

      Specifies the disk set in which the soft partition exists.

      soft-partition

      Specifies the soft partition to delete.

      -r

      Specifies to recursively delete logical volumes, but not volumes on which others depend.

      -p

      Specifies to purge all soft partitions on the specified component, except those soft partitions that are open.

      component

      Specifies the component from which to clear all of the soft partitions.


Example 13–5 Removing a Soft Partition

This example shows how to delete all soft partitions on c1t4d2s0.


# metaclear -p c1t4d2s0