Operating System - Tru64 Unix
1748169 Members
4147 Online
108758 Solutions
New Discussion юеВ

Re: new var file system

 
sameerK
Frequent Advisor

new var file system

hi
I have installed tru64 5.1b on es80 server. I took all the defualt setting for the filesystem. /var is created under usr. Now I realized that the space for /var is not enough. I have one more disk which is free. I want to now create var on this new disk and remove from where it is now.I want to create it in advfs
Pls advise how to do it

thnx in advance.
16 REPLIES 16
Ivan Ferreira
Honored Contributor

Re: new var file system

You can do this:

disklabel -rw
mkfdmn /dev/disk/dskNc var_domain
mkfset var_domain var
mount var_domain#var /mnt
cp -Rp /var/* /mnt

Edit /etc/fstab and add:
var_domain#var /var advfs rw 0 0

Reboot the server.

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Rob Leadbeater
Honored Contributor

Re: new var file system

Hi,

A couple of additions to Ivan's suggestion.

If I remember correctly a default installation puts var into a separate fileset of the usr_domain. Therefore you may also have to remove the original reference to /var from /etc/fstab.

You'll probably also need to remove that fileset once you've got /var onto its own domain so.

rmfdmn usr_domain var

Cheers,

Rob
Pieter 't Hart
Honored Contributor

Re: new var file system

I don't think ist's that simple.
You have to locate all the links to /usr/var wich will have to be changed to /var. But it can be done.

It think would be technically easier to mount the new filesystem to /usr/var instead of /var. But it's less obvious for management to mount a filesystem on a second level mountpoint.
- first mount the new filesystem on /mnt
- copy all files in /usr/var to /mnt (the new filesystem)
- edit /etc/fstab to mount it to /usr/var
- reboot the system.

Another option is to simply add the second disk to the advfs-domain (i think it needs advfs utilities license to put multiple disks in a advfs domain).
I'm not sure if you nexplicitly need to "extend" the domain with the extra size.
In this scenario also /usr profits from the extra disk space. And (could be very important) the system does not need to reboot.

Pieter
sameerK
Frequent Advisor

Re: new var file system

Hi I followed th instructions except removing usr_domain/var ( I just modified fstab so that the old /var did not mount & mount var_domain#var to mount on /var).before that I saw some errors while copying from /var to /mnt ( the then mount point).Now the var_domain#var shows mounted with new space.
when I now connect to the server using the xmanager it refuses to open storage management giving some file not found errors in /etc/dt.
I hope the copying has done properly and that I will not have issues while installing oracle. I understand /var is critical for oracle.
pls suggest / advise
Steven Schweda
Honored Contributor

Re: new var file system

> You have to locate all the links to
> /usr/var wich will have to be changed to
> /var.

Huh? If anyone is looking for /var at
/usr/var, then:

ln -s ../var /usr/var

Which is probably what it is already:

urtx# ls -ld /usr/var
lrwxrwxrwx 1 root system 6 Jan 27 2006 /usr/var -> ../var

What's the big deal?

Having /var and /usr in the same AdvFS domain
does not automatically connect the mount
points in any way. Having them in different
AdvFS domains is also pretty harmless, isn't
it?
Steven Schweda
Honored Contributor

Re: new var file system

> [...] I saw some errors while copying from
> /var to /mnt [...]

Copying how? What errors? (How much
guesswork do you want here?)

Personally, if I were doing something to a
directory like /var, which is typically in
use at all times, I'd boot from a CD and do
my copying when no one is using either the
old /var or the new one. And I'd probably
use a "tar" pipeline to do the copying,
unless someone suggested something better.

And then I'd look very carefully at the real
/etc/fstab to make sure that the right /var
would get mounted when I booted off the real
disk.
Rob Leadbeater
Honored Contributor

Re: new var file system

Hi,

Rather than using cp -Rp to copy the files to the new mount point, you could use a pipelined vdump vrestore.

For example:

vdump -0f - /oldvar | vrestore -xf - -D /newvar

Cheers,

Rob
sameerK
Frequent Advisor

Re: new var file system

hi guys thnx for your resposes. I was a bit impatient and since this is the new server and not production server, I thought of reinstalling the operating system and recreate the root file systems of desired sizes. So, I insert the os cd in the cd/dvd drive and boot from it. It started the installation from cd. I select the custom option so that it allows me to customize the file systems. To create root filesystem I am given choice of 2 disks dsk0 & dsk1. I select dsk0 ( however it takes dsk0a by itself which is 512MB).. Here I want to have root as 2GB. How can I change this? Is there any way I can partition the dsk0 with the desired sizes? how? for /var it does give me the partitions to choose from dsk0 but I want to first create appropraite size then choose them. I had been using sysman -->configuration--> diskconfig. I prefer GUI, I am comfirtable with that, but this is after the os is installed and then using xmanager from client pc. But if I have no choice of GUI to do it for dsk0 then pls give steps to do so.

I want to create filesystem as follows:
dsk0 - ( size is 62GB)
/ dsk0a 2GB
/usr dsk0b 10GB
/var dsk0d 10GB

and swap will be on /dsk1c ( whole disk- 62Gb)

Rob Leadbeater
Honored Contributor

Re: new var file system

Hi,

During the installation you can hit a button at some stage to get into a GUI for partitioning disks.

Unfortunately I'm not in front of a system at the moment to give you the exact steps...

Cheers,

Rob