Username: Password:

怎样增加磁盘的inode number
来源: ChinaUnix博客  作者: ChinaUnix博客   发布时间:2008-04-29 02:08:07


inode这个词大多资料都是译为索引节点,在ext3文档系统,调整磁盘的inode number。这里只是调整inode number这个参数,假如想调整inode size或是blocksize等能够具体mkfs.ext3命令。
系统内核版本:2.4.21-32
1。卸载文档系统
#>umount /data0
2。建立文档系统,指定inode节点数
#>mkfs.ext3 /dev/sda6 -N ”inode节点数“
3。修改fstab文档
#>vi /etc/fstab
/dev/sda6               /data0                  ext3    defaults        1 2
4,挂载文档系统
#>mount -a
4。查看修改后的inode参数
#>dumpe2fs -h /dev/sda6 | grep node
[注意]调整inode数会格式化磁盘,执行前应确定磁盘上没有重要数据或是先备份数据
mkfs.ext3的和inode相关的参数介绍
       -i bytes-per-inode
              Specify the bytes/inode ratio.   mke2fs  creates  an  inode  for
              every  bytes-per-inode  bytes  of space on the disk.  The larger
              the bytes-per-inode ratio, the fewer  inodes  will  be  created.
              This  value generally shouldn?? be smaller than the blocksize of
              the filesystem, since then too many inodes  will  be  made.   Be
              warned  that is not possible to expand the number of inodes on a
              filesystem after it is created, so be careful deciding the  cor-
              rect value for this parameter.
       -N number-of-inodes
              overrides the default calculation of the number of  inodes  that
              should  be  reserved  for  the filesystem (which is based on the
              number of blocks and the bytes-per-inode  ratio).   This  allows
              the user to specify the number of desired inodes directly.


喜欢本文,那就收藏到:

    Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪ViVi 365Key网摘 天极网摘 和讯网摘 博拉网 POCO网摘 添加到饭否 QQ书签 Digbuzz我挖网
相关评论  我也要评论
还没有关于此文章的相关评论!
  • 昵称: (为空则显示guest)
  • 评论分数: ★ ★ ★★★ ★★★★ ★★★★★
  • 评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
  • 导航
    赞助商
    文章类别
    订阅