Sun Microsystems Logo
Products & Services
 
Support & Training
 
 

Previous Previous     Contents     Index     Next Next

ProcedureHow to Create a Multiterabyte UFS File System

Support for a multiterabyte UFS file system assumes the availability of multiterabyte LUNs, provided as Solaris Volume Manager or VxVM volumes, or as physical disks greater than 1 terabyte.

Before you can create a multiterabyte UFS file system, verify that you have done either of the following:

  • Created a multiterabyte disk partition with the format utility or the Solaris installation utilities.

  • Set up a multiterabyte volume with Solaris Volume Manager.

  1. Become superuser.

  2. Create a multiterabyte UFS file system on a logical volume.

    For example, this command creates a UFS file system for a 1.8 terabyte volume.

    # newfs /dev/md/rdsk/d99
    newfs: construct a new file system /dev/md/rdsk/d99: (y/n)? y
    /dev/md/rdsk/d99:    3859402752 sectors in 628158 cylinders of 48 tracks, 
    128 sectors
            1884474.0MB in 4393 cyl groups (143 c/g, 429.00MB/g, 448 i/g)
    super-block backups (for fsck -F ufs -o b=#) at:
    32, 878752, 1757472, 2636192, 3514912, 4393632, 5272352, 6151072, 702...
    Initializing cylinder groups:
    ........................................................................
    super-block backups for last 10 cylinder groups at:
     3850872736, 3851751456, 3852630176, 3853508896, 3854387616, 3855266336,
     3856145056, 3857023776, 3857902496, 3858781216,
    # 

  3. Verify the integrity of the newly created file system.

    For example:

    # fsck /dev/md/rdsk/d99
    ** /dev/md/rdsk/d99
    ** Last Mounted on 
    ** Phase 1 - Check Blocks and Sizes
    ** Phase 2 - Check Pathnames
    ** Phase 3 - Check Connectivity
    ** Phase 4 - Check Reference Counts
    ** Phase 5 - Check Cyl groups
    2 files, 2 used, 241173122 free (0 frags, 241173122 blocks, 0.0% 
    fragmentation)
    # 

  4. Mount and verify the newly created file system.

    For example:

    # mount /dev/md/dsk/d99 /bigdir
    # df -h /bigdir
    Filesystem             size   used  avail capacity  Mounted on
    /dev/md/dsk/d99        1.8T    64M   1.8T     1%    /bigdir

ProcedureHow to Expand a Multiterabyte UFS File System

After a multiterabyte UFS file system is created, you can use the growfs command to expand the file system. For example, using the file system that was created for the volume in the preceding procedure, you can add another disk to this volume. Then, expand the file system.

  1. Become superuser.

  2. Add another disk to the volume.

    For example:

    # metattach d99 c4t5d0s4
    d99: component is attached
    # metastat
    d99: Concat/Stripe
        Size: 5145882624 blocks (2.4 TB)
        Stripe 0:
            Device     Start Block  Dbase   Reloc
            c0t1d0s4      36864     Yes     Yes
        Stripe 1:
            Device     Start Block  Dbase   Reloc
            c3t7d0s4          0     No      Yes
        Stripe 2:
            Device     Start Block  Dbase   Reloc
            c1t1d0s4          0     No      Yes
        Stripe 3:
            Device     Start Block  Dbase   Reloc
            c4t5d0s4          0     No      Yes

  3. Expand the file system.

    For example:

    # growfs -v /dev/md/rdsk/d99
    /usr/lib/fs/ufs/mkfs -G /dev/md/rdsk/d99 5145882624
    /dev/md/rdsk/d99:    5145882624 sectors in 837546 cylinders of 48 tracks, 
    128 sectors
            2512638.0MB in 5857 cyl groups (143 c/g, 429.00MB/g, 448 i/g)
    super-block backups (for fsck -F ufs -o b=#) at:
     32, 878752, 1757472, 2636192, 3514912, 4393632, 5272352, 6151072, 702...
    Initializing cylinder groups:
    .........................................................................
    super-block backups for last 10 cylinder groups at:
     5137130400, 5138009120, 5138887840, 5139766560, 5140645280, 5141524000,
     5142402720, 5143281440, 5144160160, 5145038880,
    # 

  4. Mount and verify the expanded file system.

    For example:

    # mount /dev/md/dsk/d99 /bigdir
    # df -h /bigdir 
    Filesystem             size   used  avail capacity  Mounted on 
    /dev/md/dsk/d99        2.4T    64M   2.4T     1%    /bigdir

Previous Previous     Contents     Index     Next Next