1748136 Members
3863 Online
108758 Solutions
New Discussion юеВ

Re: removing mount point

 
denise_7
Frequent Advisor

removing mount point

I have a question on removing a mount point under vg00. I believe the 11.0 server has Online JFS and was wondering if OnlineJFS can be used to remove the mount point? This mount point will no longer be needed. Can this be done on the fly? I am asking because I see some threads where SAs were having problems with reducing a filesystem. Can removing a mountpoint be done on the fly without bringing the server into single user mode, even if the mountpoint is in the vg00 group?

Much appreciative for your inputs.
Thanks.
8 REPLIES 8
Sundar_7
Honored Contributor

Re: removing mount point

Do you mean the filesystem mounted or just the directory you are using to mount the filesystem ?

bottomline is, you cannot unmount a filesystem if process(es) has open files in the filesystem.

If you have a filesystem mounted in the "mountpoint",execute fuser command figure out the processes using the filesystem

# fuser -cu /mountpoint | xargs -n1 ps -fp

If you dont see process listing from the above command then you can execute umount command unmount the filesystem

If you do see processes using the filesystem, then you need to kill those processes.
Learn What to do ,How to do and more importantly When to do ?
Sanjay_6
Honored Contributor

Re: removing mount point

Hi,

Removing a mount point is quivalent to removing / deleting a filesystem. you can do this on the fly as long as the filesystem / mount point is not in use. for eg the mount point is /opt/mount_dir

to remove this,

bdf /opt/mount_dir
/dev/vg00/lmount_dir /opt/mount_dir ....

fuser -cu /opt/mount_dir

if no process is listed as using /opt/mount_dir, you can unmount the filesystem and use lvremove to remove it. If there are processes listed as using /opt/mount_dir, you can kill all of them if you are sure you are not going to harm the system.

fuser -ck /opt/mount_dir

Do man fuser for more info on the command.

Hope this helps.

Regds
Sridhar Bhaskarla
Honored Contributor

Re: removing mount point

Hi Denise,

Which mount point are you trying to remove?.

If it is not a OS filesystem like /stand,/usr, /var,/opt etc., you can stop the processes accessing that filesystem and then unmount it. Say if /dev/vg00/lvol15 is mounted on /apps1 and if you no longer use apps1, then do

#fuser -ku /dev/vg00/lvol15
#umount /apps1
#lvremove /dev/vg00/lvol15
#rm -rf /apps1

Make sure you don't do it for any of the OS related filesystems.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
denise_7
Frequent Advisor

Re: removing mount point

I am mixing up something. Actually, this is a 11.0 server with OnlineJFS. What I need to do is increase a mount point. This mount point is part of vg00, but it is at /usr/uni (unicenter).

My take on this is, I can increase this on the fly using OnlineJFS, and the server does not have to be brought down in single user mode.

Forget about removing a file system, I understand how to do this.

Sorry for the confusion, gents.

Thanks.
Sundar_7
Honored Contributor

Re: removing mount point

To increase the filesystem size, you dont have bring down the system to single-user mode as long as you have OnlineJFS.

# cd /usr/uni
# bdf .



# lvextend -L /dev/vg00/

# fsadm -F vxfs -b b /usr/uni

Note the "b" suffix to the size of the LV in the fsadm command.
Learn What to do ,How to do and more importantly When to do ?
Sridhar Bhaskarla
Honored Contributor

Re: removing mount point

Hi,

Yes. If you have OnlineJFS, you can easily increase the mount point's size (provided it is not 100%) online. The commands are

#lvextend -L 2000 /dev/vg00/lvolx
#fsadm -b 2000m /usr/uni

2000 is for example. It's the total size of the filesystem after you increased it. If it is at 1000 MB and if you are going to increase it by another 1000 MB, then it will be "-L 2000".

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Seth Parker
Trusted Contributor

Re: removing mount point

Denise,

I've got what may be a dumb question for you. Even though the filesystem mounted at /usr is in VG00, is the filesystem mounted at /usr/uni actually part of VG00? I ask because it doesn't have to be. It's not the mountpoint that makes it part of VG00, it's the logical volume that the fileystem resides on that's part of VG00.

Check the output of "bdf" and see if it really is part of VG00 or not. If it's not, you can stop all the processes using that filesystem and increase the logical volume and filesystem while the system is up even if you don't have Online JFS.

Regards,
Seth
sumakuma2011
Occasional Advisor

Re: removing mount point

Hi,

 

  Please follow the below steps to remove the mount point and release the storage space

umont the mountpoint
#umount <mount point name>

 

Comment the mount point in fstab file
#vi /etc/fstab

 

Removing the logical volume
#lvremove /dev/datavg17/lvdata17

 

Deactivate the volume group
#vgchange -a n datavg17 //if this is not added on cluster
OR
#vgchange -c n datavg17 //if this added via cluster

 

export the volume group
#vgexport datavg17

 

If there is requirement to remove VG then
#vgreduce -f /dev/vg09 /dev/dsk/c1t0d7s6

 

 

Sumant