SOLVED: Re: shrinking of FreeBSD root partition on GPT
Coert
lgroups at vlymskerp.net
Sat Nov 8 13:46:11 UTC 2014
On Saturday 08 November 2014 12:58:12 Coert wrote:
> Hello all!
>
> Just installed FreeBSD on my home server, (used to be linux)
>
> When I did the installation, I used the installer defaults, and it gave me
> the following:
> gpart show ada0
> => 34 488397101 ada0 GPT (233G)
> 34 128 1 freebsd-boot (64K)
> 162 480247680 2 freebsd-ufs (229G)
> 480247842 8149292 3 freebsd-swap (3.9G)
> 488397134 1 - free - (512B)
>
> I would like to shrink my root partition, (GPT partition 2).
> After reading through the handbook, I can adapt to shrinking instead of
> growing,
>
> What I am going to try is:
> 1. Boot from LiveCD
> 2. do a dump -0 of the current root partition
> 3. delete the root GPT partition, and create a new smaller GPT partition.
> 4.do a newfs on the new slice, and restore the dump.
>
> Do I need to restore any bootcode after this? I read about bsdlabel, but
> that seems to be only for MBR scheme?
>
> Will this work? or did i miss a step?
>
> When that is done, I will create a freebsd-zfs partition in the freed space
> on the disk. (Will rather still keep freebsd root on UFS)
>
> Kind regards,
> Coert
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
Hello,
Went as expected!
I kept the order of the GPT partitions the same, so no edit of /etc/fstab
necessary.
And I created the file system with the same settings as the old one.
My root partition is now 32GB
Also made the swap partition bigger,
and have ZFS taking up the rest!
Kind regards,
Coert
More information about the freebsd-questions
mailing list