mkfs: bad value for nbpi: must be at least 1048576 for multi-terabyte, nbpi
shadmifSep 9 2011 — edited Sep 9 2011Hi, guys!
*1. I have a big FS (8 TB) on UFS which contains a lot of small files ~ 64B-1MB.*
-bash-3.00# df -h /mnt
Filesystem Size Used Avail Use% Mounted on
/dev/dsk/c10t600000E00D000000000201A400020000d0s0
8.0T 4.3T 3,7T 54% /mnt
*2. But today I noticed in dmesg such errors: "ufs: [ID 682040 kern.notice] NOTICE: /mnt: out of inodes"*
-bash-3.00# df -i /mnt
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/dsk/c10t600000E00D000000000201A400020000d0s0
8753024 8753020 4 100% /mnt
*3. So, I decided to make file system with new parameters:*
-bash-3.00# mkfs -m /dev/rdsk/c10t600000E00D000000000201A400020000d0s0
mkfs -F ufs -o nsect=128,ntrack=48,bsize=8192,fragsize=8192,cgsize=143,free=1,rps=1,nbpi=997778,opt=t,apc=0,gap=0,nrpos=1,maxcontig=128,mtb=y /dev/rdsk/c10t600000E00D000000000201A400020000d0s0 17165172656
-bash-3.00#
-bash-3.00# mkfs -F ufs -o nsect=128,ntrack=48,bsize=8192,fragsize=1024,cgsize=143,free=1,rps=1,nbpi=512,opt=t,apc=0,gap=0,nrpos=1,maxcontig=128,mtb=f /dev/rdsk/c10t600000E00D000000000201A400020000d0s0 17165172656
*3. I've got some warnings about inodes threshold:*
-bash-3.00# mkfs -F ufs -o nsect=128,ntrack=48,bsize=8192,fragsize=1024,cgsize=143,free=1,rps=1,nbpi=512,opt=t,apc=0,gap=0,nrpos=1,maxcontig=128,mtb=n /dev/rdsk/c10t600000E00D000000000201A400020000d0s0 17165172656
mkfs: bad value for nbpi: must be at least 1048576 for multi-terabyte, nbpi reset to default 1048576
Warning: 2128 sector(s) in last cylinder unallocated
/dev/rdsk/c10t600000E00D000000000201A400020000d0s0: 17165172656 sectors in 2793811 cylinders of 48 tracks, 128 sectors
8381432.0MB in 19538 cyl groups (143 c/g, 429.00MB/g, 448 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 878752, 1757472, 2636192, 3514912, 4393632, 5272352, 6151072, 7029792,
7908512,
Initializing cylinder groups:
...............................................................................
...............................................................................
...............................................................................
...............................................................................
..........................................................................
super-block backups for last 10 cylinder groups at:
17157145632, 17158024352, 17158903072, 17159781792, 17160660512, 17161539232,
17162417952, 17163296672, 17164175392, 17165054112
*4.And my inodes number didn't change:*
-bash-3.00# df -i /mnt
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/dsk/c10t600000E00D000000000201A400020000d0s0
8753024 4 8753020 1% /mnt
I found http://wesunsolve.net/bugid.php/id/6595253 that is a bug of mkfs without workaround. Is ZFS what I need now?