Quota on network devices
Quota on network devices
Dear Centosers,
I realized today that my quota where not activated on boot as they should. I finally managed to find the problem: quota are turned on in the /etc/rc.sysinit script but network devices (i.e. devices with the _netdev option in /etc/fstab) are mounted latter by the script /etc/init.d/netfs.
So far I solved my problem by activating them "manually" using the rc.local script. However I would like to know if it is possible to use another technic ? If not, where should I make a report so that quotas are also turned on in /etc/init.d/netfs ?
I realized today that my quota where not activated on boot as they should. I finally managed to find the problem: quota are turned on in the /etc/rc.sysinit script but network devices (i.e. devices with the _netdev option in /etc/fstab) are mounted latter by the script /etc/init.d/netfs.
So far I solved my problem by activating them "manually" using the rc.local script. However I would like to know if it is possible to use another technic ? If not, where should I make a report so that quotas are also turned on in /etc/init.d/netfs ?
Re: Quota on network devices
You don't say what netfs you're using, so for NFS we use rquotad for quota. In /etc/sysconfig/nfs it lists what port (RQUOTAD_PORT) it should listen on - along with the LOCKD, MOUNTD ports etc...
For NFS have a look at https://ostechnix.wordpress.com/2013/12 ... p-by-step/
For NFS have a look at https://ostechnix.wordpress.com/2013/12 ... p-by-step/
Re: Quota on network devices
Sorry I should have been more precise. The HDD are managed by an HITACHI SAN which is connected to the Centos server through iSCSI.
In fact the quota are managed on the Centos server and not on a remote server which serves the space through NFS.
In fact the quota are managed on the Centos server and not on a remote server which serves the space through NFS.
Re: Quota on network devices
So what are you doing in the rc.local script?
Also what does rpcinfo -p give you?
Do you see any failures at boot (/var/log/boot and/or /var/log/messages)?
Also what does rpcinfo -p give you?
Do you see any failures at boot (/var/log/boot and/or /var/log/messages)?
Re: Quota on network devices
Sorry for this VERY late answer. My rc.local script is working fine and so I forgot about this issue. But I would still like to improve the solution and will pay more attention to this thread in the future.
So:
- in the rc.local script I just start my quota with quotaon on my three netdevs (e.g. quotaon -c /path/to/folder)
- Although I do use NFS to serve some data outside, my problem would be the same even without using NFS: my drives are on a SAN with is connected remotely to a server through iSCSI, NFS as nothing to do in that. I nevertheless give the output of rpcinfo -p:
So:
- in the rc.local script I just start my quota with quotaon on my three netdevs (e.g. quotaon -c /path/to/folder)
- Although I do use NFS to serve some data outside, my problem would be the same even without using NFS: my drives are on a SAN with is connected remotely to a server through iSCSI, NFS as nothing to do in that. I nevertheless give the output of rpcinfo -p:
Code: Select all
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 42255 status
100024 1 tcp 43067 status
100011 1 udp 875 rquotad
100011 2 udp 875 rquotad
100011 1 tcp 875 rquotad
100011 2 tcp 875 rquotad
100005 1 udp 8920 mountd
100005 1 tcp 8920 mountd
100005 2 udp 8920 mountd
100005 2 tcp 8920 mountd
100005 3 udp 8920 mountd
100005 3 tcp 8920 mountd
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100227 2 tcp 2049 nfs_acl
100227 3 tcp 2049 nfs_acl
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100227 2 udp 2049 nfs_acl
100227 3 udp 2049 nfs_acl
100021 1 udp 52205 nlockmgr
100021 3 udp 52205 nlockmgr
100021 4 udp 52205 nlockmgr
100021 1 tcp 45399 nlockmgr
100021 3 tcp 45399 nlockmgr
100021 4 tcp 45399 nlockmgr
Re: Quota on network devices
I'm confused. You want to enable quotas on the filesystem and nothing to do with NFS? Here you go: https://access.redhat.com/documentation ... onfiguring
Re: Quota on network devices
I already enabled and I am using quotas.
I want quotas to start automatically as startup (e.g. after a reboot). This is usually done by the following scripts:
/etc/init.d/netfs
However, my drives are net drives located on a remote machine (iSCSI + mpath, _netdrive option in /etc/fstab) and the script above only works for non netdrives.
I want quotas to start automatically as startup (e.g. after a reboot). This is usually done by the following scripts:
/etc/init.d/netfs
However, my drives are net drives located on a remote machine (iSCSI + mpath, _netdrive option in /etc/fstab) and the script above only works for non netdrives.
Re: Quota on network devices
Don't you just add the usrquota and/or grpquota options to the file systems that require quotas (as mentioned in the above link)?
Re: Quota on network devices
Yes this is done, otherwise quotas would never work I guess. You are right that this option is important to have quota turned on at boot.
I found one script which enable quotas:
/etc/rc.sysinit for local system quotas
The script which is supposed to take care of netfs drives (as I undrestood) is: /etc/init.d/netfs. But I could not find any reference to quota enabling. Is this normal ? Do you think this is the place where one could add a quotaon command ?
Again many thanks for your follow up and you help.
I found one script which enable quotas:
/etc/rc.sysinit for local system quotas
Code: Select all
if [ -x /sbin/quotaon ]; then
action $"Enabling local filesystem quotas: " /sbin/quotaon -aug
fi
Again many thanks for your follow up and you help.
Re: Quota on network devices
I think that when the fstab is parsed and usrquota,grpquota are found in the options, quotaon should be run.