免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1413 | 回复: 0
打印 上一主题 下一主题

Mount Options for UFS [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-03-23 01:17 |只看该作者 |倒序浏览
ITworld.com, Unix in the Enterprise 11/4/04
Sandra Henry-Stocker, ITworld.com
While not heavily used, options available for UFS file systems can dramatically improve file system performance and stablility. In this week's column, we're going to take a look at how some of these options affect the way file systems operate and why you might consider using them.

logging

    Logging is one of the most impressive yet relatively overlooked file system feature available on Solaris systems. Introduced in Solaris 7, this option turns a file system into a "journalling" file system. What this means is that the multiple operations that comprise a single file system update -- altering the file's contents, potentially creating or removing its directory entries and updating the data in the file's inode -- are written to a log file before they are actually applied to the file system. This prevents the file systems from suffering from the kind of inconsistencies that have been historically repaired by time-consuming file system checking (a la fsck).
    This is even better than it sounds. Applying the logging option to a UFS file system virtually eliminates file system corruption. This can save you a lot of time and trouble after a messy crash. In the case of a power outage that affects a room full of servers, it may mean you get to go home on time.
    The logging option works so well, in fact, that I and others have enjoyed damage-free reboots even after yanking the power cable from a system during heavy disk activity.

noatime

    Another incredibly useful UFS option is the noatime (no access time) option. This option removes the requirement that accesses to files be recorded in the access time field in a file's inode. In other words, the file system will ignore access times except when they accompany updates to ctime or mtime. On frequently accessed file systems where this information is of little value -- such as most web sites -- this option can save a tremendous number of file system update operations and significantly improve file system performance.

forcedirectio

    The forcedirectio (read "force direct IO") UFS option causes data to be buffered in kernel address whenever data is transferred between user address space and the disk. In other words, it bypasses the file system cache. For certain types of applications -- primarily database systems -- this option can dramatically improve performance. In fact, some database experts have argued that a file using the forcedirectio option will outperform a raw partition, though this opinion seems fairly controversial.
    The forcedirectio improves file system performance by eliminating double buffering, providing a small, efficient code path for file system reads and writes and removing pressure on memory.

nosuid

    The nosuid option disallows the use of suid privilege on any files within the file system, whether or not the suid bits have been turned on. Use of this option adds a small boon to security, since suid programs are sometimes provide the routes through which security holes are created. Use of the nosuid on file systems which house frequently or widely used binaries is especially helpful to deter abuse of the suid feature.

ro

    The ro (read-only) file system option isn't intended only for mounting CD ROMs. This option can play an important role whenever file systems are shared with client systems, but should not be altered by these clients. For example, if you have built a set of scripts that you want to make available to a large number of systems, you may want to ensure that these scripts cannot be altered by users on remote systems. By sharing the file systems read-only, you can be confident that the scripts cannot be changed by anyone logged into the remote systems.

/etc/vfstab

    All file system mount options are specified in the /etc/vfstab file (sharing options aree specified in /etc/dfs/dfstab). The logging and noatim options, often used together, would look like this (the line is wrapped):
/dev/dsk/c1d1s0 /dev/rdsk/c1d1s0    /opt/web    ufs    3    yes    logging,noatime

    These options will become effective only when the file system is unmounted and then remounted or the system is rebooted. Remounting while the system is still up is, of course, not possible with file systems like / and /usr.




本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/64350/showart_504661.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP