在solaris10上,挂接了一个4TB的阵列,请问怎样调节inode数,谢谢!
我的系统是solaris10 ,连接了一个4TB的阵列,在newfs之后发现阵列的inode数,还没有一块146GB硬盘的inode数多呢,请问阵列的inode数可以调吗?怎么调到无限大
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我的系统是solaris10 ,连接了一个4TB的阵列,在newfs之后发现阵列的inode数,还没有一块146GB硬盘的inode数多呢,请问阵列的inode数可以调吗?怎么调到无限大
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(9)
bash-3.00# newfs /dev/rdsk/c2t0d0s0
bash-3.00# mount /dev/dsk/c2t0d0s0 /disk1
bash-3.00# df -F ufs -o i /disk1
Filesystem iused ifree %iused Mounted on
/dev/dsk/c2t0d0s0 4 4175356 0% /disk1
bash-3.00#
bash-3.00# umount /disk1
bash-3.00# newfs -T /dev/rdsk/c2t0d0s0
bash-3.00# mount /dev/dsk/c2t0d0s0 /disk1
bash-3.00# df -F ufs -o i /disk1
Filesystem iused ifree %iused Mounted on
/dev/dsk/c2t0d0s0 4 4175356 0% /disk1
用zfs吧,zfs的inode的理论值基本是无限大的。动态inodes数的。
回复 3# nimysun
楼上的朋友,你能说得详细点吗?ZFS我没有用过,最好能有个实例,谢谢!
man newfs
里面可以自定义
回复 5# yoyosys
在man newfs 里面我没有找到,-i 、-b 、-T 参数我都是过了,inode数没有变化,请帮忙讲解的细一些!
-i nbpi
The number of bytes per inode, which specifies
the density of inodes in the file system. The
number is divided into the total size of the
file system to determine the number of inodes to
create.
This value should reflect the expected average
size of files in the file system. If fewer
inodes are desired, a larger number should be
used. To create more inodes, a smaller number
should be given. The default for nbpi is as fol-
lows:
Disk size Density
Less than 1GB 2048
Less than 2GB 4096
Less than 3GB 6144
3GB to 1 Tbyte 8192
Greater than 1 Tbyte
or created with -T 1048576
The number of inodes can increase if the file
system is expanded with the growfs command.
用newfs的-i参数重新构建文件系统
回复 7# yoyosys
bash-3.00# newfs -i 1048576 /dev/rdsk/c2t0d0s0
newfs: /dev/rdsk/c2t0d0s0 last mounted as /disk1
newfs: construct a new file system /dev/rdsk/c2t0d0s0: (y/n)? y
Warning: 2128 sector(s) in last cylinder unallocated
/dev/rdsk/c2t0d0s0: 8188420016 sectors in 1332751 cylinders of 48 tracks, 128 sectors
3998252.0MB in 9320 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:
8179695392, 8180574112, 8181452832, 8182331552, 8183210272, 8184088992,
8184967712, 8185846432, 8186725152, 8187603872
bash-3.00#
bash-3.00# mount /dev/dsk/c2t0d0s0 /disk1
bash-3.00# df -F ufs -o i /disk1
Filesystem iused ifree %iused Mounted on
/dev/dsk/c2t0d0s0 4 4175356 0% /disk1
bash-3.00#
inode数还是没有变,这个 -i 的值不管大小都没有用,我的系统是Solaris 10 10/09 s10s_u8wos_08a SPARC
我试了一下,只有 i= 2097152 ,我的inode才会有变化,其他的结果都不变
bash-3.00# newfs -i 2097152 /dev/rdsk/c2t0d0s0
newfs: /dev/rdsk/c2t0d0s0 last mounted as /disk1
newfs: construct a new file system /dev/rdsk/c2t0d0s0: (y/n)? y
Warning: 2128 sector(s) in last cylinder unallocated
/dev/rdsk/c2t0d0s0: 8188420016 sectors in 1332751 cylinders of 48 tracks, 128 sectors
3998252.0MB in 9320 cyl groups (143 c/g, 429.00MB/g, 256 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:
8179695392, 8180574112, 8181452832, 8182331552, 8183210272, 8184088992,
8184967712, 8185846432, 8186725152, 8187603872
bash-3.00# mount /dev/dsk/c2t0d0s0 /disk1
bash-3.00# df -F ufs -o i /disk1
Filesystem iused ifree %iused Mounted on
/dev/dsk/c2t0d0s0 4 2385916 0% /disk1
推荐zfs