punkwalrus (punkwalrus) wrote,
punkwalrus
punkwalrus

LPI 101 Exam notes: 3 days to exam

Since I goof off and LJ so much, I have decided to hijack the process and write my study notes and thoughts. But they are probably totally boring for those not interested in Linux. These notes may be very long and disjointed, so... I put them...

For those interested, think there needs to be corrections, have neat trivia, or have some things to say: COMMENTS ARE ENCOURAGED!!!
___________
Man, I am in the home stretch. I am so close to this exam, I can feel it breathing down my neck.

All my life, all I ever had for a Linux system was either I was admin, or admin and sole owner of the box. /home was almost always a separate partition, and when my users used up too much space, I just deleted stuff. Even back in the days when I had 1.2gb drives, I usually ran out of space in /var because of some runaway mail spooling or apache logs. But Linux has had the ability to mange user quotes all along... just click my ruby slippers...

First, you have to set quotas on the disk using fstab (Fle system table), like so:

/dev/hda4  /home  ext3  defaults,usrquota,grpquota 1 2


Then you have to create TWO files:

/home/quota.user
/home/quota.group

chmod both to 600 so they are only r/w by owner (root)

Run quotacheck -auvg and wait for it to build those two databases above. Then run quotaon -a to turn on the disk quota (that is, enforce it). Then you have to mkake sure that at boot, the policy is still enforced in rc.sysint or something else in the /etc/init.d directory.

Then, for good measure, put in the quotacheck command in a weekly run script to check on user quotas.

So now what? Well, you have four options: group soft and hard limits, and user soft and hard limits.

Soft limits are warnings you are about to reach the hard limit, so you should have the soft limts be lower than the hard ones, obviously. It has a Grace Period.

Hard limits are the end of the road, budyy. No more inodes or disk space for yuo! This is a 1.2gb hard drive for over 50 students! SEIG HEIL!

The grace period is the time during which the soft limit may be exceeded. The grace period can be expressed in seconds, minutes, hours, days, weeks, or months, giving the system administrator a great deal of freedom in determining how much time to give users to get their disk usage below their soft limit.

quota -u user_id will show you the user quotas
quota -q will show you who's over the limit

edquota -u user_id will launch vi to edit the quotas for the user, mien fuhrer.
edquota -t will launch vi to edit the grace period
edquota -g group_ID will launch vi to edit the quotas for the group (duh)

repquota produces a summarized quota information for a file system. Here is a sample output repquota gives:
# repquota -a 
                                Block limits               File limits 
        User            used    soft    hard  grace    used  soft  hard  grace 
        root      --  175419       0       0          14679     0     0 
        bin       --   18000       0       0            735     0     0 
        uucp      --     729       0       0             23     0     0 
        man       --      57       0       0             10     0     0 
        user1     --   13046   15360   19200            806  1500  2250 
        user2     --    2838    5120    6400            377  1000  1500


Zat ees not FUNNI!

quotaoff -av turns off quotas, which you may need from time to time if things get stuck or you get sick of the whole NAZI mess.

Oh, crap, I enacted Godwin's Law. This post has to end now, and I lost the entry.

__________
Disclaimer: While I have been managing Linux systems for almost 10 years now, but I am mostly self-taught. I have a RHCT certification, but I am taking the LPI and CompTIA Linux+ exams to "flesh out" some of the gaps that occur from too much real-world experience versus my lack of good old fashioned book learnin'. This entry in no way assures you my thoughts are correct, I will have frequent misspellings, and they may or may not help you pass the LPI. HUGE parts of the exam will be missing because I already know half of it by heart, so using me as your only study guide is a terrible idea. Please read this entry with a healthy amount of skepticim, and PLEASE feel free to correct or add comments! My ego is hardy enough to admit when I am wrong.
Tags: linux, lpi
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments