Sun Microsystems Logo
Products & Services
 
Support & Training
 
 

Previous Previous     Contents     Index     Next Next

ProcedureHow to Expand a UFS File System to a Multiterabyte UFS File System

Use the following procedure to expand a UFS file system to greater than 1 terabyte in size. This procedure assumes that the newfs -T option was used initially to create the UFS file system.

  1. Become superuser.

  2. Identify the size of the current disk or volume.

    For example, the following volume is 800 gigabytes.

    # metastat d98
    d98: Concat/Stripe
        Size: 1677754368 blocks (800 GB)
        Stripe 0:
            Device     Start Block  Dbase   Reloc
            c0t1d0s4          0     No      Yes
        Stripe 1:
            Device     Start Block  Dbase   Reloc
            c3t7d0s4          0     No      Yes

  3. Increase the volume to greater than 1 terabyte.

    For example:

    # metattach d98 c1t1d0s4
    d98: component is attached
    # metastat d98
    d98: Concat/Stripe
        Size: 2516631552 blocks (1.2 TB)
        Stripe 0:
            Device     Start Block  Dbase   Reloc
            c0t1d0s4          0     No      Yes
        Stripe 1:
            Device     Start Block  Dbase   Reloc
            c3t7d0s4          0     No      Yes
        Stripe 2:
            Device     Start Block  Dbase   Reloc
            c1t1d0s4          0     No      Yes

  4. Expand the UFS file system for the disk or volume to greater than 1 terabyte.

    For example:

    growfs -v /dev/md/rdsk/d98
    /usr/lib/fs/ufs/mkfs -G /dev/md/rdsk/d98 2516631552
    /dev/md/rdsk/d98:    2516631552 sectors in 68268 cylinders of 144 tracks, 
    256 sectors
            1228824.0MB in 2731 cyl groups (25 c/g, 450.00MB/g, 448 i/g)
    super-block backups (for fsck -F ufs -o b=#) at:
     32, 921888, 1843744, 2765600, 3687456, 4609312, 5531168, 6453024, 737...
     8296736,
    Initializing cylinder groups:
    ......................................................
    super-block backups for last 10 cylinder groups at:
     2507714848, 2508636704, 2509558560, 2510480416, 2511402272, 2512324128,
     2513245984, 2514167840, 2515089696, 2516011552,

  5. Mount and verify the expanded file system.

    For example:

    # mount /dev/md/dsk/d98 /datadir
    # df -h /datadir 
    Filesystem             size   used  avail capacity  Mounted on 
    /dev/md/dsk/d98        1.2T    64M   1.2T     1%    /datadir

Troubleshooting Multiterabyte UFS File System Problems

Use the following error messages and solutions to troubleshoot problems with multiterabyte UFS file systems.

Error Message (similar to the following):
mount: /dev/rdsk/c0t0d0s0 is not this fstype.

Cause

You attempted to mount a UFS file system that is greater than 1 terabyte on a system running a Solaris release prior to the Solaris 9 8/03 release.

Solution

Mount a UFS file system that is greater than 1 terabyte on a system running the Solaris 9 8/03 or later release.

Error Message
"File system was not set up with the multi-terabyte format."  "Its size 
cannot be increased to a terabyte or more."

Cause

You attempted to expand a file system that was not created with the newfs -T command.

Solution
  1. Back up the data for the file system that you want to expand to greater than one terabyte.

  2. Re-create the file system with the newfs command to create a multiterabyte file system.

  3. Restore the backup data into the newly created file system.

What's New in File Systems in the Solaris 9 Release?

This section describes new file system features in the Solaris 9 release.

Extended File Attributes

The UFS, NFS, and TMPFS file systems have been enhanced to include extended file attributes, which enable application developers to associate specific attributes to a file. For example, a developer of a windowing system file management application might choose to associate a display icon with a file. Extended file attributes are logically represented as files within a hidden directory that is associated with the target file.

You can use the runat command to add attributes and execute shell commands in the extended attribute name space, which is a hidden attribute directory that is associated with the specified file.

To use the runat command to add attributes to a file, you first have to create the attributes file.

$ runat filea cp /tmp/attrdata attr.1

Then, use the runat command to list the attributes of a file.

$ runat filea ls -l

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

Many Solaris file system commands have been modified to support file system attributes by providing an attribute-aware option that you can use to query, copy, or find file attributes. For more information, see the specific man page for each file system command.

UFS Snapshots

You can use the fssnap command to create a read-only snapshot of a file system. A snapshot is a file system's temporary image that is intended for backup operations.

See Chapter 48, Using UFS Snapshots (Tasks) for more information.

Improved UFS Direct I/O Concurrency

The performance of direct I/O, which is used by database applications to access unbuffered file system data, has been improved by allowing concurrent read and write access to regular UFS files. Previously, an operation that updated file data would lock out all other read or write accesses until the update operation was completed.

Concurrent writes are restricted to the special case of file rewrites. If the file is being extended, writing is single threaded as before. Generally, databases pre-allocate files and seldomly extend them thereafter. Therefore, the effects of this enhancement are evident during normal database operations.

The direct I/O improvements brings I/O bound database performance on a UFS file system to about 90% of raw partition access speeds. If the database is CPU bound or bus bandwidth bound, there might be no improvement.

Consider running your I/O database applications with direct I/O enabled if you are already using UFS to store database tables. Use your database administrative procedures to enable direct I/O, if possible. If there is no way to enable direct I/O through your database product, use the mount -forcedirectio option to enable direct I/O for each file system. Or, use the directio(3C) library call to enable direct I/O.

See mount_ufs(1M) or directio.3C for more information.

Previous Previous     Contents     Index     Next Next