Solved

quotas and kernel recompile

Posted on 2004-09-02
14
806 Views
Last Modified: 2013-11-22
I'm trying to enable quotas on my FreeBSD box.  Quotas weren't compiled in my kernel, so I added the "options QUOTA" line to the GENERIC kernel, and then in /usr/src:
make buildkernel KERNELCONF=GENERIC
make installkernel KERNELCONF=GENERIC
reboot

I had done a make buildworld before this, and this is the pertinent part of my /etc/fstab:
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/da0s1g             /usr            ufs     rw,userquota,groupquota
2       2

And I've added these lines to /etc/rc.conf:
enable_quotas="YES"
check_quotas="YES"

So it rebooted and everything seems to be fine.  This is my uname -a:
ftp01# uname -a
FreeBSD ftp01.mydomain.com 4.8-RELEASE FreeBSD 4.8-RELEASE #0: Thu Apr  3 10:53:38 GMT 2003     root@freebsd-stable.sentex.ca:/usr/obj/usr/src/sys/GENERIC  i386

It appears to be running the right kernel, and I was able to do a checkquota -a successfully.  But when I do quotaon -a, I get this:
quotaon: using /usr/quota.group on
quotaon: /usr: Operation not supported
quotaon: using /usr/quota.user on
quotaon: /usr: Operation not supported

And if I try to do a edquota user, it tells me "warning: quotas are not compiled into this kernel."

So how do I make sure that the kernel I think I'm running is actually the one I am running?   And if I'm running the kernel I think I am, why are quotas not working?

Thanks!
Blair
0
Comment
Question by:brownlb
  • 5
  • 4
  • 2
14 Comments
 
LVL 1

Expert Comment

by:kolyakarpov
ID: 11966871
Hmm, looks like default kernel, strange...

Try next:
# cd /usr/src/sys/i386/conf
# config GENERIC
# cd ../../compile/GENERIC  
// maybe there must be cd ../compile/GENERIC - i don't remember path in 4.8
# make depend && make && make install && make clean
# reboot

This line shows that your custom built kernel wasn't installed:
FreeBSD ftp01.mydomain.com 4.8-RELEASE FreeBSD 4.8-RELEASE #0
0
 

Author Comment

by:brownlb
ID: 11967020
What would uname say if it WAS the custom kernel?

I'm going to have to try the reboot and all after hours.  It's a production server.

Thanks!
0
 

Author Comment

by:brownlb
ID: 11967074
Here's what I get on the first step:
ftp01# cd /usr/src/sys/i386/conf/
ftp01# ls
CUSTOM          GENERIC.hints   Makefile        OLDCARD         gethints.awk
GENERIC         GENERIC.prev    NOTES           PAE
ftp01# config GENERIC
../../conf/files: coda/coda_fbsd.c must be optional, mandatory or standard
Your version of config(8) is out of sync with your kernel source.

And that path was right:
ftp01# cd ../compile/GENERIC
../compile/GENERIC: No such file or directory.

Does that mean I have to do another make buildworld?  I had to do that once already, and I disabled my cvsup cron so I wouldn't have to do it again until I get the quotas working.  I don't completely understand why I had to do a buildworld in the first place.
0
 
LVL 1

Expert Comment

by:kolyakarpov
ID: 11967075
Date of kernel  built is 2003 - a bit strange :) But i'm not sure at 100%

Hmmm, try next:

Rebuild kernel, but with other name:

# cd /usr/src/sys/i386/conf/
# cp GENERIC SERVER
# vi SERVER
Change IDENT string.
Then config and make

Quotas work as well, a bit strange why there're problems with them.
0
 

Author Comment

by:brownlb
ID: 11967249
Actually, that was the first thing I tried.  Let me go back a few days:

The first kernel I did I called CUSTOM.  It was a copy of GENERIC with the quota line added.
I didn't know that there was an IDENT string at the time, so I wasn't sure that it had taken since it still had the name GENERIC.  So I did it all over again, this time changing the IDENT string in CUSTOM to CUSTOM.  After I config'd and made the new kernel, it still said GENERIC.  So then, even though I didn't think it would work, I just changed the GENERIC kernel to include the quota line.  It apparently didn't take either since quotas still aren't compiled.

So now I've rebuilt the kernel no less than 3 times, and apparently it hasn't taken once.  I've watched after the reboot, looking for errors, and haven't seen any.  What would it look like if the kernel failed to load?  Would it just go back to the old one without telling me?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Expert Comment

by:kolyakarpov
ID: 11967362
Other problem - you have kernel and world out of sync so
you must do make installworld, mergemaster - but it's a bit dangerous so you're on your own ;)
0
 

Author Comment

by:brownlb
ID: 11967713
So if I get everything back in sync, what will I see at bootup if the kernel I've selected fails.  And will I see anything if just one thing fails?  Such as the quotas...
0
 
LVL 1

Expert Comment

by:kolyakarpov
ID: 11967739
you'll get an error and no promt i think - in worth case
but you will be able to boot old kernel - i'll recomend you reading http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
0
 
LVL 61

Expert Comment

by:gheist
ID: 11984857
Not sure how you messed up your system, but one thing is missing


/etc/fstab must have userquota=user.quota,groupquota=group.quota at least to have any effect of quotas from quota enabling.
0
 

Author Comment

by:brownlb
ID: 12217442
Since this is a production box, and I don't want to disturb it, I installed 4.10 on a totally different box, and quotas compile fine.  
0
 
LVL 61

Accepted Solution

by:
gheist earned 500 total points
ID: 12220732
Then something was messed up with sources, see CVSup section pf www.freebsd.org/handbook on how to bring your production box sources to RELENG_4_8 - the consistent set that builds with quotas etc ( "make depend" is always required, even when you do not think so )
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
what is the meaning of filesystem loop detected? 7 946
Parsing a file using ksh 10 58
help pulling data string using Awk 9 63
SQUD PROXY SERVER, UNIX, SLL/HTTPS 5 76
Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now