<

Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x

Changing the Parameters of a Solaris File System Dynamically

Published on
9,090 Points
3,090 Views
Last Modified:
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it.
For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volume, which destroys the data on it. After that it could take a significant amount of time for the volume to be reinitialized if you've got a large amount of disk space. In addition, you may need to change the segment size of a logical unit number (LUN) in a Redundant Array of Inexpensive Disks (RAID) box, which requires deleting the existing LUN, and so on. Even if you're changing the parameter of a metadevice, or renaming the metadevice, you'll need to unmount the file system.
How do I dynamically change the parameters of a file system without destroying the data on it?
You can do this with Solaris Volume Manager software, which is delivered as an integral part of the Solaris 9 OS. In earlier versions of the Solaris OS, it was called Solstice DiskSuite software or Online: DiskSuite software.
First, the file system has to be created and mounted as a one-way mirror metadevice such as d100, which contends with d101 as its submirror in this example:
   # metastat d100
   d100: Mirror
       Submirror 0: d101
         State: Okay
       Pass: 1
       Read option: roundrobin (default)
       Write option: parallel (default)
       Size: 10261520 blocks

   d101: Submirror of d100
       State: Okay
       Size: 10261520 blocks
       Stripe 0: (interlace: 32 blocks)
           Device              Start Block  Dbase State        Hot Spare
           c1t12d0s0                  0     No    Okay
           c1t13d0s0               1520     No    Okay
           c1t14d0s0               1520     No    Okay
           c1t15d0s0               1520     No    Okay

Open in new window

The next step is to create a new metadevice d102, which must be the same size as the submirror d101. For T3, you need a spare disk volume. For the RAID box, you need a set of spare disks.
   # metainit d102 1 4 c0t11d0s0 c0t12d0s0 c0t13d0s0 c0t14d0s0
   d82: Concat/Stripe is setup

   # metastat d102
   d102: Concat/Stripe
       Size: 10261520 blocks
       Stripe 0: (interlace: 32 blocks)
           Device              Start Block  Dbase
           c0t11d0s0                  0     No
           c0t12d0s0               1520     No
           c0t13d0s0               1520     No
           c0t14d0s0               1520     No

Open in new window

Then apply a set of new parameters by using the commands newfs, tunefs, and so on.
The final step is to add the new metadevice d102 as the second submirror to d100. The resynchronization occurs automatically.
   # metattach d100 d102
   d100: submirror d102 is attached

   # metastat d100
   d100: Mirror
       Submirror 0: d101
         State: Okay
       Submirror 1: d102
         State: Resyncing
       Resync in progress: 80 % done
       Pass: 1
       Read option: roundrobin (default)
       Write option: parallel (default)
       Size: 10261520 blocks
   ......

Open in new window

When the resynchronization is complete, you have two-way mirrors. One submirror has the old parameters, and the other has the new parameters.
Then you should detach the submirror d101 from d100, and remove it altogether.
   # metadetach d100 d101
   # metaclear d101

Open in new window

Now you've changed the file system with a set of new parameters dynamically.
0
Comment
Author:Joseph Gan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
0 Comments

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Join & Write a Comment

Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month