Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Share max size

Featured Replies

+1

  • Replies 85
  • Views 23.6k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • You don't usually get replies to feature requests, except sometimes by other users if they want the same (like +1), but requests are still checked and considered by LT.    

  • Nick Kos
    Nick Kos

    The workaround on how to make Unraid shares with quota. It will work with Hikvision cameras well.   1. Make the directory where you will store .img files for shares. I prefer to do this on c

  • +1 This should be a basic feature of Unraid

Posted Images

+1 Share quotas are table stakes and required for a proper NAS system.

  • 5 weeks later...

+1

The workaround on how to make Unraid shares with quota. It will work with Hikvision cameras well.

 

1. Make the directory where you will store .img files for shares. I prefer to do this on cache (/mnt/cache), in the folder "system", to keep access fast. However, you can choose "/mnt/user" if you want, it is "more Unraid way". "cameras" is the name of folder where to store *.img files. Type the command in the terminal:

mkdir -p /mnt/cache/system/cameras

 

2. Create .img files with the size (quota) you want. In my case, it is the 10 GB, but you can type any another size:

fallocate -l10g /mnt/cache/system/cameras/51.img
fallocate -l10g /mnt/cache/system/cameras/52.img
fallocate -l10g /mnt/cache/system/cameras/53.img

 

3. Make the filesystems in the .imgs. I prefer ext4, but you can choose btrfs if you know why you need it - it will work as well:

mkfs.ext4 /mnt/cache/system/cameras/51.img
mkfs.ext4 /mnt/cache/system/cameras/52.img
mkfs.ext4 /mnt/cache/system/cameras/53.img

 

4. Go to your Unraid Web GUI, to the tab "Shares". And make required shares, using "Add share" button. Enter your "Share name:", for example, "camera51". "Primary storage (for new files and folders):" - "cache" - actually, it does not matter, but I prefer to set "cache". Press "Add share" button. After creation, go to the section "NFS Security Settings" a bit below and choose "Export:" - "yes". Press Apply. 
Note 1: Hikvision works better with NFS, however, you can share Samba as well in the "SMB Security Settings" section. 
Note 2: If you have no NFS section - press "Add share" button, or read this official instruction: https://unraid.net/fr/blog/deploying-an-unraid-nfs-server
Repeat this step as much as you made images (in my case I have camera51, camera52, camera53 shares). You should have one "share" for each one .img

 

Screenshot2024-05-19at01_10_29.thumb.png.1a06889ca80788285c9f95267b75f078.png

 

5. Mount your .imgs in the corresponding shared folders. Double-check that no errors during the mounts, don't move to the next steps while you do not fix them. Pay attention - your file system (ext4) in mount should correspond to mkfs you did on step 3:

mount -r -t ext4 -o loop,rw /mnt/cache/system/cameras/51.img /mnt/user/camera51/
mount -r -t ext4 -o loop,rw /mnt/cache/system/cameras/52.img /mnt/user/camera52/
mount -r -t ext4 -o loop,rw /mnt/cache/system/cameras/53.img /mnt/user/camera53/

It would be better to mount these folders to cache (/mnt/cache/camera51, ...), however, if somebody makes share on the array instead of cache it will not work. So, the "user" is more safe.

 

6. Add folder mount commands to the start script. Edit /boot/config/go and add to the end:

# mount .imgs for cameras
(sleep 20 && /sbin/mount -r -t ext4 -o loop,rw /mnt/cache/system/cameras/51.img /mnt/user/camera51/) &
(sleep 20 && /sbin/mount -r -t ext4 -o loop,rw /mnt/cache/system/cameras/52.img /mnt/user/camera52/) &
(sleep 20 && /sbin/mount -r -t ext4 -o loop,rw /mnt/cache/system/cameras/53.img /mnt/user/camera53/) &

Where "sleep 20" is - wait 20 seconds while the system mounts all necessary drives and services, after which it will mount your .imgs. The "&" at the end sends these tasks to the background and allows the system to continue loading. If your system doesn't mount disks - check "mount" again for errors or try to set a higher number for "sleep", for example, 60.
I know that this is not the best solution. Appreciate it if you could suggest better. However, it is work.

 

7. Optional: reboot Unraid to be sure that everything working properly, and .imgs mounts automatically.

 

Congratulations! That's all. You have made quota shares in Unraid.

 

 

Only for Hikvision:

8. ext4 makes "/lost+found" folder on the new drive automatically. It is a trouble, because you can't format drive on your Hikvision cameras. Drive must be empty. So delete "/lost+found" folders in each created shares:

rmdir /mnt/user/camera51/lost+found
rmdir /mnt/user/camera51/lost+found
rmdir /mnt/user/camera51/lost+found


9. Assign your nfs drives to the Hikvision cameras, like this:

 

Screenshot2024-05-19at01_46_31.thumb.png.f1fa494965a02945d8d9ae2e6c5866fc.png

 

Format drive. If the format fails - try this workaround: go to Unraid WebGUI, "Shares" -> your share. Edit "Minimum free space:", for example, set it to 1GB. Press "Apply'. This forces Unraid to reload share services, including NFS. After this Hikvison camera is able to format a drive, even despite the wrong free size. Yes, it is Hikvision, trouble with network drives existed a dozen+ years ago.

 

Screenshot2024-05-19at01_47_47.thumb.png.23eff9da3bdba87b1c4be1f58bc506af.png

 

Screenshot2024-05-19at01_50_34.thumb.png.fdc0c4ae04a589bb9147fc23b3c53ab2.png

 

Screenshot2024-05-19at01_58_47.thumb.png.2d2bdcdfaf07f05c7e0fb0f8449bd561.png

 

Get luck! I would appreciate any improvements you can suggest.

Edited by Nick Kos

  • 3 months later...
On 9/1/2023 at 1:02 PM, Black_SwanNL said:

+1

 

Storage is always an issue with kids. They don't seem to grasp the fact that "a computer" can get full. I want to allow them acces to my server to write stuff onto it so it will be save. School projects and what not. I've setup the family pc with storage restrictions per account and it works like a charm, basic windows stuff. Only problem with the family pc: no redundancy and not really easy if one wants to remotely acces the files per laptop.

 

So space on the server would be THE option. But with the kids filling up there storage space and having to clean up their storage multiple times a year, I'm not giving them acces to multiple TB of storage.

+1

  • 1 month later...

+1 This should be a basic feature of Unraid

+1

+1 kinda surprised this isn't a thing already

+1

 

Would really love to see this implemented. Considering using Unraid for backups, will have to monitor closely. 

  • 1 month later...

+100000. 

  • 5 weeks later...

+1, very much want to see this feature and I'll go one step further: 

 

In addition to being able to enforce a max size for a share, i'd also appreciate the ability to set a max GB of primary storage utilization for that share before it spills over to secondary storage.    This would be especially helpful for shares where the mover is set to Array->Cachce for performance reasons, but where I want to control the max amount of data that can be kept on cache on a per-share basis. 

  • 2 weeks later...

Just putting in my request for this feature too. By default, the ONLY way to do this is to set specific disks for shares, but it's extremely limiting and depends on the size\amount of disks

  • 3 weeks later...

+1 it should have been a basic feature for a long time, but it's still missing. Let it happen guys, please!

 

+1

 

Looking for this feature today.

  • 3 weeks later...

+1 Still looking forward to this

+1

+1
As the "IT guy" of the family, this would help me a lot allocating quotas to my family members. 
It`s not feasible to use a 3.5 ( or 2.5 ) bay / sata connection on order to work around a feature that should be in a nas solution. 

Edited by Dasee

  • 3 weeks later...

+1

  • 2 weeks later...

+1

+1

it's basic functionality

  • 2 weeks later...

+1

 

I am actually quite shocked that it's not already been implemented.

I can't even think of another NAS product that can't do this...

+1

On 5/19/2024 at 12:22 AM, Nick Kos said:

The workaround on how to make Unraid shares with quota. It will work with Hikvision cameras well.

Works great for Hikvision, thank you so much!

 

One thing I have done is used "User Scripts" app from the unraid store and added the mount "At Startup of Array" so it will always mount the drive once the array has started-

 

#!/bin/bash
mount -r -t ext4 -o loop,rw /mnt/xxxxxx/cctv.img /mnt/user/cctv/
echo "mounted"

 

image.thumb.png.6f80cb7458f5e45b08f6d7108b75cabb.png

  • Community Expert
37 minutes ago, kramwell said:

One thing I have done is used "User Scripts" app from the unraid store and added the mount "At Startup of Array" so it will always mount the drive once the array has started-

You might want to consider adding a 'logger' command to the script to make sure entries get added to the syslog - it can help with any debugging later when you forget you have this script running :) 

6 hours ago, itimpi said:

You might want to consider adding a 'logger' command to the script to make sure entries get added to the syslog - it can help with any debugging later when you forget you have this script running :) 

great idea! thank you!!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.