This post is more than 5 years old
5 Posts
0
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 ?
No Events found!
dynamox
9 Legend
•
20.4K Posts
0
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 ?
Rainer_EMC
4 Operator
•
8.6K Posts
0
March 30th, 2012 10:00
See „man nas_quotas“
dynamox
9 Legend
•
20.4K Posts
0
March 30th, 2012 13:00
little bash script will get the job done
dynamox
9 Legend
•
20.4K Posts
0
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 ?
Bergos
5 Posts
0
April 2nd, 2012 07:00
nobody have an example ?
Bergos
5 Posts
0
April 2nd, 2012 07:00
yes
ex: \home\user1
dynamox
9 Legend
•
20.4K Posts
0
April 2nd, 2012 07:00
what format is you input file? A text file with names of directories ?
Bergos
5 Posts
0
April 2nd, 2012 09:00
Yes. new tree quota
dynamox
9 Legend
•
20.4K Posts
0
April 2nd, 2012 09:00
tree quotas ?
Bergos
5 Posts
0
April 2nd, 2012 12:00
Thanks Dynamox