linux 挂载raid_【linux之挂载,Raid,LVM】

本文详细介绍了Linux系统中关于挂载、卸载的操作,包括mount命令的使用和注意事项,如选项-r、-w、-L、-U等。此外,还探讨了RAID技术,包括RAID0、RAID1、RAID5、RAID6和RAID10,以及如何使用mdadm进行RAID管理。最后,文章讲解了LVM(逻辑卷管理)的概念,如物理卷、卷组、逻辑卷的创建和管理,以及如何扩展和缩减逻辑卷。
摘要由CSDN通过智能技术生成

一、挂载,卸载

挂载:将新的文件系统关联至当前根文件系统

卸载:将某文件系统与当前根文件系统的关联关系移除

cat /etc/mtab 存储着已经挂载的文件系统 (跟 mount 一样)

mount:显示当前系统已经挂载的设备及挂载点

mount [options] [-o options] DEVICE MOUNT_POINT

设备:

设备文件:/dev/sda5

卷标:LABEL=""UUID: UUID=""挂载点:目录

要求:1、此目录没有被其他进程使用;2、目录得事先存在;3、目录中的原有的文件将会暂时隐藏;

选项:-a:表示挂载/etc/fstab文件中定义的所有文件系统-n:默认情况下,mount命令每挂载一个设备,都会把挂载的设备信息保存到/etc/mtab.加了-n就不写入/etc/mtab中-r:以只读方式挂载-w:以读写的方式挂载-L:指明卷标-U:用UUID挂载-t:指明文件系统类型,默认通过blkid来识别指定-o:指定挂载时候选项的内容

async All I/O to the filesystem should be done asynchronously. (See also the syncoption.)

atime Update inode accesstime for each access. See also the strictatime mountoption.

noatime

Do not update inode access times on this filesystem (e.g,forfaster access on the news spool

to speed up news servers).

auto Can be mounted with the-a option.

noauto Can only be mounted explicitly (i.e., the-a option will not cause the filesystem to be

mounted).

context=context, fscontext=context, defcontext=context and rootcontext=context

The context= option is useful when mounting filesystems that donot support extended

attributes, such as a floppy or hard disk formatted with VFAT, or systems that are not nor-mally running under SELinux, such as an ext3 formatted disk from a non-SELinux workstation.

You can also use context= on filesystems you do not trust, such as a floppy. It also helps incompatibility with xattr-supporting filesystems on earlier 2.4.kernel versions. Even where

xattrs are supported, you can savetime not having to label every fileby assigning the entire

disk one security context.

A commonly used optionfor removable media is context=system_u:object_r:removable_t.

Two other options are fscontext= and defcontext=, both of whichare mutually exclusive of the

context option. This means you can use fscontext and defcontext with each other, but neither

can be used with context.

The fscontext= option works for all filesystems, regardless of their xattr support. The fscon-text option sets the overarching filesystem label to a specific security context. This

filesystem label is separate from the individual labels on the files. It represents the entire

filesystemfor certain kinds of permission checks, such as during mount or filecreation.

Individualfilelabels are still obtained from th

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值