Slide

  • LINUX

    LINUX:In 1969 AT&T made a decision to withdraw Multics and go with GECOS (General Electric Comprehensive Operating Supervisor / System), with AT & T in Bells Lab when Multics was withdrawn some of the programmers named Ken Thompson and Dennis Ritchie decided to rewrite operating system in order to support low cost computer..To Know More

    CLICK HERE

  • MICROSOFT

    MICROSOFT:Microsoft was established to develop and sell BASIC interpreters for the Altair 8800. It rose to dominate the home computer operating system market with MS-DOS in the mid-1980s,followed by the Microsoft Windows line of operating systems. To Know More

    CLICK HERE

  • CISCO

    CISCO:During the early 1980s, there was a married couple namely Len and Sandy Bosack who used to work in two different departments of computer located in Stanford University. This couple was facing problem in making their computers communicate with each other To Know More

    CLICK HERE

showinfo=1

Disk Quota


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.
CTRL+ALT+F2
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.
CTRL+ALT+F2
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




38 comments:

  1. 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
    http://www.stpetehealth.com |

    ReplyDelete
  2. Τhere is definately a great deal to learn ɑbout this issue. Ι love all of the points you've madе.
    www.business-rating.org |

    ReplyDelete
  3. Wow what a Great Information about World Day its very nice informative post. thanks for the post.
    housesineastoxford.com |

    ReplyDelete
  4. You might write about the services on the blog. You should disclose it's refreshing. Your blog conclusion could accelerate your shoppers.
    http://www.servissimbusiness.com |

    ReplyDelete
  5. 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.
    www.autoacross.com |

    ReplyDelete
  6. Your blog is very popular! This paper content rich and colorful, adopt unique writing thinking.I think they will like to see this article.
    www.autoinjurywis.com |

    ReplyDelete
  7. 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!.
    www.leadcubetechnologies.com |

    ReplyDelete
  8. Valuable very touchable information. I would like to thank you for sharing your great facts.
    hardwarecolombia |

    ReplyDelete
  9. I really loved reading your blog. It was very well authored and easy to understand.
    http://www.empower13.com |

    ReplyDelete
  10. I am very happy to discover your post as it will become on top in my collection of favorite blogs to visit.
    software4airlines |

    ReplyDelete
  11. 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!
    Cool Business Rooms |

    ReplyDelete
  12. The short story is very “realistic”, bearing in mind Reddock camp in Gothic 3
    http://www.azheartcare.com |

    ReplyDelete
  13. Wow what a Great Information about Worlnewfairfieldhealth.com |

    d Day its very nice informative post. thanks for the post.

    ReplyDelete
  14. Great article Lot's of information to Read...Great Man Keep Posting and update to People..Thanks 
    www.hpp-hardware.com |

    ReplyDelete
  15. 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.
    www.canarias-auto.com |

    ReplyDelete
  16. 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:
    Cobalt Fish Food |

    ReplyDelete
  17. This is a smart blog. I mean it. You have so much knowledge about this issue, and so much passion 
    www.ezy-auto.com |

    ReplyDelete
  18. 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!
    http://www.azheartcare.com |

    ReplyDelete
  19. Wow, this post is pleasant, my younger sister is analyzing these things, so I am going to tell her.
    http://www.mfitnesslonetree.com |

    ReplyDelete
  20. 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!
    themotechnetwork |

    ReplyDelete
  21. It's very easy to find out any topic on net as compared to textbooks, as I found this article at this website. 
    epagreenhouse |

    ReplyDelete
  22. This is a great web site. Good sparkling user interface and very informative blogs. I will be coming back in a bit, thanks for the great article. I have found it enormously useful..
    unblockedgames| unblocked games at school| friv 4 school| friv4school| free online games| free online games| unblocked tetris| tetrisgames| monster high games| play monster high games| jogos da barbie| kizi

    ReplyDelete
  23. Great! Thanks for sharing the information. That is very helpful for increasing my knowledge in this fiel
    A 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

    ReplyDelete

  24. شركة نقل عفش بالدمام الشرق الاوسط متحصصه فى نقل عفش واثاث بالدمام ونقل العفش بالخبر كما انها توفر شركة نقل عفش بالجبيل والخبر وشركة نقل عفش بالقطيف والاحساء وجميع خدمات نقل العفش والاثاث بالمنطقة الشرقية بارخص اسعار نقل عفش بالدمام وتقدم ايضا شركة تخزين عفش بالدمام والخبر
    نقل عفش بالدمام
    شركة نقل اثاث بالدمام
    شركة نقل اثاث بالخبر
    شركة نقل اثاث بالجبيل
    شركة نقل عفش بالخبر
    شركة نقل عفش بالقطيف
    شركة نقل اثاث بالاحساء

    ReplyDelete

  25. شركة تنظيف خزانات بالمدينة المنورة وشقق بالمدينة المنورة شركة غسيل خزانات ومكافحة حشرات بالمدينة المنورة ونقل عفش بالمدينة المنورة مؤسسة صفوة المدينة
    شركة تنظيف خزانات بالمدينة المنورة
    شركة مكافحة حشرات بالمدينة المنورة مؤسسة صفوة المدينة انها الاولى فى مكافحة ورش الحشرات بالمدينة المنورة رش البق رش الصراصير مكافحة النمل الابيض بالمدينة المنورة
    شركة مكافحة حشرات بالمدينة المنورة

    ReplyDelete
  26. A child asked God: "If everything was written in fate so why should the convention?".
    Friv 2 | Unblocked Games | Yepi 2 | Unblocked | Xbox One

    ReplyDelete
  27. Packers and Movers Bangalore, Get Best Price Quotes List, Affordable Charges Local Household Shifting Services Bangalore at
    Packers And Movers Bangalore

    ReplyDelete
  28. I'm puzzled with lots of exercises. I was afraid I could not do the right time despite my hard work. I need a support person.
    http://run3play.com

    ReplyDelete
  29. This blog is so nice to me. I will continue to come here again and again. Visit my link as well. Good luck
    obat aborsi
    cara menggugurkan kandungan
    cara menggugurkan kandungan

    ReplyDelete

Note:- Comment as: Option available to post without login select "Anonymous" from the drop down...........

For Latest Updates: Subscribe Now | | Test Your Knowledge, Take a Quiz now Click Here | | Site Best Viewed In Firefox

X