Solstice DiskSuite 4.2.1 User's Guide

Expanding Slices and Metadevices

This section contains the tasks to expand, or add space to, a slice (non-metadevice) or a metadevice. For example, if a file system fills up a concatenated metadevice, you can add more slices, then "grow" the file system to the newly added space.

Preliminary Information for Expanding Slices and Metadevices

How to Expand a Slice Containing Existing Data (DiskSuite Tool)

Use this task to create a concatenation from a single slice that has run out of space. You can use this task for a file system or an application, such as a database. The high-level steps in this procedure are:

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

  2. Click the Concat/Stripe template.

    An unassigned and uncommitted Concat/Stripe object appears on the canvas. The metadevice name is automatically assigned.

  3. [Optional] To 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 and drag the slice containing the data into the Concat/Stripe object.

    If a dialog box appears that the slice is mounted, click Continue.

  6. Click the top rectangle of the Concat/Stripe object then click Commit.

    Mounted file system only: A Commit Warning dialog box appears. Click Really Commit. (As long as the file system has an entry in the /etc/vfstab file, DiskSuite Tool updates the entry to use the metadevice name. If the file system is mounted by hand, you need to use the block metadevice name whenever the file system is mounted.)

  7. Mounted file system only: Unmount then remount the file system. If the file system is busy, you'll need to reboot.

  8. In DiskSuite Tool, open the Concat object and Slice Browser. Drag another slice into the object.

  9. Make sure the object is selected then click Commit.

    Mounted file system only: A GrowFS dialog box appears. Click Grow Now to begin running the growfs(1M) command. A GrowFS Running message appears. If you click Terminate GrowFS, the command is aborted. Otherwise, when the growfs(1M) command finishes, you are returned to the DiskSuite Tool window.

    Application using the raw device: Such applications must have their own method, outside of DiskSuite, to recognize the expanded space.

  10. The Configuration Log shows that the concatenation was committed.


    Note -

    During the expansion, the file system is locked and not available for write access. Write accesses are transparently suspended and are restarted when growfs(1M) unlocks the file system. Read accesses are not affected, though access times are not kept while the lock is in effect.


Example -- Expanded Concatenation Object

This example shows a committed concatenation. The initial object consisted of a file system of one slice, c0t0d0s3. Slice c1t3d0s0 was then concatenated, and the growfs(1M) command was run automatically to make the entire space available.

Graphic

How to Expand a Slice Containing Existing Data (Command Line)

After checking the prerequisites ("Prerequisites for Maintaining DiskSuite Objects"), and the preliminary information ("Preliminary Information for Expanding Slices and Metadevices"), follow this example to expand a slice containing a mounted file system.

Example -- Expanding a File System By Creating a Concatenation


# umount /docs
# metainit d25 2 1 c0t1d0s2 1 c0t2d0s2
d25: Concat/Stripe is setup
(Edit the /etc/vfstab file so that the file system references the metadevice d25)
# mount /docs

This example creates a concatenation called d25 out of two slices, /dev/dsk/c0t1d0s2 (which contains a file system mounted on /docs) and /dev/dsk/c0t2d0s2. The file system must first be unmounted.


Caution - Caution -

The first slice in the metainit(1M) command must be the slice containing the file system. If not, you will erase your data.


Next, the entry for the file system in the /etc/vfstab file is changed (or entered for the first time) to reference the metadevice. For example, the following line:


/dev/dsk/c0t1d0s2 /dev/rdsk/c0t1d0s2 /docs ufs 2 yes -

should be changed to:


/dev/md/dsk/d25 /dev/md/rdsk/d25 /docs ufs 2 yes -

Lastly, the file system is remounted.

Where to Go From Here

For a UFS, run the growfs(1M) command on the metadevice. Refer to "How to Grow a File System (Command Line)".

An application, such as a database, that uses the raw metadevice must have its own way of recognizing the metadevice, or of growing the added space.

How to Expand an Existing Concat/Stripe (DiskSuite Tool)

This task assumes that you are adding an additional stripe to an existing concatenation or stripe. If you need to recreate a concatenated stripe as part of disaster recovery, refer to "How to Recreate a Stripe or Concatenation After Slice Failure (DiskSuite Tool)".

A concatenated stripe enables you to expand an existing stripe or concatenation. For example, if a stripe has run out of space, you can make it into a concatenated stripe, and expand it without having to back up and restore data.


Note -

If you drag multiple slices into an existing Concat/Stripe object, you are given the optional of making the slices into a concatenation or a stripe.


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

  2. Double-click the Concat/Stripe object in the Objects list.

    DiskSuite Tool displays the Concat/Stripe object on the canvas.

  3. Click Slices to open the Slice Browser window.

  4. Select the slice(s) you want to concatenate as another stripe. Drag the slice(s) to the top rectangle of the metadevice object.

    If you drag multiple slices, a dialog box prompts you to choose how you want to add the slices, either as a stripe or a concat. Click either Stripe or Concat.

    The additional striped metadevice or concatenated metadevice is added at the bottom of the Concat/Stripe object.

  5. Click the top rectangle of the Concat/Stripe object. Then click Commit.

    Mounted file system only: A GrowFS dialog box appears. Click Grow Now to begin running the growfs(1M) command. A GrowFS Running message appears. If you click Terminate GrowFS, the command is aborted. Otherwise, when the growfs(1M) command finishes, you are returned to the DiskSuite Tool window.

    Application using the raw device: Such applications must have their own method, outside of DiskSuite, to recognize the expanded space.

  6. To verify that the concatenated stripe was committed, display the Configuration Log.

Example -- Concatenated Stripe Object

This example shows a striped metadevice consisting of two slices to which another slice has been added. The Concat/Stripe object displays the slices in two stripe rectangles labeled stripe 0 (the original stripe) and stripe 1 (the added stripe).

Graphic

How to Expand an Existing Stripe (Command Line)

This procedure assumes that you are adding an additional stripe to an existing stripe. If you need to recreate a concatenated stripe using the metainit(1M) command as part of disaster recovery, refer to "How to Recreate a Stripe or Concatenation After Slice Failure (Command Line)".

A concatenated stripe enables you to expand an existing stripe. For example, if a stripe has run out of space, you can make it into a concatenated stripe, and expand it without having to back up and restore data.


Note -

If you use DiskSuite Tool to drag multiple slices into an existing striped metadevice, you are given the optional of making the slices into a concatenation or a stripe. When using the metattach(1M) command to add multiple slices to an existing striped metadevice, they must be added as a stripe.


After checking the prerequisites ("Prerequisites for Maintaining DiskSuite Objects"), and the preliminary information ("Preliminary Information for Expanding Slices and Metadevices"), use the metattach(1M) command to create the concatenated stripe. Refer to the metattach(1M) man page for more information.

Example -- Creating a Concatenated Stripe By Attaching a Single Slice


# metattach d2 c1t2d0s2
d2: components are attached

This example attaches a slice to an existing stripe, d2. The system verifies that the slice is attached.

Example -- Creating a Concatenated Stripe By Adding the Same Number of Slices in the Existing Metadevice


# metattach d25 c1t2d0s2 c1t2d1s2 c1t2d3s2
d25: components are attached

This example takes an existing three-way striped metadevice, d25, and concatenates another three-way stripe. Because no interlace value is given for the attached slices, they inherit the interlace value configured for d25. The system verifies that the Concat/Stripe object has been set up.


Note -

Depending on the type of application, by attaching the same number of slices, the metadevice might not experience a performance degradation.


Example -- Creating a Concatenated Stripe From Scratch


# metainit d1 3 2 c0t0d0s2 c1t0d0s2 -i 16k \
	2 c1t2d0s2 c1t2d1s0 -i 32k \
	2 c2t0d0s2 c2t0d1s2
d1: Concat/Stripe is setup

Normally, you would not create a metadevice such as this one from scratch. The example illustrates that d1 is a concatenation of three stripes (the first number 3). The first stripe consists of two slices (the number 2 following the number 3). The -i 16k specifies an interlace of 16 Kbytes. The second stripe (as indicated by the number 2 on the second line) consists of two slices, and uses an interlace of 32 Kbytes. The last stripe consists of a two slices. Because no interlace is specified for the third stripe, it inherits the value from the stripe before it, which in this case is 32 Kbytes.

Where To Go From Here

For a UFS, run the growfs(1M) command on the metadevice. Refer to "How to Grow a File System (Command Line)".

An application, such as a database, that uses the raw metadevice must have its own way of recognizing the metadevice, or of growing the added space.

To prepare a newly created concatenated stripe for a file system, refer to "How to Create a File System on a Metadevice (Command Line)".

How to Expand a Mirror (DiskSuite Tool)

Use this task to expand a mirror's submirrors. You need to expand each submirror. You can expand a submirror while it is in use, without having to take it offline.

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

  2. Double-click an existing Mirror object in the Objects list.

    The object appears on the canvas.

  3. To add a slice to the submirror, click Slices to open the Slice Browser. To add a Concat/Stripe object, select one from the Objects list.

  4. Select and drag a slice from the Slice Browser, or a Concat/Stripe object from the Objects list, to the top of one of the submirror rectangles in the Mirror object.

    Select a slice or concat/stripe of the appropriate size. Use Control-click to select multiple slices.

  5. When you drag the slice or Concat/Stripe object to the Mirror object, a Warning dialog box appears because the submirror will be a different size after the addition. Click Continue.

    The slice or concat/stripe object is added to the bottom of the submirror rectangle.

  6. Select and drag a slice or Concat/Stripe object to the top of one of the second submirror rectangles in the Mirror object.

    A Validation dialog box appears. Click OK.

    If you have a third submirror, repeat this step.

  7. Click the top of the Mirror object then click Commit.

    Mounted file system only: A GrowFS dialog box appears. Click Grow Now to begin running the growfs(1M) command. A GrowFS Running message appears. If you click Terminate GrowFS, the command is aborted. Otherwise, when the growfs(1M) command finishes, you are returned to the DiskSuite Tool window.

    Application using the raw device: Such applications must have their own method, outside of DiskSuite, to recognize the expanded space.

  8. To verify that the mirror was committed, display the Configuration Log.

How to Expand a Mirror (Command Line)

After checking the prerequisites ("Prerequisites for Maintaining DiskSuite Objects"), and the preliminary information ("Preliminary Information for Expanding Slices and Metadevices"), use the metattach(1M) command to attach additional slices to each submirror. Each submirror in a mirror must be expanded. Refer to the metattach(1M) man page for more information.

Example -- Expanding a Two-Way Mirror Containing 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

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.

Where to Go From Here

For a UFS, run the growfs(1M) command on the mirror metadevice. Refer to "How to Grow a File System (Command Line)".

An application, such as a database, that uses the raw metadevice must have its own way of growing the added space.

How to Expand a RAID5 Metadevice (DiskSuite Tool)

Use this procedure to expand an existing RAID5 metadevice by concatenating another slice. In general, this is a short-term solution to a RAID5 metadevice running out of space. For performance reasons, it is best to have a "pure" RAID5 metadevice.

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

  2. Double-click an existing RAID5 metadevice object in the Objects list.

    The object appears on the canvas.

  3. Click Slices to open the Slice Browser. Then select the slice(s) to be concatenated to the RAID5 metadevice.

  4. Drag the selected slice(s) to the top of the RAID5 object.

    The slice must be at least as large as the smallest slice in the RAID5 metadevice. You can select multiple slices at the same time by using the Control-click technique.

    DiskSuite Tool displays the additional slice(s) at the bottom of the object.

  5. Click the top rectangle of the RAID5 object. Then click Commit.

    Mounted file system only: A GrowFS dialog box appears. Click Grow Now to begin running the growfs(1M) command. A GrowFS Running message appears. If you click Terminate GrowFS, the command is aborted. Otherwise, when the growfs(1M) command finishes, you are returned to the DiskSuite Tool window.

    Application using the raw device: Such applications must have their own method, outside of DiskSuite, to recognize the expanded space.

  6. To verify that the RAID5 metadevice was committed, display the Configuration Log.

Example -- Expanded RAID5 Metadevice

This example shows a RAID5 metadevice, d3, to which slice /dev/dsk/c3t4d4s0 has been added.

Graphic

How to Expand a RAID5 Metadevice (Command Line)

After checking the prerequisites ("Prerequisites for Maintaining DiskSuite Objects"), and the preliminary information ("Preliminary Information for Expanding Slices and Metadevices"), use the metattach(1M) command to attach additional slices to a RAID5 metadevice. Refer to the metattach(1M) man page for more information.

In general, this is a short-term solution to a RAID5 metadevice running out of space. For performance reasons, it is best to have a "pure" RAID5 metadevice.

Example -- Adding a Slice to a RAID5 Metadevice


# metattach d2 c2t1d0s2
d2: column is attached

This example shows the addition of slice /dev/dsk/c2t1d0s2 to an existing RAID5 metadevice named d2.

Where to Go From Here

For a UFS, run the growfs(1M) command on the RAID5 metadevice. Refer to "How to Grow a File System (Command Line)".

An application, such as a database, that uses the raw metadevice must have its own way of growing the added space.

How to Expand a Trans Metadevice (DiskSuite Tool)

You can expand a master device within a trans metadevice as long as the master device is a metadevice. To expand a master that consists of a slice, you must tear down (clear) the trans, put the slice into a metadevice, then recreate the trans.

Use this procedure to expand a master device that makes up the trans metadevice.


Note -

If the master device is a mirror, you need to expand each submirror.


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

  2. Double-click an existing Trans Metadevice object in the Objects list.

    The object appears on the canvas.

  3. Expand the master device.

  4. If the log is not mirrored, a dialog box appears. Click OK.

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

    Mounted file system: A GrowFS dialog box appears. Click Grow Now to begin running the growfs(1M) command. A GrowFS Running message appears. If you click Terminate GrowFS, the command is aborted. Otherwise, when the growfs(1M) command finishes, you are returned to the DiskSuite Tool window.

    Application using the raw device: Such applications must have their own method, outside of DiskSuite, to recognize the expanded space.

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

How to Expand a Trans Metadevice (Command Line)

You can expand a master device within a trans device as long as the master is a metadevice. To expand a master that consists of a slice, you must tear down (clear) the trans, put the slice into a metadevice, then recreate the trans.

After checking the prerequisites ("Prerequisites for Maintaining DiskSuite Objects"), and the preliminary information ("Preliminary Information for Expanding Slices and Metadevices"), use the metattach(1M) command to attach additional slices to a master device within the trans metadevice. Refer to the metattach(1M) man page for more information.


Note -

If the master device is a mirror, you need to expand each submirror.


Example -- Expanding a Mirrored Master Device Within a Trans Metadevice


# metastat d10
d10: Trans
    State: Okay        
    Size: 102816 blocks
    Master Device: d0
    Logging Device: d1
d0: Mirror
    Submirror 0: d11
      State: Okay
...
    Submirror 1: d12
      State: Okay        
...
# metattach d11 c0t2d0s5
d11: component is attached
# metattach d12 c0t3d0s5
d12: component is attached

This example expands a trans device, d10, whose master device consists of a two-way mirror, d0, which contains two submirrors, d11 and d12. The metattach(1M) command is run on each submirror. The system confirms that each slice was attached.

Where to Go From Here

For a UFS, run the growfs(1M) command on the trans metadevice (not the master device). Refer to "How to Grow a File System (Command Line)".

An application, such as a database, that uses the raw metadevice must have its own way of growing the added space.