磁盘管理常用工具

时间:2020-03-19 09:06:40   收藏:0   阅读:60

磁盘管理常用工具

1. make2fs - ext 系列文件系统管理工具

2. tune2fs - 修改 ext 某些属性

块大小不可调整

-l 列出超级块中的信息

修改属性:

-j 将ext2 升级到ext3

-L 修改卷标

-m 修改预留给root 的百分比

-O [^] mount options指定创建文件系统时的持性

3. dumpe2fs 显示 ext 文件系统 详细信息

-h 查看超级块信息

4. fsck 手动执行文件系统检测

-t 指定文件系统类型(可不指定)

-a 无需交互式的修护

-f 交互式修复

5. blkid 查看UUID

-L 根据LABEL 定位设备

-U 根据UUID定位设备

6. mount

mount [-rwn] [-t vfstype] [-o options] device dir

-r 只读挂载

-w 读写挂载

-n 默认情况下 挂载卸载操作会同步到/etc/mtab 下 -n 禁止该特性

-L 挂载时以卷标指明设备

-U 以UUID的方式指明设备

挂载时文件系统特性 -o :

sync /async: 同步/异步

atime/noatime: 更新/不更新 时间戳

diratime/dirnoatime 目录 更新/不更新 时间戳

remount 重新挂载

acl 访问控制列表

ro 只读

rw 读写

dev/nodev 此设备上是否允许创建设备文件;

exec/noexec 设备上的文件是否可执行;

user/nouser 是否允许普通用户挂载

suid/nosuid 是否允许程序文件上的suid 和sgid 生效

defaults: rw suid dev exec auto nouser async relatime

一个使用技巧

mount --bind 源目录 目标目录

7. umount

lsof mount_point

fuser -km mount_point 杀死所有的占用进程

8. /etc/fstab

原文:https://www.cnblogs.com/pythonPath/p/12521608.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!