resize freebsd slice
listreader at lazlarlyricon.com
Fri Jun 11 14:06:11 UTC 2010
2010-06-11 15:30, Giorgos Tsiapaliokas skrev:
> in my machine i have gentoo and freebsd installed.
> i was using gentoo until i installed successfully FBSD,now i want to make my
> FBSD slice bigger..
> i have 4 slices:
> ad0s2->linux swap
> ad0s3->free space (no type)
> ad0s4b->FBSD swap
> how can i make my ad0s4a and ad0s4c slices bigger?
> P.S.: i want to take space from ad0s3
> thanks in advance
> freebsd-questions at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
Firstly, ad0s4 is slice. ad0s4a and ad0s4c are not slices, but
partitions within the ad0s4 slice.
Secondly, the c partition of ANY slice is expected to cover the entire
slice, i.e. NOT be used for a file system. Perhaps it is possible to do
so, but it is not recommended. For historical reasons, I've been told,
and that history goes farther back than my *nix experience, and I never
researched it further. Perhaps someone else can enlighten us.
With that in mind, if I were you, I'd backup the / and /home partitions,
delete the s4 slice and make the s3 slice cover the combined space of
the current s3 and s4 slices (using either fdisk directly or
sysinstall's interactive frontend to fdisk) without touching s1 and s2,
and then partition the new s3 like this.
ad0s3a --> /
ad0s3b --> swap
ad0s3d --> /home
To make backups, just boot into single user and do not mount / rw.
You'll need some extra storage, e.g. a USB disk, to store the backup.
To do the reslicing, repartitioning and restoring the backups, you'll
need to boot from some other medium, e.g. the LiveFS CD. When making and
restoring the backups, you may also need to have a writable /tmp
directory. You can accomplish this by
mdmfs -M -S -s 20m md /tmp
which will give you a 20 MB filesystem stored in RAM with soft-updates
disabled. That should be sufficient.
This is how I would do it. Perhaps someone else has a better, simpler
More information about the freebsd-questions