Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Sep 2002 10:52:17 -0400 (EDT)
From:      Jerry McAllister <jerrymc@clunix.cl.msu.edu>
To:        jpb@sixshooter.v6.thrupoint.net (Jim Brown)
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: creating extra partition on existing system
Message-ID:  <200209041452.g84EqHV24589@clunix.cl.msu.edu>
In-Reply-To: <20020902154243.GB93281@sixshooter.v6.thrupoint.net> from "Jim Brown" at Sep 02, 2002 11:42:43 AM

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> * Jimmy Lantz <jimmy.lantz@lusidor.com> [2002-09-02 05:49]:
> > Hi,
> > 
> > I have a filesystem where I would like to create /www and use like 1 GB 
> > from the /usr .
> > how would I accomplish this without using fdisk and reinstall the system?
> > Tia
> > Jim.
> > 
> > 
> > 
> > Filesystem  1K-blocks    Used   Avail Capacity  Mounted on
> > /dev/ad0s1a    128990   34162   84510    29%    /
> > /dev/ad0s1f    257998      20  237340     0%    /tmp
> > /dev/ad0s1g   7103768 1430424 5105044    22%    /usr
> > /dev/ad0s1e    257998     390  236970     0%    /var
> > procfs              4       4       0   100%    /proc
> > 
> > /dev/ad0s1b             none            swap    sw              0       0
> > /dev/ad0s1a             /               ufs     rw              1       1
> > /dev/ad0s1f             /tmp            ufs     rw              2       2
> > /dev/ad0s1g             /usr            ufs     rw              2       2
> > /dev/ad0s1e             /var            ufs     rw              2       2
> > /dev/acd0c              /cdrom          cd9660  ro,noauto       0       0
> > /dev/acd1c              /cdrom1         cd9660  ro,noauto       0       0
> > proc                    /proc           procfs  rw              0       0
> > 
> 
> 
> All roads out of your situation involve pain.  The least pain is acquiring
> another disk and throwing it in.

You probably don't really need a separate partition/file system for it.
Why bother chopping up /usr and creating another file system?

If you plan to get your disk space from that /usr partition anyway, just 
create a directory in /usr - say  'usr.www' and create a link called 'www' 
in root that points to it. eg 
                              cd /usr
                              mkdir usr.www
                              cd /
                              ln -s /usr/usr.www www

The only danger is that you might get overzealous and put more than
the 2 GB  of stuff in their because you have 5 GB still available in
the /usr file system.   That is lots of space.   For the purists, they
might complain that the soft link adds some inefficiency, but you would
have to have an awful heavy demand on that directory for it to mean 
anything.  Outside of a slight improvement in efficiency, having a
separate file system could make backups slightly easier, but is it
worth the hassle of redesigning your disk system?

Of course, a whole nuther disk would geive you even more room
to roam, but given your original request, you already have lots
more room than you are looking for.

////jerry

> 
> If that is not possbile for whatever reason, you can try the following 
> after producing a recovery disk (or bootable CD):
> 
>    archive the /usr filesystem using dump onto tape or CD.  
>    (dump supports flags. Not all archive programs support flags.)
>    Reboot onto the recover disk, ensuring that /dev/ad0s1g does not
>    get mounted.  Delete the slice and rework for smaller size.
>    Add other slice.  Update /etc/fstab with new entries.  Reboot.
>    Use restore to restore your files onto smaller /usr partition.
> 
> See, I told you the least pain is just slapping on another disk :-).
> 
> HTH,
> jpb
> ===
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 


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?200209041452.g84EqHV24589>