1834599 Members
3970 Online
110069 Solutions
New Discussion

vxvol

 
SOLVED
Go to solution
navin
Super Advisor

vxvol

Hello All,
I have a question .I have a system has 2 disks.First disk has 6 file systems vxfs on vxvm. And it is mirrored to second disk.
Now i have to reduce the file system to 5 from 6.that means i would like to create /opt
on / and get rid of optvol - so that it will free up some space thati can use to extend another filesystem in the same vg00.
How do i do this .I thought like below.

1) Create /opt on /
2) Restore /opt data from tape on new created /opt on /
3) use vea to unmount /opt and remove volume
4) bdf to see the space free'ed up
5) use vxresize to entend the volume that needed more space.

Please let me know if i miss anything. Since the opt vol is mirrored - do i need to take any other special steps.please help
Thanks Much
Learning ...
8 REPLIES 8
Robert-Jan Goossens
Honored Contributor
Solution

Re: vxvol

Hi Navin,

Removing /opt online will be not as easy, there will be proccesses running on the /opt filesystem. You can check it with the fuser or lsof command.

# fuser -c /opt

If a reboot is possible, you could copy the opt filesystem to a temp directory in the root(if you have enough space) filesystem.

Stop all applications running on the /opt filesystem or kill the processes.

# mkdir /opt2
# cd /opt
# find . | cpio -pcmudv /opt2
# umount /opt
edit the /etc/fstab and remove /opt
# rm -r /opt
# mv /opt2 /opt
# vxvol -g rootdg stop optvol
# vxedit -g rootdg -r rm optvol
Reboot or start the applications you have stopped.

You can add the space from the optvol to an other filesystem.

Hope this helps,
Robert-Jan
navin
Super Advisor

Re: vxvol

Thanks for the above procedure. I'm going to do this on a firest disk on the system.It is mirrored to second disk . Do i need to break the mirror before doing the above procedure?
pls advice
Learning ...
Torsten.
Acclaimed Contributor

Re: vxvol

I really doubt if you have enough space in / for all data from /opt.

At least on my system I have a total of 200MB for / - but 3GB in /opt.

Run bdf and check.

Anyway, the idea is not the best IMHO.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
navin
Super Advisor

Re: vxvol

I do have plenty of space in / .
Other than space - why is it not good idea?
pls advice
Thanks
Learning ...
Torsten.
Acclaimed Contributor

Re: vxvol

May we see your "bdf"?

Keep the system clean!

/ is normally static - more or less.

If you put other than the desired data in this volume, there is a good chance to fill it up to 100%. In this case you will have a nice problem ...

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
James R. Ferguson
Acclaimed Contributor

Re: vxvol

Hi Navin:

The separation of the root filesystem into separate mount points for '/opt', '/var', '/usr', etc. is designed to aid preventing any one directory from growing without bound, eventually filling your boot volume and crashing your system.

Instead of eliminating the '/opt' mountpoint and subsuming it under '/', I'd simply 'fsadm' its size downward and 'lvreduce' or 'vxassist' the associate logical volume to match. Everything can remain mirrored while you do this.

Regards!

...JRF...
navin
Super Advisor

Re: vxvol

James ,Thanks much - will u be little more specific - i think this should help me in resolving.
Also ..if i purchase on line jfs can i shrink my / filesystem online (vxfs+vxvm ) .
pls advice
Learning ...
Robert-Jan Goossens
Honored Contributor

Re: vxvol

Hi Navin,

--
Do i need to break the mirror before doing the above procedure?
--
You will not loose any data, in the above procedure you are moving data. I would create a good backup(make_tape_recovery) before you start this procedure.

James has a good point in keeping /var /usr /opt as seperate filesystems for housekeeping purposes. You could start with reducing the size of optvol and in in need remove the optvol and move the optvol data to / root filesystem.

Regards,
Robert-Jan