Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Feb 2000 18:07:43 -0800 (PST)
From:      Bhishan Hemrajani <bhishan@cytosine.dhs.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Re-size swap and /var
Message-ID:  <200002260207.SAA07865@cytosine.dhs.org>

next in thread | raw e-mail | index | archive | help
Here is an output of df:
Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
/dev/wd0s1a     63503    21068    37355    36%    /
/dev/wd0s1e   1478039  1042985   316811    77%    /usr
/dev/wd1s1e    416961     7906   375699     2%    /var
mfs:32          95263        6    87636     0%    /tmp
procfs              4        4        0   100%    /proc

Yes, my swap and var are on the same drive.
This is my /etc/fstab file:
 Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/wd1s1b             none            swap    sw              0       0
/dev/wd0s1a             /               ufs     rw              1       1
/dev/wd0s1e             /usr            ufs     rw,userquota    2       2
/dev/wd1s1e             /var            ufs     rw,userquota    2       2
/dev/wd1s1b             /tmp            mfs     rw              0       0
proc                    /proc           procfs  rw              0       0

So do I just follow your instructions and it will work?

I have two IDE hard drives in my machine. One is 1.5gb and that is used
for /usr and /. As far as I know the other drive is 500mb and is used
for swap and /var. Is what I said right?


--bhishan

Previous message:
If var and swap are next to each other on the disk then your job is
simple. That assumes you have enough free space to store what's on /var
while you re-size things. Maybe you have room on / or /usr? Maybe you
don't need a separate /var at all? Output from the df command would help.

Roughly:
--------
Stop things from screwing with /var
  shutdown now (to single user)
Store /var contents somewhere, maybe with:
  cd /var;tar -cvf /<placewithspace>/var.tar *
Redo your disk partitions, maybe via /stand/sysinstall.
  cd /;umount /var
  /stand/sysinstall->Index->Partition... etc. (be sure /var gets a newfs)
Modify /etc/fstab as needed. (Does /var need a different device?)
Re-mount stuff.
  mount -a
Restore stuff
  cd /var;tar -xpvf /<placeyouused>/var.tar
Reboot
  reboot

If /var and swap aren't next to each other or you don't have a
<placewithspace> then things could quickly get more complex. Can't be more
specific without knowing your disk layout and usage. That's where the df
output comes in.

Say, I'll bet there's great stuff on this in The Complete FreeBSD. 
ISBN 1-57176-246-9 :)

Dave

On Fri, 25 Feb 2000, Bhishan Hemrajani wrote:

> I currently have /var set to 404mb.. but that
> seems to much.
> 
> I only have 96m on swap. I was wondering if there
> was anyway to change swap to 256m and have the
> rest put back to /var.
> 
> I'm not sure how to do this at all. I am also
> not that good at Unix yet, so if you could go
> step by step I would really appreciate it.
> 
> --bhishan




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200002260207.SAA07865>