Extend VxFS in Solaris

How To Create A Veritas File System In Solaris

RSY Digital World Logo

Extend VxFS in Solaris

Extend VxFS in Solaris is the most common kind of request a UNIX administrator goes through regardless of technology advancement and inclusion of cloud technologies. So it is better to know how to Extend VxFS in Solaris. All cloud services providers are focusing on IAAS infrastructure as a service in which still infrastructure has to be maintained by organizations.

Still many organizations have Solaris Servers with Veritas being used for volume management or many LDOMS also have VxVM running for FS Management specifically oracle database servers. So being an old topic it still has relevance. 

Scenario: You have request to increase the file system in Solaris where volumes are being managed under the veritas volume manager.

Solution: There will be three scenarios in this case. Let’s see.

A.  If the requested space already available in the disk group and file system can be increased online anytime.

B.  If requested space is available in another volume in the same DG which can be used by reshuffling space from one volume to another in the same DG and the file system can be increased on the fly like scenario A. 

C. If the requested amount of storage not available in disk and reshuffling of space is also not allowed.

How to Increase Veritas File System in Solaris

1. How to Check FS Status in Solaris

First, take a backup of requested FS current usages using the below command.

# df –h /export/opt/sybase > /var/tmp/df-h.sybase.DDMMYYYY

# more /var/tmp/df-h.sybase.DDMMYYYY

Saving the current output is a normal system administration standard which is really helpful in all situations. Disk free output will also provide related disk group and volume name which you need to increase.

2. How to Find Free Space in VxVM DG in Solaris

# vxassist –g local_database-dg maxsize 

Disk Group Name you will find in step 1. You will get available space in disk group space in MB.You can convert it to GB by dividing it by 1024 using a calculator on the server itself using bc or any other way as you like.

3.Extend VxFS in Solaris

.# vxresize -g local_database-dg sybase +500g

Consider Disk Group Name you found oracle-dg and volume name oracle.vxresize command will extend requested vxfs by 500GB.

4.How to Check FS Status in Solaris

How to Extend VxFS in Solaris by Reschufling

As mentioned above what exactly we are going to do is that we are going to take space from one volume and going to add to others that,s what reshuffling means here. If you have to take space from other VOL in the same DG you can do below.

1. How to Check FS Status in Solaris

Take backup of current FS usages of source and destination mount points.You can have DG name and volume name.

# df -h /oracle > /var/tmp/df-h.oracle.ddmmyyy

# more /var/tmp/df-h.oracle.ddmmyyy

# df -h /sybase> /var/tmp/df-h.sybase.ddmmyyy

# more /var/tmp/df-h.sybase.ddmmyyy

2. How to Find Free Space in VxVM DG in Solaris

# vxassist -g local_database-dg maxsize

Convert Free Space in Disk Group. For example, if you have 200GB space available in disk group local_database-dg  and you have been requested to extend say oracle volume by 500GB. So you still need 300GB space to accommodate your request. While checking df -h command in step 1 you have the details how much space available in sybase volume so, for example, you will have more than 500GB space is not filled.

So it means you can pull 300GB space to accommodate your request. So first you have to take disk space from sybase volume and make it available in DG.

3. Reduce VxFS in Solaris

vxresize can be used for reducing as well as adding disk space to veritas volumes.

# vxresize -g local_database-dg sybase -300g

4. How to Find Free Space in VxVM DG in Solaris

# vxassist -g local_database-dg maxsize     

Now validate you have required space available in the disk group now.

5.Extend VxFS in Solaris

Then add that space to requested volume using vxresize and extend FS

# vxresize -g local_database-dg oracle +500g

6.How to Check FS Status in Solaris

#df -h /export/opt/oracle

Validate requested FS and let the requester know that FS has been requested by 500GB.

Extend VxFS in Solaris  if DiskGroup have No Space

Note: This scenario may also lead to on the fly extension until unless some issue in disk recognition. So in this scenario, it is always recommended to get requester updated or schedule minimal impacting time for the file system expansion if you are working on any production server.

You can refer steps mentioned above on how to validate if disk group space is available or not. Request new storage of specified size and get it presented to the requested server by the storage team.

The storage team provides disks they called it LUN (Logical Unit Number ) from installed storage units for the organization. It may be either EMC Storage, Hitachi Storage,3Par Storage, HP Storage, IBM Storage or even NetApps Storage.

What is needed to place a new storage request?

You need to submit a request to the storage team and mainly they will ask WWN (World Wide Number ) which is logically 132bit H/W address of HBA card installed in the server. It could be challenging to find WWN sometimes.

Do you need any kind of help regarding this? You can have a look to the below link to see how to get the WWN number.

For easy reference, I am putting the text link below.

How to find HBA Details & WWN Number in RHEL and Solaris

So you requested the storage and storage team have confirmed that storage is allocated as per your request.

1. How to Scan New Disks in Solaris

# devfsadm                                                         

This scans new devices assigned to the server.              OR

# cfgadm –al

This will provide all controller details, you need to find out fc-fabric .You can grep also to have an exact storage controller number like below

# cfgadm –al |grep fc-fabric

You can find controller numbers like c1 c2 c3 like.If you have two controllers you will find 2.

# cfgadm –c configure c1

# cfgadm –c configure c3

2. Label Disk in Solaris 

# format <diskname>

using format utility you can label the disk as it is mandatory in Solaris. Without labeling, you would not be able to access it under vxvm.

Also either you have to create slice as mentioned above or you can use it with veritas./

3. Take New Disk into Veritas Control

# vxdctl enable

vxdctl will initialize the VERITAS daemon which will recognize if any new disk has been presented.

4. Find disk in Veritas

# vxdisk list

The above command will provide all the disk lists which are under the control of VERITAS. Please find out the disk name newly added you can match this with the details provided by the storage team.

They always provide details once disk allocation is completed by the storage team.must have sent the disk details to you or your team when they assigned.

5. Initialize disk in VxVM

# /etc/vx/bin/vxdisksetup –i <DAName>

The disk is initialized in VxVM and creates metadata on disk like private and public regions and to be ready to be used with veritas.

6. File System Status in Solaris

# df –k /export/opt/oracle

You need to have this output handy which will have disk group name and volume name as well which needs to be expanded.

7. Add New Disk to Disk Group in VxVM

# vxvol –g local_database-dg adddisk oradisk07=emcpower01 

Using vxvol command disk is added to disk group under which we have to extend VxFS in Solaris.DiskName must be unique in disk group .

8. Validate available space in DG

# vxassist –g local_database-dg maxsize

We will have how much space is thereafter adding the new disk in MB. Convert it by dividing 1024 to get space in GB.

9. Extend VxFS in Solaris

# vxresize –g local_database-dg oracle +500g

VxFS /export/opt/oracle gets extended by 500 GB.

10. Validate FS Status in Solaris

df –h /export/opt/oracle

That,s it. Update the user about FS expansion completion. So we have summarized all the possible scenarios of Extend VxFS in Solaris .

We will be really glad to know if it is found useful to you whenever you have a chance to go through it and request you to share with your team and friends which might help them as well if sounds OK.

If you are interested in getting more technical points related to your daily routine task, recommend you to join our Facebook group mentioned below.

Click Here to Join our FB group .

If you are interested to know similar activity on Linux. Refer below the text link.

How to extend FS in RHEL .