growing filesystems in 5-current
Lukas Ertl
l.ertl at univie.ac.at
Thu Apr 17 09:57:16 PDT 2003
On Thu, 17 Apr 2003, Terry Lambert wrote:
> ...and also consists of 3 elements, following "start", so it
> seems you aren't losing anything, at least to me.
>
> Probably your patch is fine.
Thanks for your answer, Terry, seems reasonable.
There's still a thing that I have recognized now and that bothers me, and
I can't explain this one too.
Consider again this 32 MB vinum volume. If I newfs it with the default
size of 65536 sectors I get this:
---8<---
# newfs -O2 -s 65536 /dev/vinum/mytest
/dev/vinum/mytest: 32.0MB (65536 sectors) block size 16384, fragment size
2048
using 4 cylinder groups of 8.02MB, 513 blks, 1088 inodes.
super-block backups (for fsck -b #) at:
160, 16576, 32992, 49408
# df -k /dev/vinum/mytest
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/vinum/mytest 31470 2 28952 0.%
---8<---
Four cg's with 8.02MB each? 513 blocks? Why's that? Shouldn't that be 8MB
each and 512 blocks?
If I growfs this one I get the behaviour I described in my first mail.
Now look at this:
---8<---
# newfs -O2 -s 65535 /dev/vinum/mytest
/dev/vinum/mytest: 32.0MB (65532 sectors) block size 16384, fragment size
2048
using 4 cylinder groups of 8.00MB, 512 blks, 1024 inodes.
super-block backups (for fsck -b #) at:
160, 16544, 32928, 49312
# df -k /dev/vinum/mytest
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/vinum/mytest 31532 2 29008 0.%
---8<---
So I explicitly make the FS one sector smaller than the default value, and
I get not only 4 cg's with 8 MB and 512 blocks (which would seem correct
to me), but I also get more space available on the FS.
And if I growfs this one, everything works as expected:
---8<---
# growfs /dev/vinum/mytest
We strongly recommend you to make a backup before growing the Filesystem
Did you backup your data (Yes/No) ? Yes
new file systemsize is: 32768 frags
growfs: 64.0MB (131072 sectors) block size 16384, fragment size 2048
using 8 cylinder groups of 8.00MB, 512 blks, 1024 inodes.
super-block backups (for fsck -b #) at:
65696, 82080, 98464, 114848
---8<---
What the heck is going on here? newfs bug? Or did I get something wrong?
best regards,
le
--
Lukas Ertl eMail: l.ertl at univie.ac.at
UNIX-Systemadministrator Tel.: (+43 1) 4277-14073
Zentraler Informatikdienst (ZID) Fax.: (+43 1) 4277-9140
der Universität Wien http://mailbox.univie.ac.at/~le/
More information about the freebsd-fs
mailing list