Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
greatbll
V2EX  ›  Linux

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

  •  
  •   greatbll · Nov 12, 2021 · 3336 views
    This topic created in 1646 days ago, the information mentioned may be changed or developed.

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

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

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

    3 replies    2021-11-16 05:13:11 +08:00
    izoabr
        1
    izoabr  
       Nov 12, 2021
    可以,基于用户设置磁盘配额。
    搜 ext4 quota
    yuedingwangji
        3
    yuedingwangji  
       Nov 16, 2021
    lvm thin_pool
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2985 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 09:32 · PVG 17:32 · LAX 02:32 · JFK 05:32
    ♥ Do have faith in what you're doing.