搜索

3.2. 挂​​​​​​​载​​​​​​​文​​​​​​​件​​​​​​​系​​​​​​​统​​​​​​​

download PDF
Before you can mount a GFS2 file system, the file system must exist (refer to 第 3.1 节 “生​​​​​​​成​​​​​​​文​​​​​​​件​​​​​​​系​​​​​​​统​​​​​​​”), the volume where the file system exists must be activated, and the supporting clustering and locking systems must be started (refer to Configuring and Managing a Red Hat Cluster). After those requirements have been met, you can mount the GFS2 file system as you would any Linux file system.
要​​​​​​​处​​​​​​​理​​​​​​​文​​​​​​​件​​​​​​​ ACL,您​​​​​​​必​​​​​​​须​​​​​​​使​​​​​​​用​​​​​​​ -o acl 挂​​​​​​​载​​​​​​​信​​​​​​​息​​​​​​​挂​​​​​​​载​​​​​​​文​​​​​​​件​​​​​​​系​​​​​​​统​​​​​​​。​​​​​​​如​​​​​​​果​​​​​​​挂​​​​​​​载​​​​​​​文​​​​​​​件​​​​​​​系​​​​​​​统​​​​​​​时​​​​​​​没​​​​​​​有​​​​​​​使​​​​​​​用​​​​​​​ -o acl 选​​​​​​​项​​​​​​​,用​​​​​​​户​​​​​​​可​​​​​​​以​​​​​​​查​​​​​​​看​​​​​​​ ACL(使​​​​​​​用​​​​​​​ getfacl),但​​​​​​​不​​​​​​​能​​​​​​​对​​​​​​​其​​​​​​​进​​​​​​​行​​​​​​​设​​​​​​​置​​​​​​​(使​​​​​​​用​​​​​​​ setfacl)。​​​​​​​

用​​​​​​​法​​​​​​​

Mounting Without ACL Manipulation
mount BlockDevice MountPoint
Mounting With ACL Manipulation
mount -o acl BlockDevice MountPoint
-o acl
GFS2 允​​​​​​​许​​​​​​​处​​​​​​​理​​​​​​​文​​​​​​​件​​​​​​​ ACL 的​​​​​​​特​​​​​​​定​​​​​​​选​​​​​​​项​​​​​​​。​​​​​​​
BlockDevice
指​​​​​​​定​​​​​​​ GFS2 文​​​​​​​件​​​​​​​系​​​​​​​统​​​​​​​所​​​​​​​在​​​​​​​的​​​​​​​块​​​​​​​设​​​​​​​备​​​​​​​。​​​​​​​
MountPoint
指​​​​​​​定​​​​​​​要​​​​​​​挂​​​​​​​载​​​​​​​ GFS2 文​​​​​​​件​​​​​​​系​​​​​​​统​​​​​​​的​​​​​​​目​​​​​​​录​​​​​​​。​​​​​​​

示​​​​​​​例​​​​​​​

在​​​​​​​这​​​​​​​个​​​​​​​示​​​​​​​例​​​​​​​中​​​​​​​,位​​​​​​​于​​​​​​​ /dev/vg01/lvol0 的​​​​​​​ GFS2 文​​​​​​​件​​​​​​​系​​​​​​​统​​​​​​​被​​​​​​​挂​​​​​​​载​​​​​​​到​​​​​​​ /mygfs2 目​​​​​​​录​​​​​​​中​​​​​​​。​​​​​​​
mount /dev/vg01/lvol0 /mygfs2

完​​​​​​​整​​​​​​​用​​​​​​​法​​​​​​​

mount BlockDevice MountPoint -o option
The -o option argument consists of GFS2-specific options (refer to 表 3.2 “GFS2 特​​​​​​​定​​​​​​​挂​​​​​​​载​​​​​​​选​​​​​​​项​​​​​​​”) or acceptable standard Linux mount -o options, or a combination of both. Multiple option parameters are separated by a comma and no spaces.

注意

mount 命​​​​​​​令​​​​​​​是​​​​​​​ Linux 系​​​​​​​统​​​​​​​命​​​​​​​令​​​​​​​。​​​​​​​除​​​​​​​了​​​​​​​使​​​​​​​用​​​​​​​这​​​​​​​部​​​​​​​分​​​​​​​论​​​​​​​述​​​​​​​的​​​​​​​ GFS2 特​​​​​​​定​​​​​​​选​​​​​​​项​​​​​​​,您​​​​​​​还​​​​​​​可​​​​​​​以​​​​​​​使​​​​​​​用​​​​​​​其​​​​​​​它​​​​​​​标​​​​​​​准​​​​​​​ mount 命​​​​​​​令​​​​​​​选​​​​​​​项​​​​​​​(例​​​​​​​如​​​​​​​:-r)。​​​​​​​有​​​​​​​关​​​​​​​其​​​​​​​它​​​​​​​ Linux mount 命​​​​​​​令​​​​​​​选​​​​​​​项​​​​​​​请​​​​​​​参​​​​​​​考​​​​​​​ mount man page。​​​​​​​
表 3.2. GFS2 特​​​​​​​定​​​​​​​挂​​​​​​​载​​​​​​​选​​​​​​​项​​​​​​​
选​​​​​​​项​​​​​​​ 描​​​​​​​述​​​​​​​
acl 允​​​​​​​许​​​​​​​处​​​​​​​理​​​​​​​文​​​​​​​件​​​​​​​ ACL。​​​​​​​如​​​​​​​果​​​​​​​挂​​​​​​​载​​​​​​​文​​​​​​​件​​​​​​​系​​​​​​​统​​​​​​​时​​​​​​​没​​​​​​​有​​​​​​​使​​​​​​​用​​​​​​​ acl 挂​​​​​​​载​​​​​​​选​​​​​​​项​​​​​​​,那​​​​​​​么​​​​​​​用​​​​​​​户​​​​​​​可​​​​​​​以​​​​​​​查​​​​​​​看​​​​​​​ ACL(使​​​​​​​用​​​​​​​ getfacl),但​​​​​​​不​​​​​​​能​​​​​​​对​​​​​​​其​​​​​​​进​​​​​​​行​​​​​​​设​​​​​​​置​​​​​​​(使​​​​​​​用​​​​​​​ setfacl)。​​​​​​​
data=[ordered|writeback] 当​​​​​​​设​​​​​​​定​​​​​​​ data=ordered 时​​​​​​​,处​​​​​​​理​​​​​​​中​​​​​​​修​​​​​​​改​​​​​​​的​​​​​​​用​​​​​​​户​​​​​​​数​​​​​​​据​​​​​​​会​​​​​​​在​​​​​​​处​​​​​​​理​​​​​​​被​​​​​​​递​​​​​​​交​​​​​​​到​​​​​​​磁​​​​​​​盘​​​​​​​前​​​​​​​被​​​​​​​冲​​​​​​​入​​​​​​​磁​​​​​​​盘​​​​​​​。​​​​​​​这​​​​​​​样​​​​​​​可​​​​​​​以​​​​​​​让​​​​​​​用​​​​​​​户​​​​​​​无​​​​​​​法​​​​​​​在​​​​​​​崩​​​​​​​溃​​​​​​​后​​​​​​​的​​​​​​​文​​​​​​​件​​​​​​​中​​​​​​​看​​​​​​​到​​​​​​​未​​​​​​​初​​​​​​​始​​​​​​​化​​​​​​​的​​​​​​​块​​​​​​​。​​​​​​​设​​​​​​​定​​​​​​​ data=writeback 时​​​​​​​,用​​​​​​​户​​​​​​​数​​​​​​​据​​​​​​​会​​​​​​​在​​​​​​​磁​​​​​​​盘​​​​​​​有​​​​​​​数​​​​​​​据​​​​​​​后​​​​​​​的​​​​​​​任​​​​​​​何​​​​​​​时​​​​​​​候​​​​​​​被​​​​​​​写​​​​​​​入​​​​​​​磁​​​​​​​盘​​​​​​​。​​​​​​​这​​​​​​​样​​​​​​​无​​​​​​​法​​​​​​​提​​​​​​​供​​​​​​​ ordered 模​​​​​​​式​​​​​​​可​​​​​​​提​​​​​​​供​​​​​​​的​​​​​​​一​​​​​​​致​​​​​​​性​​​​​​​保​​​​​​​障​​​​​​​,但​​​​​​​可​​​​​​​稍​​​​​​​微​​​​​​​提​​​​​​​高​​​​​​​一​​​​​​​些​​​​​​​工​​​​​​​作​​​​​​​量​​​​​​​的​​​​​​​速​​​​​​​度​​​​​​​。​​​​​​​默​​​​​​​认​​​​​​​设​​​​​​​置​​​​​​​是​​​​​​​ ordered 模​​​​​​​式​​​​​​​。​​​​​​​
ignore_local_fs
警​​​​​​​告​​​​​​​:在​​​​​​​共​​​​​​​享​​​​​​​ GFS2 文​​​​​​​件​​​​​​​系​​​​​​​统​​​​​​​时​​​​​​​不​​​​​​​应​​​​​​​该​​​​​​​使​​​​​​​用​​​​​​​这​​​​​​​个​​​​​​​选​​​​​​​项​​​​​​​。​​​​​​​
强​​​​​​​制​​​​​​​ GFS2 将​​​​​​​文​​​​​​​件​​​​​​​系​​​​​​​统​​​​​​​视​​​​​​​为​​​​​​​多​​​​​​​主​​​​​​​机​​​​​​​文​​​​​​​件​​​​​​​系​​​​​​​统​​​​​​​。​​​​​​​默​​​​​​​认​​​​​​​情​​​​​​​况​​​​​​​是​​​​​​​使​​​​​​​用​​​​​​​ lock_nolock 自​​​​​​​动​​​​​​​打​​​​​​​开​​​​​​​ localcaching 和​​​​​​​ localflocks 标​​​​​​​签​​​​​​​。​​​​​​​
localcaching
警​​​​​​​告​​​​​​​:在​​​​​​​共​​​​​​​享​​​​​​​ GFS2 文​​​​​​​件​​​​​​​系​​​​​​​统​​​​​​​时​​​​​​​不​​​​​​​应​​​​​​​该​​​​​​​使​​​​​​​用​​​​​​​这​​​​​​​个​​​​​​​选​​​​​​​项​​​​​​​。​​​​​​​
告​​​​​​​知​​​​​​​ GFS2 它​​​​​​​正​​​​​​​作​​​​​​​为​​​​​​​本​​​​​​​地​​​​​​​文​​​​​​​件​​​​​​​系​​​​​​​统​​​​​​​运​​​​​​​行​​​​​​​。​​​​​​​然​​​​​​​后​​​​​​​ GFS2 可​​​​​​​以​​​​​​​打​​​​​​​开​​​​​​​运​​​​​​​行​​​​​​​在​​​​​​​群​​​​​​​集​​​​​​​模​​​​​​​式​​​​​​​中​​​​​​​时​​​​​​​不​​​​​​​可​​​​​​​用​​​​​​​的​​​​​​​所​​​​​​​选​​​​​​​最​​​​​​​佳​​​​​​​功​​​​​​​能​​​​​​​。​​​​​​​lock_nolock 可​​​​​​​自​​​​​​​动​​​​​​​打​​​​​​​开​​​​​​​ localcaching 标​​​​​​​签​​​​​​​。​​​​​​​
localflocks
警​​​​​​​告​​​​​​​:在​​​​​​​共​​​​​​​享​​​​​​​ GFS2 文​​​​​​​件​​​​​​​系​​​​​​​统​​​​​​​时​​​​​​​不​​​​​​​应​​​​​​​该​​​​​​​使​​​​​​​用​​​​​​​这​​​​​​​个​​​​​​​选​​​​​​​项​​​​​​​。​​​​​​​
告​​​​​​​知​​​​​​​ GFS2 让​​​​​​​ VFS(虚​​​​​​​拟​​​​​​​文​​​​​​​件​​​​​​​系​​​​​​​统​​​​​​​)层​​​​​​​完​​​​​​​成​​​​​​​所​​​​​​​有​​​​​​​ flock 和​​​​​​​ fcntl 操​​​​​​​作​​​​​​​。​​​​​​​lock_nolock 可​​​​​​​自​​​​​​​动​​​​​​​打​​​​​​​开​​​​​​​ localflocks 标​​​​​​​签​​​​​​​。​​​​​​​
lockproto=LockModuleName 允​​​​​​​许​​​​​​​用​​​​​​​户​​​​​​​指​​​​​​​定​​​​​​​文​​​​​​​件​​​​​​​系​​​​​​​统​​​​​​​要​​​​​​​使​​​​​​​用​​​​​​​的​​​​​​​锁​​​​​​​定​​​​​​​协​​​​​​​议​​​​​​​。​​​​​​​如​​​​​​​果​​​​​​​没​​​​​​​有​​​​​​​指​​​​​​​定​​​​​​​ LockModuleName,则​​​​​​​会​​​​​​​从​​​​​​​文​​​​​​​件​​​​​​​系​​​​​​​统​​​​​​​的​​​​​​​超​​​​​​​级​​​​​​​块​​​​​​​中​​​​​​​读​​​​​​​取​​​​​​​锁​​​​​​​定​​​​​​​协​​​​​​​议​​​​​​​。​​​​​​​
locktable=LockTableName 允​​​​​​​许​​​​​​​用​​​​​​​户​​​​​​​指​​​​​​​定​​​​​​​文​​​​​​​件​​​​​​​系​​​​​​​统​​​​​​​要​​​​​​​使​​​​​​​用​​​​​​​的​​​​​​​锁​​​​​​​定​​​​​​​表​​​​​​​。​​​​​​​
quota=[off/account/on] 为​​​​​​​文​​​​​​​件​​​​​​​系​​​​​​​统​​​​​​​打​​​​​​​开​​​​​​​或​​​​​​​者​​​​​​​关​​​​​​​闭​​​​​​​配​​​​​​​额​​​​​​​。​​​​​​​在​​​​​​​ account 状​​​​​​​态​​​​​​​中​​​​​​​配​​​​​​​置​​​​​​​配​​​​​​​额​​​​​​​可​​​​​​​让​​​​​​​文​​​​​​​件​​​​​​​系​​​​​​​统​​​​​​​正​​​​​​​确​​​​​​​维​​​​​​​护​​​​​​​对​​​​​​​每​​​​​​​个​​​​​​​ UID/GID 使​​​​​​​用​​​​​​​统​​​​​​​计​​​​​​​,忽​​​​​​​略​​​​​​​限​​​​​​​制​​​​​​​和​​​​​​​警​​​​​​​告​​​​​​​值​​​​​​​。​​​​​​​默​​​​​​​认​​​​​​​值​​​​​​​为​​​​​​​ off。​​​​​​​
upgrade 升​​​​​​​级​​​​​​​文​​​​​​​件​​​​​​​系​​​​​​​统​​​​​​​的​​​​​​​磁​​​​​​​盘​​​​​​​格​​​​​​​式​​​​​​​以​​​​​​​便​​​​​​​可​​​​​​​被​​​​​​​新​​​​​​​版​​​​​​​本​​​​​​​的​​​​​​​ GFS2 使​​​​​​​用​​​​​​​。​​​​​​​
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.