Wednesday, 1 January 2025

Resizing a UFS partition

UFS is really only supported on FreeBSD

Use a FreeBSD live CD.

gpart delete -i 1 /dev/da1

gpart destroy -F /dev/da1

gpart create -s GPT /dev/da1

gpart show

Note that it has a 40 sector (40*512 bytes) offset to allow for the GPT table. 
The previous sector I had started at 34 bytes and creating a partition warned that "added, but partition is not aligned on 4096 bytes"


gpart show

40 7814037088 da1 GPT (36T)
40 7814037088     - free - (3.6T)

gpart add -t freebsd-ufs -b 40 -s 7814037088 /dev/da1

gpart show

40 7814037088 da1 GPT (36T)
40 7814037088     1 freebsd-ufs (3.6T)



No comments:

Post a Comment