SUMMARY: newfs -i [nbpi] on large FS does not change number of inodes

From: Paul Coray <paul.coray_at_unibas.ch>
Date: Thu Feb 22 2007 - 11:25:58 EST
Hi all,

First, thanks to G. Bakalarski, Brad Morrison, Darren Dunham and Rainer 
Heilke for helping me to sort this out.

Short answer: This limitation (minimal number of bytes per inode 1048576 
for UFS bigger than 1TB) is a design decision by Sun, that cannot be 
overridden - it is hardcoded in newfs and mkfs, and is due to the time 
it would take for fsck and other recovery options on big volumes with 
lots of small files.

In times where UFS-logging is a must in any situation and the default 
since Solaris 10, this decision is questionable. There is a pending RFE 
(5015643 Remove or reduce the nbpi restriction from *mkfs_ufs* for UFS 
mtb filesystems) and patches for OpenSolaris-newfs available - see 
http://groups.google.com/group/comp.unix.solaris/browse_thread/thread/ac5fb4607ab7677b

So the only options in this kind of situation are:

1. Decrease the size of the slice/FS to <1TB

2. Use patched version of newfs

3. Use ZFS

In my situation, talking of a highly productive system that holds all 
user data, I surely won't go for 2. I'd like to give ZFS a shot, but 
having little experience with it, could lead me to 1.

Again, thanks to the ones who helped me out, and to all who contribute 
to the wonderful amount of expertise on this list.

Paul


Original post:

Hello all,

System: Solaris 10 6/06 (Sparc), fully patched.

I need to transfer all our homedirectories with lots of small files to a 
new volume (ST6140 RAID 5, 1.3TB). Default number of  bytes  per  inode 
results in way too few inodes.

So I want to lower the nbpi with the -i option of newfs. Using 8192 or 
any lower number for nbpi does not have any effect on the number of 
inodes in the resulting FS, as to see in the output of mkfs -m 
/dev/rdsk/cXtXdXsX... What is going wrong?

Below, first the result of newfs with no options (default nbpi 1048576 
for FS greater than 1TB, according to manpage), second newfs -i 8192 - 
both produce nbpi of 997778 !

Thanks in advance for assistance.

Paul

---------------------------------------------------------------
# newfs /dev/rdsk/c4t600A0B800026AD600000075945ADB77Ed0s0

newfs: /dev/rdsk/c4t600A0B800026AD600000075945ADB77Ed0s0 last mounted as 
/mnt
newfs: construct a new file system 
/dev/rdsk/c4t600A0B800026AD600000075945ADB77Ed0s0: (y/n)? y
Warning: 896 sector(s) in last cylinder unallocated
/dev/rdsk/c4t600A0B800026AD600000075945ADB77Ed0s0:      2926896256 
sectors in 476383 cylinders of 48 tracks, 128 sectors
         1429148.5MB in 3332 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:
  2918690080, 2919568800, 2920447520, 2921326240, 2922204960, 2923083680,
  2923954208, 2924832928, 2925711648, 2926590368

# mkfs -m /dev/rdsk/c4t600A0B800026AD600000075945ADB77Ed0s0

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/c4t600A0B800026AD600000075945ADB77Ed0s0 2926896256

---------------------------------------------------------------

  # newfs -i 8192 /dev/rdsk/c4t600A0B800026AD600000075945ADB77Ed0s0

newfs: construct a new file system 
/dev/rdsk/c4t600A0B800026AD600000075945ADB77Ed0s0: (y/n)? y
Warning: 896 sector(s) in last cylinder unallocated
/dev/rdsk/c4t600A0B800026AD600000075945ADB77Ed0s0:      2926896256 
sectors in 476383 cylinders of 48 tracks, 128 sectors
         1429148.5MB in 3332 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:
  2918690080, 2919568800, 2920447520, 2921326240, 2922204960, 2923083680,
  2923954208, 2924832928, 2925711648, 2926590368

# mkfs -m /dev/rdsk/c4t600A0B800026AD600000075945ADB77Ed0s0

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/c4t600A0B800026AD600000075945ADB77Ed0s0 2926896256

-- 
Paul Coray
Administrator Server und Netzwerk

Oeffentliche Bibliothek der Universitaet Basel
EDV-Abteilung
Schoenbeinstrasse 18-20
CH-4056 Basel

Tel: +41 61 267 05 13
Fax: +41 61 267 31 03

mailto:paul.coray@unibas.ch
http://www.ub.unibas.ch
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Thu Feb 22 11:26:43 2007

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:44:04 EST