how to create a folder with a limited size?
-
- Posts: 5
- Joined: 2019/11/19 05:55:00
how to create a folder with a limited size?
Hey, I want to have a folder but limiting the size of that folder to 5Gb How to do that in CentOs 7?
Re: how to create a folder with a limited size?
Sounds like you want to set quota. XFS supports project quotas, which might suit your need.
Re: how to create a folder with a limited size?
There's another fairly horrible way to do it:
- Create a 5 GiB file using dd(1).
- Create a filesystem within the file (mkfs(8)).
- Mount it on the directory whose size you wish to limit.
-
- Posts: 5
- Joined: 2019/11/19 05:55:00
Re: how to create a folder with a limited size?
I planned to limiting folder size for samba user, i want to know what is the good option and how quota compared to xfs tools for example xfs_quota?
https://linux.die.net/man/8/xfs_quota
Re: how to create a folder with a limited size?
With ZFS you can create folders (zfs partitions) that have a maximum size.