Disk Quota
Disk Quotas are used to limit a user's or a group of users' ability to consume disk space. This prevents a small group of users from monopolizing disk capacity and potentially interfering with other users or the entire system.Disk quotas are commonly used by ISPs, by Web hosting companies, on FTP sites, and on corporate file servers to ensure continued availability of their systems. Using disk quota administrator can restrict user in two ways :-
1. Restricting user or group by creating files in a specific location.
2. Restricting user or group by the disk space in a specific location.
Disk Quota Terms
1. Soft Link = Disk space a user can use
2. Hard Link = Absolute limit a user can use
3. Grace Periods = Time duration till user can use hard limit space
4. 1 inode = 1KB
5. dd = used to create a blank file of specific size
6. required RPM = quata-*
7. /etc/fstab option = userquota, grpquota
8. Quota files = aquota.user. aquota.group
9. Necessary Commands = mount, quotarun, quotacheck, edquota, quotaoff, quotaon
1. To set quota on user.
[root@server1 ~]#useradd usr1
[root@server1~]# passwd usr1
Changing password for user username.
New password: * * * * *
BAD PASSWORD: it is based on a directory word
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication token updated successfully.
[root@server1 ~]#vi /etc/fstab
UUID=2f3r7yf8-bd9h-56tf-h8gt-45df12g74fdv /home ext4 defaults,usrquota 1 2
:wq!
[root@server1 ~]#mount
/dev/sda5 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
/dev/sda1 on /boot type ext4 (rw)
/dev/sda7on /home type ext4 (rw)
/dev/sda8 on /tmp type ext4 (rw)
/dev/sda2 on /usr type ext4 (rw)
/dev/sda3 on /var type ext4 (rw)
/dev/sda9 on /example type ext4 (rw)
[root@server1 ~]#mount -o remount /home
[root@server1 ~]#mount
dev/sda5 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
/dev/sda1 on /boot type ext4 (rw)
/dev/sda7on /home type ext4 (rw,usrquota)
/dev/sda8 on /tmp type ext4 (rw)
/dev/sda2 on /usr type ext4 (rw)
/dev/sda3 on /var type ext4 (rw)
/dev/sda9 on /example type ext4 (rw)
[root@server1 ~]#touch /home/aquota.user
[root@server1 ~]#quotacheck -vc /home
[root@server1 ~]#repquota -a
Block Limits File Limits
User used soft hard grace used soft hard grace
root -- 24 0 0 3 0 0 0
cms -- 36 0 0 9 0 0 0
usr1 -- 32 0 0 8 0 0 0
usr2 -- 32 0 0 8 0 0 0
usr3 -- 32 0 0 8 0 0 0
[root@server1 ~]#quotacheck -vc /home
[root@server1 ~]#quotaon -v /home
[root@server1 ~]#setquota –u usr1 256 512 0 0 /home
Username Mini Maxi Mini Maxi Mount Point
Block Block File File to set Quota
Limit Limit Limit Limit
[root@server1 ~]#repquota -a
Block Limits File Limits
User used soft hard grace used soft hard grace
root -- 24 0 0 3 0 0 0
cms -- 36 0 0 9 0 0 0
usr1 -- 32 256 512 8 0 0 0
usr2 -- 32 0 0 8 0 0 0
usr3 -- 32 0 0 8 0 0 0
[root@server1 ~]#
Now login with that user3 from another console.
Server1 Login : usr1
Password: ******
[use3@server1 ~]$dd if=/dev/zero of=file1 bs=1K count=100
100+0 records in
100+0 records out
102400 bytes (102 kB) copied, 0.000875702 s, 117 MB/s
[use3@server1 ~]$ll
-rw-rw-r--. 1 usr1 usr1 102400 Jun 20 07:05 file1
[use3@server1 ~]$dd if=/dev/zero of=file1 bs=1K count=300
300+0 records in
300+0 records out
307200 bytes (307 kB) copied, 0.0142128 s, 21.6 MB/s
[use3@server1 ~]$ll
-rw-rw-r--. 1 usr1 usr1 307200 Jun 20 07:05 file1
[use3@server1 ~]$dd if=/dev/zero of=file1 bs=1K count=500
Dd: writing ‘file1’ : Disk quota exceeded
477+0 records in
476+0 records out
487424 bytes (487 kB) copied, 0.0057277 s, 85.1 MB/s
[use3@server1 ~]$ll
-rw-rw-r--. 1 usr1 usr1 487424 Jun 20 07:05 file1
[use3@server1 ~]$
CTRL+D ……..to log out from usr1
Server1 Login :root
Password: ******
[root@server1 ~]#repquota -a
Block Limits File Limits
User used soft hard grace used soft hard grace
root -- 24 0 0 3 0 0 0
cms -- 36 0 0 9 0 0 0
usr1 -- 32 256 512 6days 0 0 0
usr2 -- 32 0 0 8 0 0 0
usr3 -- 32 0 0 8 0 0 0
2. To set same quota limit on multiple user.
[root@server1 ~]#useradd usr2
[root@server1~]# passwd usr2
Changing password for user username.
New password: * * * * *
BAD PASSWORD: it is based on a directory word
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication token updated successfully.
[root@server1 ~]#useradd usr3
[root@server1~]# passwd usr3
Changing password for user username.
New password: * * * * *
BAD PASSWORD: it is based on a directory word
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication token updated successfully.
[root@server1 ~]#vi /etc/fstab
UUID=2f3r7yf8-bd9h-56tf-h8gt-45df12g74fdv /home ext4 defaults,usrquota 1 2
:wq!
[root@server1 ~]#mount
/dev/sda5 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
/dev/sda1 on /boot type ext4 (rw)
/dev/sda7on /home type ext4 (rw)
/dev/sda8 on /tmp type ext4 (rw)
/dev/sda2 on /usr type ext4 (rw)
/dev/sda3 on /var type ext4 (rw)
/dev/sda9 on /example type ext4 (rw)
[root@server1 ~]#mount -o remount /home
[root@server1 ~]#mount
dev/sda5 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
/dev/sda1 on /boot type ext4 (rw)
/dev/sda7on /home type ext4 (rw,usrquota)
/dev/sda8 on /tmp type ext4 (rw)
/dev/sda2 on /usr type ext4 (rw)
/dev/sda3 on /var type ext4 (rw)
/dev/sda9 on /example type ext4 (rw)
[root@server1 ~]#touch /home/aquota.user
[root@server1 ~]#quotacheck -vc home
[root@server1 ~]#repquota -a
Block Limits File Limits
User used soft hard grace used soft hard grace
root -- 24 0 0 3 0 0 0
cms -- 36 0 0 9 0 0 0
usr1 -- 32 0 0 8 0 0 0
usr2 -- 32 0 0 8 0 0 0
usr3 -- 32 0 0 8 0 0 0
[root@server1 ~]#quotacheck -vc /home
[root@server1 ~]#quotaon -v /home
/dev/sda7 [/home]: user quotas turned on
[root@server1 ~]#setquota –u usr2 256 512 0 0 /home
Username Mini Maxi Mini Maxi Mount Point
Block Block File File to set Quota
Limit Limit Limit Limit
[root@server1 ~]#edquota –p usr2 usr3
Username another
to whome userto
quota is set same
set quota as user2
[root@server1 ~]#repquota -a
Block Limits File Limits
User used soft hard grace used soft hard grace
root -- 24 0 0 3 0 0 0
cms -- 36 0 0 9 0 0 0
usr1 -- 32 0 0 8 0 0 0
usr2 -- 32 256 512 8 0 0 0
usr3 -- 32 256 512 8 0 0 0
[root@server1 ~]#
Now login with that usr2 from another console.
Server1 Login : usr2
Password: ******
[usr2@server1 ~]$dd if=/dev/zero of=file1 bs=1K count=100
100+0 records in
100+0 records out
102400 bytes (102 kB) copied, 0.000875702 s, 117 MB/s
[usr2@server1 ~]$ll
-rw-rw-r--. 1 usr2 usr2 102400 Jun 20 07:05 file1
[usr2@server1 ~]$dd if=/dev/zero of=file1 bs=1K count=300
300+0 records in
300+0 records out
307200 bytes (307 kB) copied, 0.0142128 s, 21.6 MB/s
[usr2@server1 ~]$ll
-rw-rw-r--. 1 usr2 usr2 307200 Jun 20 07:05 file1
[usr2@server1 ~]$dd if=/dev/zero of=file1 bs=1K count=500 ………
Dd: writing ‘file1’ : Disk quota exceeded
477+0 records in
476+0 records out
487424 bytes (487 kB) copied, 0.0057277 s, 85.1 MB/s
[usr2@server1 ~]$ll
-rw-rw-r--. 1 usr2 usr2 487424 Jun 20 07:05 file1
[use2@server1 ~]$
CTRL+D ……..to log out from usr2
Now login with that usr3.
Server1 Login : usr3
Password: ******
[usr3@server1 ~]$dd if=/dev/zero of=file1 bs=1K count=100
100+0 records in
100+0 records out
102400 bytes (102 kB) copied, 0.000875702 s, 117 MB/s
[usr3@server1 ~]$ll
-rw-rw-r--. 1 usr3 usr3 102400 Jun 20 07:05 file1
[use3@server1 ~]$dd if=/dev/zero of=file1 bs=1K count=300
300+0 records in
300+0 records out
307200 bytes (307 kB) copied, 0.0142128 s, 21.6 MB/s
[usr3@server1 ~]$ll
-rw-rw-r--. 1 usr3 usr3 307200 Jun 20 07:05 file1
[usr3@server1 ~]$dd if=/dev/zero of=file1 bs=1K count=500
Dd: writing ‘file1’ : Disk quota exceeded
477+0 records in
476+0 records out
487424 bytes (487 kB) copied, 0.0057277 s, 85.1 MB/s
[usr3@server1 ~]$ll
-rw-rw-r--. 1 usr3 usr3 487424 Jun 20 07:05 file1
[usr3@server1 ~]$
CTRL+D ……..to log out from usr3
Now login with root.
Server1 Login : root
Password: ******
[root@server1 ~]#repquota -a
Block Limits File Limits
User used soft hard grace used soft hard grace
root -- 24 0 0 3 0 0 0
cms -- 36 0 0 9 0 0 0
usr1 -- 32 0 0 8 0 0 0
usr2 -- 32 256 512 6days 0 0 0
usr3 -- 32 256 512 6days 0 0 0
Its a great pleasure reading your post.Its full of information I am looking for and I love to post a comment that "The content of your post is awesome" Great work
ReplyDeletehttp://www.stpetehealth.com |
Τhere is definately a great deal to learn ɑbout this issue. Ι love all of the points you've madе.
ReplyDeletewww.business-rating.org |
Wow what a Great Information about World Day its very nice informative post. thanks for the post.
ReplyDeletehousesineastoxford.com |
You might write about the services on the blog. You should disclose it's refreshing. Your blog conclusion could accelerate your shoppers.
ReplyDeletehttp://www.servissimbusiness.com |
I think this is definitely an amazing project here. So much good will be coming from this project. The ideas and the work behind this will pay off so much.
ReplyDeletewww.autoacross.com |
Your blog is very popular! This paper content rich and colorful, adopt unique writing thinking.I think they will like to see this article.
ReplyDeletewww.autoinjurywis.com |
You’ve got some interesting points in this article. I would have never considered any of these if I didn’t come across this. Thanks!.
ReplyDeletewww.leadcubetechnologies.com |
Valuable very touchable information. I would like to thank you for sharing your great facts.
ReplyDeletehardwarecolombia |
I really loved reading your blog. It was very well authored and easy to understand.
ReplyDeletehttp://www.empower13.com |
I am very happy to discover your post as it will become on top in my collection of favorite blogs to visit.
ReplyDeletesoftware4airlines |
I was suggested this blog by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my difficulty. You are wonderful! Thanks!
ReplyDeleteCool Business Rooms |
The short story is very “realistic”, bearing in mind Reddock camp in Gothic 3
ReplyDeletehttp://www.azheartcare.com |
Wow what a Great Information about Worlnewfairfieldhealth.com |
ReplyDeleted Day its very nice informative post. thanks for the post.
Great article Lot's of information to Read...Great Man Keep Posting and update to People..Thanks
ReplyDeletewww.hpp-hardware.com |
Stir back over the heat for two minutes, add extra seasoning and red chilli to taste and then add the chopped coriander just before putting the chutney into clean jam jars.
ReplyDeletewww.canarias-auto.com |
In my last post, I showed you how to hook up the new dojo grid component to a RESTful resource in Rails. Now we're ready to make it editable. I promise this will be a shorter post than last time. The key piece is making a new model object to handle our edits. The dojo grid already provides the key pieces to make editing happen; we just need to provide a way to pass the edited values into our Jester-made object to send them along to our application. The way we do this is by creating our own model class which extends dojox.grid.data.Objects. Then we create an instance of this class. This is what the code looks like:
ReplyDeleteCobalt Fish Food |
This is a smart blog. I mean it. You have so much knowledge about this issue, and so much passion
ReplyDeletewww.ezy-auto.com |
Do you mind if I quote a couple of your articles as long as I provide credit and sources back to your blog? My blog is in the very same area of interest as yours and my users would certainly benefit from some of the information you provide here. Please let me know if this alright with you. Thanks a lot!
ReplyDeletehttp://www.azheartcare.com |
Wow, this post is pleasant, my younger sister is analyzing these things, so I am going to tell her.
ReplyDeletehttp://www.mfitnesslonetree.com |
Hey there! This is my first visit to your blog! We are a collection of volunteers and starting a new project in a community in the same niche. Your blog provided us useful information to work on. You have done a extraordinary job!
ReplyDeletethemotechnetwork |
It's very easy to find out any topic on net as compared to textbooks, as I found this article at this website.
ReplyDeleteepagreenhouse |
To harmonize, to love, to children growing up with both parents complete facebook entrar a mi perfil , facebook entrar a mi cuenta , facebook login , facebook entrar , facebook entrar , facebook entrar
ReplyDelete2015-07-21song
ReplyDeletecheap soccer jerseys
pandora charms
kate spade bags
cheap jordans free shipping
ray ban sunglasses
cheap jordans uk
hollister outlet
polo ralph lauren uk
michael kors handbags
ray ban outlet
coach outlet
longchamp pliage
chanel handbags
oakley sunglasses wholesale
ralph lauren pas cher
michael kors handbags
cheap beats by dre
ray bans
air force pas cher
gucci bags
burberry outlet
ray ban sunglasses
abercrombie and fitch
michael kors
ray ban outlet
air max uk
replica watches rolex
nike pas cher
cheap oakley sunglasses
michael kors bags
soccer shoes for sale
soccer outlet
true religion jeans
gucci outlet
burberry outlet online
keep sharing such ideas in the future as well.
ReplyDeletedescargar mobogenie gratis | baixar facebook gratis | mobogenie baixar | facebook descargar | facebook descargar gratis | mobogenie descargar | whatsapp descargar gratis and gratis whatsapp | juegos kizi
I like this article, I see a lot of people visit it. I think it is a quality article and interesting. baixar facebook gratis , facebook baixar , baixar whatsapp gratis , whatsapp baixar , facebook descargar , descargar facebook gratis , descargar whatsapp gratis , descargar whatsapp gratis , baixar mobogenie gratis , baixar mobogenie gratis , mobogenie market
ReplyDeleteGreat! Thanks for sharing the information. That is very helpful for increasing my knowledge in this fiel
ReplyDeleteA good blog. Thanks for sharing the information. It is very useful for my future. keep sharing
Signature:
Red Ball | red ball 2 | Red Ball 3 | Red Ball 4 | duck life
Flash Games| Tank trouble | happy wheels |
Slitherio | Slither io
coach outlet store online clearance
ReplyDeletenike blazer low pas cher
coach factory outlet online
yeezy boost 350
birkenstock uk
timberland shoes
ugg boots
michael kors
cheap jerseys
uggs canada
zhi20161228
cheap jordans
ReplyDeleteoakley sunglasses outlet
michael kors outlet online sale
cheap ray bans
nike roshe flyknit
michael kors handbags
burberry outlet
jordan shoes
prada outlet
air jordan
2017.3.2chenlixiang
adidas nmd r1
ReplyDeletemont blanc pens
michael kors outlet
polo ralph lauren outlet
mlb jerseys
michael kors outlet store
gucci
adidas yeezy boost
michael kors handbags outlet
coach outlet store
170602yueqin
This comment has been removed by the author.
ReplyDeleteThat helps many teams to be more efficient.
ReplyDeleteadidas nmd r1
ReplyDeletemoncler coats
ugg outlet online
ralph lauren sale
kate spade handbags
christian louboutin shoes
mulberry outlet uk
cheap oakley sunglasses
ray ban sunglasses outlet
tods shoes
cc0509
prada sunglasses
ReplyDeletesupreme
mlb jerseys
ralph lauren outlet
ray ban sunglasses
north face jackets
nike air max 270
curry jersey
van cleef & arpels
victoria's secret
20187.14chenjinyan
dolce & gabbana
ReplyDeletesac guess
jordan 4
new balance trainer
ralph lauren outlet
miu miu shoes
links of london
furla handbags
jordan 8
swarovski crystal
2018.7.30chenlixiang
lebron 15
ReplyDeleteversace bags
ugg boots
polo ralph lauren
basketball shoes
louboutin
nike flight bonafide
burberry
ralph lauren
mlb jerseys
201810.12chenjinyan
ReplyDeleteBook Best and Verified packers and movers in Pune, Expert in Home Relocation within or outside Pune. Compare 3 quotes from nearby packers and movers in Pune. Get 100% safe & affordable packing moving from Professional Packers and Movers.
Packers and Movers in Pune
Enjoyed reading the article above , really explains everything in detail,the article is very interesting and effective.Thank you and good luck for the upcoming article @ Packers and Movers Ahmedabad
ReplyDelete