May 18, 201511 yr I need to limit an nfs share for a particular user to 200 GB. I created a dedicated username and was trying to find a way to set a quota, but failed in my effort. Using unRAID server pro 5.0.6 right now. The reason I need the quota is a firmware bug in my new Hikvision IP camera. It is allergic to shares over 200 GB. Could also use SMB, if that is easier.
May 18, 201511 yr No unRAID feature for that. You could add a drive to the array that was that small or smaller and restrict a share to that drive. Maybe hard finding an HDD that small now but SSDs will work.
May 18, 201511 yr Author Are you saying it is impossible even from the command line? This has been a feature of *nix since before the Carter presidency.
May 18, 201511 yr Are you saying it is impossible even from the command line? This has been a feature of *nix since before the Carter presidency. If you are clever enough maybe you can do it from the command line. I don't know. It is not a feature of unRAID. The users defined in the unRAID webGUI can't even login to the command line. They can own files, but can only access them over the network.
May 18, 201511 yr You could fill a larger disk with lots of other media in a different share, all but 200G. Then configure the share properly, and achieve this result. Not sure this is helpful.
May 18, 201511 yr Either approach would sort of work, but if anything else ever wrote to the drive the "quota" would shrink.
May 19, 201511 yr Author Nope and nope. Share has to appear to be 200 GB in size, not free space. Thanks, though.
May 19, 201511 yr Nope and nope. Share has to appear to be 200 GB in size, not free space. Thanks, though. If you have a spare drive, you can create a 200GB partition and share with this plugin: https://lime-technology.com/forum/index.php?topic=38635.0 Quota won't work because the kernel doesn't support it.
May 19, 201511 yr If you have a spare drive, you can create a 200GB partition and share with this plugin: https://lime-technology.com/forum/index.php?topic=38635.0 But you would have to be on v6. Another thing you could probably do along those lines if you're good with Linux. I'm not but I have seen bits and pieces on the forum. Partition a drive with 200GB and another partition to use the rest of the drive if you wanted. You couldn't use this in the array, but you could probably mount each partition and share them using smb-extra.conf The mounting would have to be redone on bootup using the go script. Probably got some of this wrong, and can't really help on the details without doing some research myself, so will leave that to you or maybe one of the real experts will chime in.
May 19, 201511 yr could you create a share, limited to one disk that had a minimum space free: eg 1TB disk with minimum space 800GB Other shares could also use the drive so it isn't wasted space? (or is this an unpaid 6 only option?)
May 19, 201511 yr could you create a share, limited to one disk that had a minimum space free: eg 1TB disk with minimum space 800GB Other shares could also use the drive so it isn't wasted space? (or is this an unpaid 6 only option?) No that is in v5, but it's the same idea dgaschk had. In the end, any other share using that drive would impact the "quota". In your example, if another share wrote 100GB to the drive, then the disk would have 900GB free, so the "quota" would shrink to 900GB - 800GB = 100GB. And so on.
May 20, 201511 yr The 200GB partition idea should work though. I don't know how big your Cache drive is, but if it's 500GB or more, you could shrink the first partition by 200, then carve a new one at the end, size 200GB. It will have to be mounted through the command line only though, and you may have to run reiserfsck on the Cache partition to correct its file system size (not sure).
May 24, 201511 yr Having the exact same issues with hikvision cameras and Unraid. The issue is basically with Hikvision but considering they haven't solved it in years, i doubt much progress will happen there. I've literally found hundreds of user postings on this issue. It's rather appalling Hikvision doesn't seem to care. These are not cheap cameras. Having "Quota" available in the Unraid build would help a lot already as i would be able to restrict a user/share by quota then.
June 8, 201511 yr Exact same issue here also with Hikvision cameras, would be really nice if we had the ability to either have user quotas or the ability to customize a user share reported volume size (regardless of the physical disk size used).
June 8, 201511 yr Maybe upgrade to unRAID v6 so you can use Unassigned Devices and plug in a 200GB SSD.
June 9, 201511 yr Thanks for the suggestion. I would consider that option, however with each camera requiring it's own unique share, dedicating a physical drive for every camera is a showstopper unfortunately.
June 9, 201511 yr I can confirm that Hikvision IP cameras need quotas. Their logic is essentially to pre-fill the storage you give them with sparse files... and they fill it up till full.... so you need to set some reasonable quota to stop an entire drive/share from being filled.
August 12, 201510 yr Author Is this likely to work on unRAID? ## Create an image file to your preferred size fallocate -l 50G /data/security/patio.img ## Format the image file as ext3 mkfs -t ext3 -q /data/security/patio.img -F ##Add the NFS mount to your FSTAB to mount the image at your NFS location (/etc/FSTAB) /data/security/patio.img /data/security/patio ext3 rw,loop,usrquota,grpquota 0 0
August 15, 201510 yr Author What am I doing wrong? File size is zero. Prior to this I stopped the array, unmounted everything, then created a mount point and mounted the drive under /mnt/disk2. root@tower:/mnt/disk2/cameraBasementStairs# fallocate -l 50G ./cameraBasementStairs.img root@tower:/mnt/disk2/cameraBasementStairs# ls -lh total 0 -rw-r--r-- 1 root root 0 2015-08-15 11:36 cameraBasementStairs.img root@tower:/mnt/disk2/cameraBasementStairs# stat cameraBasementStairs.img File: `cameraBasementStairs.img' Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: 861h/2145d Inode: 1530 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2015-08-15 11:36:35.000000000 -0400 Modify: 2015-08-15 11:36:35.000000000 -0400 Change: 2015-08-15 11:36:35.000000000 -0400 root@tower:/mnt/disk2/cameraBasementStairs#
September 13, 201510 yr Is the disk XFS? root@rack:/mnt/disk8# ls root@rack:/mnt/disk8# du -a 0 . root@rack:/mnt/disk8# fallocate -l 50GB stor.img root@rack:/mnt/disk8# ls -l total 48828128 -rw-r--r-- 1 root root 50000000000 Sep 13 12:58 stor.img root@rack:/mnt/disk8# du -a 48828128 ./stor.img 48828128 . root@rack:/mnt/disk8#
September 13, 201510 yr Maybe this is best accomplished using a btrfs system similar to how the docker image works?
September 14, 201510 yr Author Is the disk XFS? It is whatever Unraid Server Pro 5.0.6 defaults to. The disk it is on is part of the array, if that is what you are asking. In any case, I ended up creating a 50 Gig file full of zeros using dd. Then I put an ext3 filesystem in the file. How would I export that file through NFS? I have tried mounting it in fstab, and exporting it via NFS in /etc/exports, but somehow fstab gets overwritten when I reboot.
Archived
This topic is now archived and is closed to further replies.