How to Remove Veritas File Systems and Reclaim Storage Process

RSY Digital World Logo

How to Remove Veritas File Systems and Reclaim Storage

File System expansion and reduction and removal is kind of routine task for system administrators. So let’s see entire process how to remove veritas file systems and reclaim storage.


There are many scenarios when you need to remove existing veritas file system to reclaim storage to save cost. For instance database refresh team requested additional storage and once their work completed they want to get file system removed and storage released. May be other  scenario like server is running many database and one of them is getting decommissioned from server while other is keep running or any other scenario.


First of all I would like to divide this exercise spanned to two week. First week we target to remove the file system and find out the device name which is going to be removed. Once have device name then submit the request for storage team to reclaim the required devices. Device tree can be cleaned but it is recommended to reboot the server after taking downtime after the reclaim is done to make sure all stale devices gets cleaned up.

This is not mandatory but it is advised to have healthy system or to avoid any malfunctioning of stale devices which may contribute to performance issues or having healthy system to work smoothly during business duration.

As a standard procedure of system administrator save some configuration before change like below. You can save other outputs if you think any other output. Below is enough as per my understanding for this kind of work. Consideration here is you must have request related to work and data has been already removed from file system and you have go ahead to work on this request.

If server belongs to PRODUCTION it is advised to do this work during off business hour. All this depends upon your organization work culture, follow your environment procedure.

Before Work Backup

# df –h > /var/tmp/df-h.before
# cp –p /etc/fstab /etc/fstab.$date                                        >>> for RHEL
# cp –p /etc/vfstab /etc/vfstab.$date                                     >>> for Solaris
# vxdisk list > /var/tmp/vxdisklist.$date
# vxdg list > /var/tmp/vxdglist.$date
# vxdisk –eo alldgs list > /var/tmp/vxdisk-alldgslist.$date
# vxprint –hrtg <DG> > /var/tmp/vxprint-hrtg.$date

So let’s start actual process how to remove veritas file systems and reclaim storage.


1.(a) First take the status of file system status using df command as below which will also provide disk group name and volume name.
# df -h /u001
1.(b) Please check volume status using vxprint command like below.
# vxprint -ht | grep u001
1.(c) Run fuser command to see no one using this file system. We need no one using file system otherwise it will show volume in use and not allowing to stop the volume.
# fuser -u /u001
1.(d) In case of any one using it can be killed as well. But make sure if any root pid is using file system do not kill the process if you are doing it online else it will place system in funky state in worse case system may crash as well. So be careful.
# fuser –uc /u001
2.Unmount the file system
# umount /u001
3.Stop the volume
# vxvol –g <DG> stop <VOL=u001>
4.Remove the volume from Disk Group
# vxedit -g <DG> -rf rm u001
5.Validate volume removal.It should not show this volume in vxprint.
# vxprint -ht | grep u001
6. Update File System Table and Remove Mount Point

Remove the file system entry in fstab or vfstab based on RHEL or Solaris. Remove mount point as well.
7.Identify the disk needs to be released or reclaimed.

# vxdg –g <DG> free
This will show the entire disk configuration in disk group with details of free block. Match OFFSET carefully to avoid any data corruption.
You can use vxdisk list <DISKNAME> to cross check lengh of disk and compare that with above output. Sample output is like below.

# vxdg -g oracledg free
GROUP           DISK                DEVICE           TAG                 OFFSET    LENGTH    FLAGS 
oracledg          disk01              sda                                          10246400        1536      – 
oracledg          disk02              sdk                                          10246400        1536      –
8.Remove Disk from Disk Group

# vxdg -g <DG> rmdisk <DANAME>
9.Validate Disk Removal
# vxdisk  list |grep <DG> 
Disk will not show in above output if it is removed .Even you can validate using vxdisk list and see the particular disk it will not show associated
with any disk group.disk format cdsdisk shows that disk is initialized.You can uninitialized before reclaim.

Sample disk configuration
c4t9d0s2     auto:cdsdisk    –            (oracledg)     online
c4t10d0s2    auto:cdsdisk    –            (oracledg)     online
10. Run vxdiskunsetup to uninitialized the disk.
# vxdiskunsetup -C c4t9d0 c4t10d0
11. Notedown disk details and submit request to storage team to reclaim disk :Provide disk details using tools or request system in your
organization .
Take down time for server reboot after disk reclaimed preferably during off business hour or weekend as per your organization

12: Get Apps/DB down for server reboot
Once storage team confirms reclaim, get DB/Apps shutdown and reboot the server. Perform health check and release to Apps/DB to start and

validate DB and application.

This is the entire process how to remove veritas file system and reclaim storage.I hope you will find this helpful. If you like it request you to show your favor and like and share this with needed people so that they can be also benefited with this process.

If you are interested in other file system related how toos to familiarize yourself .You can use below given links.

How to create File System in LINUX
How to expand File System in LINUX
How to create Veritas File System in Solaris
How to expand Root File System in Solaris LDOM
How to expand Veritas File System in Solaris

Newsletter Signup Form

Leave a Reply

Your email address will not be published. Required fields are marked *