Quota on network devices

Issues related to applications and software problems
Tabs
Posts: 24
Joined: 2015/02/12 13:54:56

Quota on network devices

Post by Tabs » 2015/05/01 09:22:50

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 ?

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Quota on network devices

Post by aks » 2015/05/01 16:07:53

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/

Tabs
Posts: 24
Joined: 2015/02/12 13:54:56

Re: Quota on network devices

Post by Tabs » 2015/05/06 12:33:48

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.

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Quota on network devices

Post by aks » 2015/05/06 16:55:26

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)?

Tabs
Posts: 24
Joined: 2015/02/12 13:54:56

Re: Quota on network devices

Post by Tabs » 2015/06/23 06:49:20

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:

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

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Quota on network devices

Post by aks » 2015/06/23 17:33:06

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

Tabs
Posts: 24
Joined: 2015/02/12 13:54:56

Re: Quota on network devices

Post by Tabs » 2015/06/24 14:41:35

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.

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Quota on network devices

Post by aks » 2015/06/24 16:28:06

Don't you just add the usrquota and/or grpquota options to the file systems that require quotas (as mentioned in the above link)?

Tabs
Posts: 24
Joined: 2015/02/12 13:54:56

Re: Quota on network devices

Post by Tabs » 2015/07/02 07:22:55

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

Code: Select all

if [ -x /sbin/quotaon ]; then
    action $"Enabling local filesystem quotas: " /sbin/quotaon -aug
fi
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.

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Quota on network devices

Post by aks » 2015/07/02 16:25:27

I think that when the fstab is parsed and usrquota,grpquota are found in the options, quotaon should be run.

Post Reply