Operating System - HP-UX
1833873 Members
2130 Online
110063 Solutions
New Discussion

Re: Remove Multiple Filesystems

 
joe_91
Super Advisor

Remove Multiple Filesystems

I have a task to remove multiple filesystems. wondering what would be the easiets way to do it. the following are the filesystems and lvol

/oracle/MAS /dev/vgmas/home
/oracle/MAS/psoftdata /dev/vgmas/psoft
/oracle/MAS/data9 /dev/vgmas/masdata9
/oracle/MAS/data8 /dev/vgmas/masdata8
/oracle/MAS/data7 /dev/vgmas/masdata7
/oracle/MAS/data6 /dev/vgmas/masdata6
/oracle/MAS/data5 /dev/vgmas/masdata5
/oracle/MAS/data4 /dev/vgmas/masdata4
/oracle/MAS/data3 /dev/vgmas/masdata3
/oracle/MAS/data2 /dev/vgmas/masdata2
/oracle/MAS/data12 /dev/vgmas/masdata12
/oracle/MAS/data11 /dev/vgmas/masdata11
/oracle/MAS/data10 /dev/vgmas/masdata10
/oracle/MAS/data1 /dev/vgmas/masdata1

THanks


Joe
5 REPLIES 5
nanan
Trusted Contributor

Re: Remove Multiple Filesystems

Hi jeo

Just umount -a after stop application may be oracle

and vgexport /dev/vgmas

that's it

Regards
nanan
Steven E. Protter
Exalted Contributor

Re: Remove Multiple Filesystems

Shalom Joe,

Shut down oracle

umount the filesystems.

lvremove /oracle/MAS

etc...

Done.

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
IT_2007
Honored Contributor

Re: Remove Multiple Filesystems

You can do it them by writing a simple script.

for i in `cat files.txt`
do
echo "removing file system $i "
lvremove $i
done

put all logical volume information in files.txt file. also you need to unmount them before you kick off script.
DCE
Honored Contributor

Re: Remove Multiple Filesystems



Joe,

The vgexport will only work correctly if the lvols you want to remove are the ONLY ones on the vg, otherwise you will be taking some data offline that you want left online

also vgexport does not remove the structures, a vgimport will restore the data.

lvremove is the better way to remove only the lv's you want.


joe_91
Super Advisor

Re: Remove Multiple Filesystems

SEP:

I think you meant /dev/vgmas/home. /oracle/MAS is the mount point.

Best Regards

Joe