Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Feb 2000 00:20:02 -0800 (PST)
From:      wellsian <wellsian@caffeine.com>
To:        Bhishan Hemrajani <bhishan@cytosine.dhs.org>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Re-size swap and /var
Message-ID:  <Pine.BSF.4.21.0002252206510.26356-100000@boris.netgate.net>
In-Reply-To: <200002260207.SAA07865@cytosine.dhs.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 25 Feb 2000, Bhishan Hemrajani wrote:

> 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?

Well, sort of. But this is where it starts getting scary to answer.
The more specific I get, and the less you know, the easier it is for 
you to blow something away and then it's my fault. Make printouts of your
disk layouts and fstab before starting.

Anyway, it looks like /dev/wd1s1b and /dev/wd1s1e are adjacent, and the
amount currently on /var is minimal, which means you _should_ be able to
do what I said earlier, backing up to /usr/var.tar. I'm not sure if
freebsd is okay with you taking away swap after dropping into single user
mode. I've done that plenty of times with other 'nixs but not freebsd, and
I'd hate to see something die while you're in the middle. You may have to
reboot to single user in that step before repartitioning with
/stand/sysinstall->index->disklabel. That would make it something like:

shutdown now
cd /var && tar -cvf /usr/var.tar *
ls -l /usr/var.tar
(confirm it's about 8MB)
reboot
(at the countdown, hit a key and type "boot -s" at the prompt)
mount
(confirm only / is mounted)
/stand/sysinstall->Index->label->wd1
(remove wd1s1b and wd1s1e and recreate with new sizes, in the same
order, making sure to enable newfs for the new /var)
mount -a
(did it work? you should now have filesystems back online. If so...)
cd /var && tar -xpvf /usr/var.tar
(did it work? var should be restored.)
reboot - you're done

You're going to have to be daring and try it or wait for someone else to
scream that I've forgotten something important. Hope not. In any case, the
less you're comfortable here the more you should want to back things up
first. Unwanted clean reinstalls are educational but rarely fun.

Dave



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?Pine.BSF.4.21.0002252206510.26356-100000>