1834551 Members
3848 Online
110069 Solutions
New Discussion

Removal of file system

 
SOLVED
Go to solution
Bunty...
Occasional Contributor

Removal of file system

hi,
I need to remove some file system,
i have online JFS.
and I need to remove the associated Volume Groups as well.

suppose one file system is :
/dev/vg05/lvol3 51216384 17462710 31644076 36% /oracle/bunty

thanks
bunty
4 REPLIES 4
Chan 007
Honored Contributor

Re: Removal of file system

Bunty,

Unmount all Lvs of that VG.
VGchange -a n /dev/vg05
vgexport vg05

Cheers ...007
Steven E. Protter
Exalted Contributor
Solution

Re: Removal of file system

Shalom Bunty...

umount /oracle/bunty
lvremove /dev/vg05/lvol3

You don't need online JFS for this job, the base OS is fine.

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
A. Clay Stephenson
Acclaimed Contributor

Re: Removal of file system

All you need to do is:

umount /oracle/bunty
vi /etc/fstab and remove the line containing the file system.
rmdir /oracle/bunty

When all of the filesystems have been unmounted.

vgchange -a n /dev/vg05
vgexport /dev/vg05

This will remove all the LVM entries on the
host but it will leave the data intact on the disk(s) should you wish to transfer them to another host.

If you want to wipe out the data for security concerns then before doing the vgchange above, do a vgdisplay -v /dev/vg05 and note the physical disks associated with this VG.

e.g. /dev/dsk/c1t5d0 & /dev/dsk/c2t4d0

As a final step use the CHARACTER devices equivalent to the block devices above;
e.g. /dev/rdsk/c1t5d0 & /dev/rdsk/c2t4d0 as the output of a dd command.

dd if=/dev/zero bs=64k of=/dev/rdsk/c1t5d0

This will write NUL's to every byte on the disk to wipe out data.
If it ain't broke, I can fix that.
Paul Bardeskar
Occasional Advisor

Re: Removal of file system

Hi Bunty,

You can perform the following steps ;
1. # umount /oracle/bunty
(This comman will unmount your File System)

2. # vgchange -a n vg05
3. # vgexport vg05
(These two commands will remove the Volume Group with name vg05)

You have to be carefull if there are any other File Systems associated with VG05 Volume Group.

Cheers,
Paul