growfs(8) trouble

Victor A. Savinoff kloderik at gmail.com
Tue Mar 16 16:51:22 UTC 2010


In growfs.c:
static void get_dev_size(int fd, int *size)
int size (which, actually, is device length measured in blocks) is
limited to largest 32-bit integer. If device block size is 512 bytes
(which is usual by now), this limits new filesystem size to 2TiB.
Without changes, growfs refuses to grow a filesystem beyond 2TiB with
message "like we are not growing (old_size->new_size)", where new_size
< old_size.
I tried to change both its and p_size (in main()) type to u_int64_t.
That worked for growing filesystem from 2TiB to 3.62TiB with block
size 64KiB and fragment size 8KiB, but failed with default block and
fragment sizes.
As I am not an experienced developer, I would't even try to post
patches here, so I leave the solution for gurus.

-- 
WBR, Victor A. "Claus" Savinoff


More information about the freebsd-fs mailing list