4

Linux 是否能给目录设置配额,来限制目录大小?

 3 years ago
source link: https://www.v2ex.com/t/815007
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  Linux

Linux 是否能给目录设置配额,来限制目录大小?

  greatbll · 18 小时 12 分钟前 · 505 次点击

需求: 目录: /opt/data 允许存储文件最大容量限制为 100G ,是否有办法实现?

已知方法: 可以通过 dd 新建一个 100G 的 raw 文件,格式化后用 mount -o loop /path/raw.img /opt/data 来实现

问题: 1 、是否有其它办法来限制目录的大小? 2 、群晖 synology 可以通过“启用共享文件夹配额”,来限制共享目录的大小,对 nfs ,cifs 以及 ftp 服务都能够生效,有谁知道是怎样实现的吗?


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK