Solstice DiskSuite 4.2.1 User's Guide

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.