Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Feb 2013 19:10:24 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Paul Schmehl <pauls@utdallas.edu>
Cc:        FreeBSD Questions List <freebsd-questions@freebsd.org>
Subject:   Re: How to add unused space to an existing install
Message-ID:  <20130206191024.e556d840.freebsd@edvax.de>
In-Reply-To: <47D0E9AD1EEAC6058A534838@utd71538.campus.ad.utdallas.edu>
References:  <47D0E9AD1EEAC6058A534838@utd71538.campus.ad.utdallas.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 06 Feb 2013 11:58:56 -0600, Paul Schmehl wrote:
> When I try to create a new slice using fdisk, it doesn't seem to work.  If 
> I move to the label editor, I get this:
> 
>  FreeBSD Disklabel Editor
> 
> Disk: mfid0     Partition name: mfid0s1 Free: 0 blocks (0MB)
> 
> Part      Mount          Size Newfs   Part      Mount          Size Newfs
> ----      -----          ---- -----   ----      -----          ---- -----
> mfid0s1a  <none>       2000MB *
> mfid0s1d  <none>      65536MB *
> mfid0s1e  <none>       4096MB *
> mfid0s1b  swap        65536MB SWAP
> mfid0s1f  <none>      10240MB *
> mfid0s1g  <none>        601GB *
> 
> As you can see mfid0s1g is 601GB, and according to fstab that's /var.
> 
> Yet df -h shows:
> 
> # df -h
> Filesystem       Size    Used   Avail Capacity  Mounted on
> /dev/mfid0s1a    1.9G    726M    1.0G    41%    /
> devfs            1.0k    1.0k      0B   100%    /dev
> /dev/mfid0s1e    3.9G     38M    3.5G     1%    /home
> /dev/mfid0s1d     62G    6.6M     57G     0%    /tmp
> /dev/mfid0s1f    9.7G    7.5G    1.4G    84%    /usr
> /dev/mfid0s1g    582G     39G    496G     7%    /var
> 
> So apparently I'm not creating this new slice?  It should be /dev/mfid0s1h, 
> correct?

If you're creating a new slice, that would be mfid0s2, because
mfid0s1 is the 1st slice ("DOS primary partition") carrying the
partitions a, swap, d, e, f, g. If I remember correctly, h is
the last partition letter that can be assigned, so this one
should be available.

Problem: The 1st slice mfid0s1 is already of fixed size, so
you cannot add a new partition here without growint that
slice first. Attention, that step isn't free of danger and
should be done with a backup at hand, just in case, and
because you _always_ need a backup. :-)

This problem is not a problem if you create a 2nd slice
mfid0s2 to use it separately.

If you can _really_ create mfid0s2 as a slice, you only need
to format it, e. g. "newfs -U /dev/mfid0s2" which creates
mfid0s2c which in turn is called mfid0s2). You can then assign
that new partition (the one covering the whole slice) to
a new mountpoint, e. g. /data, /stuff or whatever you want.
There are also means to "merge" this partition into some
mountpoint that is already occupied, e. g. /home, maybe via
"mount -o union" including all possibly negative consequences).



> How to I "recapture" the remaining 2+TB of space that's not being used?

Without wiping the whole disk(s)?



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



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