Having installed our quota‑tools and the kernel modules,
we can now turn our attention to configuring quotas.
That would be a great idea, wouldn't it?
Well, what do we actually need to do?
Well, the first thing is to understand that quotas are configured per filesystem.
Now we only have one filesystem of the root filesystem,
so that's where we're going to be working.
We can set mount options within our etc and fstab file.
We'll be editing and adding in the usrquotas and the
grpquotas for wherever our root filesystem is.
We can then remount our root filesystems, so these become effective options.
Having done that,
we can then go through and double‑check they're actually showing.
Now my root filesystem is ext4.
Yours might be different.
But we can then go through and use mount ‑t to drill down
to only look at the ext4 filesystems,
and we should be able to be displayed those mount options.
So if that's all good to go, then we can move on to the next step.
Our next step then is to create our quota databases.
We do that with the quotacheck.
Now, you don't necessarily need user and group quotas.
So when we set the options,
our mount options usrquota and grpquota for users and groups.
If we only want, let's say, user quotas, then only put that in.
In the same way, when we're doing our quotacheck,
if we only want to work with users or only want to work with groups,
then we can use the option ‑u or ‑g.
But if we want to work with both, have both in.
M is then just specifying to don't remount our filesystems.
Normally when we're doing a quotacheck,
we will put the filesystem into read‑only mode so we're getting an accurate
view of the up‑to‑date information that each user has stored because they
can't be writing whilst we're doing the check.
But this will be enough to get our quota database up and running.
When we've done that,
we should be able to see the quota databases as files
at the root of the mount point.
So for us, that's the root filesystem,
and we should be able to see the aquota.usr,
the aquota.grp file, or whatever we have enabled.
Remember, you might only enable userquotas.
At this point, we could reboot.
Rebooting would enable our quotas and load the kernel modules.
But to save the reboot,
we can go ahead and load our modules and then go through and enable our quotas,
so quotaon ‑v for the verbose.
And again, don't forget the / at the end of the line.
And then we're done and dusted.
We'll still need to look at configuring our quotas for users,
but we're going to be able to see this within our demonstration.
A demonstration that I hope you're going to follow through
with when we look at it in the next clip. Remember, your hands‑on experience is building your skills and knowledge.