Operating System - Tru64 Unix
1824976 Members
3848 Online
109678 Solutions
New Discussion юеВ

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
sameerK
Frequent Advisor

Re: new var file system

Hi Rob
Can you pls remember the key & and what stage ? does the installation display this information?
Rob Leadbeater
Honored Contributor

Re: new var file system

Hi,

It's somewhere on the same screen where you choose the disks to install on...

What you can also do, is to shell out from the install process and get to a command line. You should then be able to launch disk config from there, or use the command line disklabel.

Cheers,

Rob
sameerK
Frequent Advisor

Re: new var file system

Rob
I am using telnet ( thru NAT box) ES80 server.Can you pls give steps when using diskconfig or disklabel. will diskconfig require some display settings to be done to get gui?
Pieter 't Hart
Honored Contributor

Re: new var file system

if you use the gui-install, where you assign partitions to filesystems there is a "edit partitions" button. wich lead you to the disconfig program.

If you youse a ascii-installation you must boot fromj cd, abort the installation script (ctrl-c) and use "disklabel" to change the partitions sizes. (beware it's "ed" not vi or emacs as editor).

Pieter
sameerK
Frequent Advisor

Re: new var file system

how to start gui-install ?
pls can you post commands on disklabel.
Pieter 't Hart
Honored Contributor

Re: new var file system

if you connect the local graphics console with the environment variable "console" set to "graphics" the gui is automatically started when you boot from cd.
but in your recent post i've read you use a telnet session so you won't be able to start the gui.
Rob Leadbeater
Honored Contributor

Re: new var file system

To create a standard disklabel on dsk0.

# disklabel -rw dsk0

You'll want to edit this so, assuming you're familiar with vi.

# EDITOR=vi;export EDITOR
# TERM=vt100;export TERM
# disklabel -e dsk0

Modify the starting and ending values as you need to. Note the values are in 512 byte blocks. So to create your 'a' partition as 2GB you'd need a size of 4194304.

Quit out of vi when you're happy and the disklabel will be written. Check it with

# disklabel -r dsk0

Hope this helps,

Regards,

Rob