3

I've been working with an install of Ubuntu 8.04 and Samba.

I'm trying to set up user disk space quotas for our shared drive. That is, each user will have their own folder on our Network Attached Storage (NAS) that has a size limit. I can successfully mount the shared drive, but I can't figure out how to set quotas on it (I think smbcquota might work, but I'm not sure).

It's been suggested to me to give each user a share on the shared drive or to use NFS. Unfortunately, neither option works for my purposes.

Does anyone know how I could give users a quota on my NAS?

2
  • what NAS device are you using?
    – warren
    Jul 7, 2010 at 22:55
  • I'm using a Buffalo Linkstation. However it doesn't seem to support quotas, so I'm hoping that quotas can be enforced by Samba in some way or another.
    – graf_ignotiev
    Jul 7, 2010 at 23:34

3 Answers 3

2

For Samba to support quotas, there must be few preconditions met: Samba must be compiled with quota support, the FS being shared must support quotas and have the quotas enabled.

To turn on quotas you need to:

  1. Add usrjquota=aquota.user,jqfmt=vfsv0 to mount options in /etc/fstab and create a aquota.user file in root directory of file system (if it's a /home FS, you can create it using touch /home/aquota.user.
  2. Re-calculate current disk usage with

    quotacheck -vguma
    

To set the quotas you may use either quotactl, quota and similar Linux tools or connect to the share as root (no other user will work, including the ones defined in admin users) and use the windows share properties to change quotas.

0

I think that googling would have helped you. Try using this tutorial

http://portfolio.itas.ca/~schewet/257T/mini3.html

and check-out Samba SWAT

2
  • Thanks for the link, but I'd already read it. The problem with that tutorial is that it applies to local file systems (in their case ext3). I need something for CIFS. This is what my entry in fstabs looks like: \\linkstation\share /media/share cifs workgroup=DLLAB,fmask=777,uid=1002,ip=192.168.1.4,dmask=777,usrquota,credentials=/etc/.credentials 0 0 The GUI that I'm working with can be found here: turnkeylinux.org/domain-controller
    – graf_ignotiev
    Jul 8, 2010 at 20:55
  • \\linkstation\share /media/share cifs workgroup=DLLAB,fmask=777,uid=1002,ip=192.168.1.4,dmask=777,usrquota,credentials=/etc/.credentials 0 0
    – graf_ignotiev
    Jul 8, 2010 at 23:19
0

From what I've learned, what I want is not possible. If my NAS supported NFS or if it supported quotas locally, I could probably get it to work.

You must log in to answer this question.