How to expand Veritas File System under Solaris
This is most common kind of request a unix administrator go through regardless of technology advancement and inclusion of cloud technologies.So it is better to know how to increase veritas file system under solaris . Most of the 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 old topic it still have relevance .
Scenario :You have request to increase file system in Solaris where volumes are being managed under veritas volume manager.
Solution :There will be three scenario in this case.Lets see.
A. If requested space already present in disk group which can be used to increase file system immediately.
B. If requested space is available in another volume in same DG which can be used by reshuffling space from one volume to another in same DG and file system can be increased on the fly like scenario 1.
C. If requested amount of storage not present in disk group .
A.How to increase veritas file system under solaris if DG have space 1.First take a backup of requested FS current usages using below command. # df –h /MP > /var/tmp/df-h.ddmmyyyy # more /var/tmp/df-h.ddmmyyyy //MP stands for mount point here. Save current FS status in server at given path.This will also provide related disk group and volume name which you need to increase.// 2.# vxassist –g <DG> maxsize //DG stands for Disk Group, which you will find in step1. This will provide space available in MB.You can convert it to GB by dividing it by 1024 using calculator.// 3. Extend FS with specified request. # vxresize -g <DG> <VOL> +500g //DG and VOL name you will have it from step 1.This will extend your requested file system by 500GB.//
B.How to increase Veritas FS under Solaris by Reschufling If you have to take space from other VOL in same DG you can do below. 1.Take backup of current FS usages of source and destination mount points.You can have DG name and volume name. # df -h /MP1 > /var/tmp/df-h.MP1.ddmmyyy # more /var/tmp/df-h.MP1.ddmmyyy # df -h /MP2 > /var/tmp/df-h.MP2.ddmmyyy # more /var/tmp/df-h.MP2.ddmmyyy 2. Run below command to have all the volume details in DG. # vxprint -vtg <DG> 3.# Run command as below to have how much disk space is available currently. # vxassist -g <DG> maxsize For example if you have 200GB space available in current DG and you still need 300GB from another VOL in same DG. 4. Take out space from other volume in same DG. [Just make sure it have enough space to take.You can get the info from df -h command above.] # vxresize -g <DG> <VOL1> -300g # vxassist -g <DG> maxsize //Validate you have required space available in DG now.// Then add that space to requested vol and expand FS accordingly. # vxresize -g <DG> <VOL2> +500g 5. Take #df -h output from both mount point and validate usages after reshuffling before confirming to user.
C.How to increase veritas file system under Solaris if space is not available in DG 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. Hmm.. Now we have situation that FS expansion requested and you came to know DG does not have enough space. You can refer steps mentioned above how to validate if space is available or not. What next? You need to submit request to your organizations storage team to provide new disk assigned to specified server to fulfill your request. Storage team provide disks they called it LUN (Logical Unit Number ) from installed storage units for organization. It may be either EMC Storage, Hitachi Storage,3Par Storage, HP Storage, IBM Storage or even NetApps Storage. You need to submit request to storage team and mainly they will ask to provide WWN (World Wide Number ) which is logically 132bit H/W address of HBA card installed in server. It could be challenging to find WWN sometimes.Need any kind of help regarding this ?You can have a look to below link to see how to get WWN number. For easy reference i am putting 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. Scan the new devices to Solaris OS. # 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 exact storage controller name .// # cfgadm –c configure <Controller> //scanning assigned disks to OS.You need to follow screen and get it configured.During process it will show newly assigned disk.// //This command you need to run twice as it has been seen there is always two controllers installed keeping the concept of redundancy.// 2. Label the disk in Solaris OS # format <diskname> //using format utility you can label the disk, without labeling you would not be able to access in VERITAS. Also either you have to create slice as mentioned above or you can use it with VERITAS.// 3. Recognize Disk into Veritas by refreshing veritas daemon. # vxdctl enable //This will initialize the VERITAS daemon which will recognize if any new disk has been presented.// 4. Validate disk availability in Veritas # vxdisk list //This will provide all the disk lists which is under control of VERITAS. Please find out diskname newly added you can match this with the details provided by storage team. They must have sent disk details to you or your team when they assigned.// 5. Initialize the disk in Veritas # vxdisksetup –i <DAName> //This will initialize the disk and write veritas VTOC/metadata on disk like private and public regions etc.// 6. Take Current Status of FS needs to be extended. # df –k /MP //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 on which you need to extend FS. # vxvol –g <DG> adddisk DiskName=DAName //This will add disk to needed diskgroup.DiskName must be unique in diskgroup .// 8. Validate available space in DG # vxassist –g <DG> maxsize //This will display how much space is there after adding the new disk in MB.Convert it by dividing 1024 to get space in GB.// 9. Extend FS # vxresize –g <DG> <VOL> +XXXg //This will extend the FS with required additional space added.// 10. Validate FS status after extension. # df –h /MP
That,s it.So we have summarize all the possible scenario how to increase veritas file system under solaris.
We will be really glad to know if it is found useful to you when ever you have 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.