1848625 Members
5091 Online
104033 Solutions
New Discussion

Vg00

 
SOLVED
Go to solution
Shondra Eppinger
Occasional Advisor

Vg00

I want to move /opt, which is part of vg00 to another drive. Does any one have any help files that can walk me throught this operation. I think I have a good idea but my down time must be kept to a minium so I don't want any mistakes or guess work.

R-
4 REPLIES 4
Alan Riggs
Honored Contributor
Solution

Re: Vg00

/opt should be static, so you can almost certainly do the data transfer without interrupting processing. Create the filesystem on your new disk. Mount it as /newopt:

cd /opt
find . -depth -print | cpio -pvdumx /newopt

After the data transfer is done (omit the "v" flag for speed, include it to check the path(s) if speed is not a worry):

Stop all apps running under /opt.
umount /opt
umount /newopt
mount /opt
Sridhar Bhaskarla
Honored Contributor

Re: Vg00

You can move /opt from vg00 to any other volume group. You can do it while the system is up and running provided you can be able to successfully bring down all the processes that start from /opt.

For ex., measureware, diagnostics, predictive etc., If you installed any other softwares that reside under /opt, you have to bring them down too.

You can use fuser command to see what processes are attached to /opt and then bring them down if "you can".

Otherwise, boot the system in single user mode and then move /opt.

The best way is to create another file system in a different volume group, mount it as /nopt and copy the data from /opt to /nopt. Unmount /nopt and /opt.
Edit /etc/fstab and replace the entry that mounts /opt with this new logical volume. Then do a mount -a to get the new lvol mounted on /opt. Start all the processes that you stopped. Or if you did this maintenance in single user mode, bring the system to multiuser mode.


-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Thierry Poels_1
Honored Contributor

Re: Vg00

Hi,

if you're going to move /opt to another disk in VG00, then "pvmove" is your solution. Can be done online.

If your going to move to another volume group:
- shutdown to single user (as /opt is very probable in use by applications)
- create new lvol in other VG
- mount it on a temporary mountpoint
- cd /opt ; find . -xdev | cpio -pudlmv /tmpopt
- umount /opt
- edit /etc/fstab : /opt should refer to new lvol
- mount /opt
- if everything is OK, old lvol can be dropped
- reboot or init 3


good luck,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Uday_S_Ankolekar
Honored Contributor

Re: Vg00


Hi,
Create a new /opt on some other disk, copy all the files over to it from your root disk, unmount the new /opt, unmount the original /opt, and then permanently mount the new /opt. Also edit the /etc/fstab accordingly so next time whne system boots the new opt will pount.

If you find that some process has one or more files locked on the old /opt, then the fuser command can be used to track them down to be killed (fuser -k )

Goodluck.
-USA..
Good Luck..