Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

1176

March 30th, 2012 10:00

How to create File system quotas easily ?

I need your help, l need to create more than 1200 new file system quotas on EMC nas. Someone know how to do that ? Do you have a script example ?

9 Legend

 • 

20.4K Posts

April 2nd, 2012 09:00

so let's say you used notepad on a windows machine to create a list of users

bob

john

steve

1) scp this file to the control station

2) run "dos2unix yourfile.txt"    ...this will get rid of control characters in the file

3) whenever you run quota commands you ommit the root file, for example if your file system is mounted like this:

/HOME

and you need to create 3 directories for bob, john and steve ..your would run a simple for loop, ie:

for i in `cat yourfile.txt`

do

echo "Create quota for user $i"

nas_quotas -on -tree -fs fs123 -path /$i

done

as you can see, i am not specying /HOME in the path because that's already assumed of how fs123 is mounted. So the 3 directories will be created in the root for HOME folder.

does it help ?

4 Operator

 • 

8.6K Posts

March 30th, 2012 10:00

See „man nas_quotas“

9 Legend

 • 

20.4K Posts

March 30th, 2012 13:00

little bash script will get the job done

9 Legend

 • 

20.4K Posts

March 30th, 2012 13:00

i think you already said that 3 hours ago, we got you the first time . How about you write a little bash script for our friend here ?

5 Posts

April 2nd, 2012 07:00

nobody have an example ?

5 Posts

April 2nd, 2012 07:00

yes

ex:  \home\user1

9 Legend

 • 

20.4K Posts

April 2nd, 2012 07:00

what format is you input file? A text file with names of directories ?

5 Posts

April 2nd, 2012 09:00

Yes. new tree quota

9 Legend

 • 

20.4K Posts

April 2nd, 2012 09:00

tree quotas ?

5 Posts

April 2nd, 2012 12:00

Thanks Dynamox

No Events found!

Top