Shrinking a partition

Christian Walther cptsalek at gmail.com
Tue Jan 15 08:15:52 PST 2008


On 15/01/2008, James Harrison <jamesh at lanl.gov> wrote:
> On Tue, 2008-01-15 at 07:45 -0500, Aryeh Friedman wrote:
> > After installing FreeBSD and Vista (463 GB and 30 GB respectivally) I
> > found out I don't have enough free space on my 500 GB drive on the
> > vista partition.   How do I determine how much I can shrink the
> > FreeBSD partition by safely (by just moving the end sector in
> > fdisk(1))?
>
> I'd imagine that you could use the output of df -h to see how much
> you're using on the /usr partition and then shrink appropriately.
>
AFAIK UFS (as well as other Unix FS) don't simply start writing at the
beginning of a filesystem and continue until the end is reached. It's
possible that data is written near the end of a filesystem nearly
instantly after the first mount.
To make sure that you don't loose any data I'd dump the FS to a save
place and restore it afterwards using a LiveCD.


More information about the freebsd-questions mailing list