LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-24-2018, 09:48 AM   #1
Ankushkalra
Member
 
Registered: Jan 2017
Posts: 48

Rep: Reputation: Disabled
Folder level Quota inside Filesystem.


Hi All,

I know we can enable quota on Filesysetem.I want to implement quota on folders inside filesystem for eg I have a filesystem /FS and two folder inside /FS namely /FS/FQ1 and /FS/FQ2.I want to enable quota on both folder such that maximum size of FQ1 should be 10GB and for FQ2 should be 20GB.After attaining maximum size,if someone copies more data,it should through an error.

Can i implement the same in rhel7.2.Filesystem of /FS is XFS

Regards

Last edited by Ankushkalra; 09-24-2018 at 09:51 AM. Reason: Proper info missing
 
Old 09-24-2018, 09:57 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,730

Rep: Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973
Quote:
Originally Posted by Ankushkalra View Post
Hi All,
I know we can enable quota on Filesysetem.I want to implement quota on folders inside filesystem for eg I have a filesystem /FS and two folder inside /FS namely /FS/FQ1 and /FS/FQ2.I want to enable quota on both folder such that maximum size of FQ1 should be 10GB and for FQ2 should be 20GB.After attaining maximum size,if someone copies more data,it should through an error. Can i implement the same in rhel7.2.Filesystem of /FS is XFS
How are these 'folders' shared??? If you're talking about local users, then your file system quotas are all that you have to work with. If they're shared out via Samba or NFS, you can address quotas for both users and folders that way. The Samba documentation has lots on smbcquotas.

Also, since you're using RHEL, you can contact Red Hat support for help with both file system and NFS quotas, and see the links in their knowledgebase...you have access to it with your paid subscription.
 
Old 09-24-2018, 10:02 AM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by Ankushkalra View Post
Hi All,

I know we can enable quota on Filesysetem.I want to implement quota on folders inside filesystem for eg I have a filesystem /FS and two folder inside /FS namely /FS/FQ1 and /FS/FQ2.I want to enable quota on both folder such that maximum size of FQ1 should be 10GB and for FQ2 should be 20GB.After attaining maximum size,if someone copies more data,it should through an error.

Can i implement the same in rhel7.2.Filesystem of /FS is XFS

Regards
XFS has the concept of project quota, which limit the disk blocks and inodes in a directory tree. This seems to fit your use case exactly.
 
Old 09-25-2018, 02:47 AM   #4
Ankushkalra
Member
 
Registered: Jan 2017
Posts: 48

Original Poster
Rep: Reputation: Disabled
Thanks all for the reply!!!

These folders are shared via samba shares.Could you please share some links for implementing quota on samba share?

Thanks again for the help

Regards
 
Old 09-25-2018, 06:07 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,730

Rep: Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973
Quote:
Originally Posted by Ankushkalra View Post
Thanks all for the reply!!!
These folders are shared via samba shares.Could you please share some links for implementing quota on samba share?
I gave you what you need to look at in my first reply. Read the "Question Guidelines" link.

We are happy to help you, but don't ask us to look things up for you, and hand you links.
 
Old 09-25-2018, 10:19 AM   #6
Ankushkalra
Member
 
Registered: Jan 2017
Posts: 48

Original Poster
Rep: Reputation: Disabled
Thanks all for the reply!!!


I manage to implement folder quota using below link

https://access.redhat.com/solutions/2025883

Maybe this link will help someone.

Anyways thanks for the help guys!!!
 
Old 09-25-2018, 10:25 AM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,730

Rep: Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973
Quote:
Originally Posted by Ankushkalra View Post
Thanks all for the reply!!!
I manage to implement folder quota using below link

https://access.redhat.com/solutions/2025883

Maybe this link will help someone. Anyways thanks for the help guys!!!
...and that is what berndbausch told you about. And that does NOT address Samba, but is rather implementing quotas on the Linux XFS filesystem directly, which is not what you asked. Post #2 told you what to look for for doing this in Samba, and it's well documented in the Samba documentation.
 
Old 09-26-2018, 03:06 AM   #8
Ankushkalra
Member
 
Registered: Jan 2017
Posts: 48

Original Poster
Rep: Reputation: Disabled
This is working in samba share as well.
 
Old 09-26-2018, 07:55 AM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,730

Rep: Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973
Quote:
Originally Posted by Ankushkalra View Post
This is working in samba share as well.
Yes, it is....but you're doing it on a filesystem level, when there's no need to. AGAIN, as you were told in post#2, there is a way to do this in Samba directly, WITHOUT putting more overhead on your filesystem. You were given the option to look at, but followed it up by asking us to look it up for you and hand you a link.

Your system; do what you want.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to limit max. number of folder can be created inside a folder Winanjaya Linux - General 4 08-01-2013 05:47 AM
[SOLVED] Better way to create a folder for each month, with another folder inside of each anon091 Linux - Newbie 9 12-03-2012 10:38 AM
Second level quota divyashree Linux - Virtualization and Cloud 0 07-19-2011 05:47 AM
Quota problems. Can't mount filesystem hamish Linux - Software 4 06-25-2004 09:56 AM
how can i default the max folder file size when it create inside a folder antony_csf Linux - Software 1 06-17-2004 02:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration