I'm trying to use resize_ffs
with NetBSD to increase the size of my partition. I have NetBSD running in a virtual machine, and have expanded the size of the disk, and now wish to grow the partition to match.
Here is the man page for the tool.
I am trying to grow a 300 MB partition to 1 GB.
The tool's man page says that specifying a size is not mandatory, and that if it is not specified it will grow to use available space (ideal behaviour). However this results in an error saying newsize not known.
I have used various online tools to try and calculate the disk geometry, but no matter what I try when I pass a number to -s
, I get the error "bad magic number".
I have been unable to find example of using this tool online.
What is the correct way to use resize_ffs
to grow a partition to use available disk space?
resize_ffs
is the tool for resizing the filesystem within the partition. You'll probably first have to use some disk partitioning tool to increase the size of the partition, and thenresize_ffs
to make the filesystem use the new capacity within the partition. – telcoM Aug 11 '19 at 08:07bad magic number
means it cannot find a superblock. Can you stillfsck
the filesystem? Are you sure you didn't move the start of the partition? – Greg A. Woods Aug 23 '19 at 07:06