1834218 Members
3310 Online
110066 Solutions
New Discussion

filesystem for vg00

 
SOLVED
Go to solution
hpuxhelp
Regular Advisor

filesystem for vg00

if we placed the /tmp /usr /home in different volume group will this create problems when we try to mirror vg00 ??? Is this a proper way of configure vg00?

9 REPLIES 9
Sridhar Bhaskarla
Honored Contributor
Solution

Re: filesystem for vg00

Hi,

Technically you can have any file system otherthan /, /stand and primaryswap on another volumegroup. However, I like to keep everything on the same disk just for maintenance simplicity. If at all you want to move, then consider moving /home,/opt,/tmp,/usr/,/var in that order.

You should have no problems with mirroring except that you have to do it selectively. During single user mode sessions, it will be painful if you can't get your /usr mounted for any reason.

It's just a maintenance thing.

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

Re: filesystem for vg00

HOw can I move /home /tmp /opt
to vg00 ?
1. add another disk into vg00
2. create new logical volume
for /home /tmp /opt?
3. and mount them?

Michael Tully
Honored Contributor

Re: filesystem for vg00

As explained, '/', '/stand' and primary swap must be in /dev/vg00.

But in saying that I can see many instances where placing anything else onto different physical disks being a pain if they are on extenal disks. If you run into a maintenance problem it would be better to have everything in the one place.
It is not something I would do, but no, you wouldn't have any problems mirroring.

Where possible have all of the recommended logical volumes for the OS in /dev/vg00

/
primary
/stand
/usr
/tmp
/opt
/var

You can get away with having /home anywhere. We have /home on /dev/vg00 on production systems, but on other volume groups on dev servers, due to space hogging by developers.
Anyone for a Mutiny ?
hpuxhelp
Regular Advisor

Re: filesystem for vg00

what kind of data does /opt store? I did a fuser on /tmp and /home to kill the process and able to unmount /tmp and /home. but don't know much about /opt
Sridhar Bhaskarla
Honored Contributor

Re: filesystem for vg00

Your second question is slightly confusing. Are you moving these lvols from one disk to another disk in the same volume group (vg00?).

If that is the case, you can add another disk to vg00.

#pvcreate /dev/rdsk/c1t0d2
#vgextend vg00 /dev/dsk/c1t0d2
#pvmove /dev/vg00/lvol4 /dev/dsk/c1t0d2

(say lvol4 is mounted as /opt)
Repeat the same for other logical volumes you mentioned.

If you have another disk (c2t0d2) in vg00, then you use lvextend command to mirror each logical volume onto the disk

#lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c2t0d2

Repeat for other lvols.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: filesystem for vg00

Steven,

/opt stores additional softwares. Some of the daemons like rpcd, ifor, perfview daemons start from there. /tmp holds temporary files. /home is for user data. Do not ever use fuser to kill processes on /tmp and /opt. Take permission from your users to unmount /home. If you want to unmount /opt, you need to go into single user mode.

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

Re: filesystem for vg00

thanks for the advice,
currently I have two vg..
vg00 has / /stand /var /usr
vg01 has /home /opt /tmp

i want to have /home /opt /tmp
on the same vg as vg00... how can accomplish this goal?
Michael Tully
Honored Contributor

Re: filesystem for vg00

You can as long as you have enough diskspace this can be done, but you'll need to do a reboot at some stage, as filesystems like /usr and /tmp cannot easily be unmounted.

Create each logical volume the same size as the one on the other volume group using lvcreate/lvextend
e.g.
Just before rebooting:

# lvcreate -n usr /dev/vg00
# lvextend -L 512 /dev/vg00/usr
# mkdir /newusr
# newfs -F vxfs /dev/vg00/rusr
# mount /dev/vg00/usr /newusr
# cd /usr
# find . -xdev | cpio -pdumv /newusr

repeat the function for each logical volume

Change the /etc/fstab to resemble the new logical volumes.
Anyone for a Mutiny ?
Sridhar Bhaskarla
Honored Contributor

Re: filesystem for vg00

Hi Steven,

You should be alright with /home, /opt and /tmp on vg01. Unless you have one big disk in vg00 that can hold all lvols on it, you do not need to do it.

If you insist, follow Michael's instructions.

If you are adding two extra disks (one primary and the other as mirror), you may want to selectively extend the lvols to primary (c0t0d1) and alternate disks (c1t0d1).

..
#lvextend -L 512 /dev/vg00/usr /dev/dsk/c0t0d1
#lvextend -m 1 /dev/vg00/usr /dev/dsk/c1t0d1
#mkdir /newusr
...

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