tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: language bindings (fs-independent quotas)



On Fri, 18 Nov 2011, Manuel Bouyer wrote:
Assuming that there's no need to handle fields with embedded spaces, perl's split() function will DTRT.

No, it does not because there are fields that can be empty.

The common way of dealing with that is to have a placehloder like "-" for empty fields.

By the way, I still haven't figured out how to test any of this quota stuff. "quotaon /" followed by "edquota -f /" does nothing (no error message, and no useful result). Using the device name "/dev/cgd1a" instead of the file system name "/" does not help.

what are you trying to do ?

I am just trying to enable quotas so that I can test some of the
quota-related commands.

quotaon won't do anything if / doesn't have the userquota or groupquota keyword in the fstab, and you have to run quotacheck before quotaon. This is for ufs-quota1.

I don't see that in the quotaon(8) man page.

"The filesystems specified must have entries in /etc/fstab and be mounted."

I have that.

"quotaon expects each filesystem to have quota files named quota.user and quota.group which are located at the root of the associated file system. These defaults may be overridden in /etc/fstab. By default both user and group quotas are enabled."

I interpreted that as "by default, quotaon will just work".

Anyway, when I run quotacheck, it complains:

$ sudo quotacheck /
quotacheck: / not found in /etc/fstab

I do have an entry for "/" in /etc/fstab:

from_mount      /               ffs     rw,log                  1 0

This is in a chroot, and the actual device name is /dev/cgd1a,
but fstab doesn't know that.

For ufs-quota2, quotas are enabled at newfs time, or with tunefs (with
the later this has to be done on a read-only mounted filesystem, and you
have to run fsck before mounting R/W). quotaon won''t do anything
for ufs-quota2.

The quotaon(8) man page does not say that it's only for some file
system types, and does not refer to newfs, tunefs, or fsck.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index