NFS export quota

1

I have two NFS export in /etc/exports

/export/ipcamera 192.168.1.0/24(rw,nohide,insecure,no_subtree_check,async)
/export/ipcamera2 192.168.1.0/24(rw,nohide,insecure,no_subtree_check,async)

Is there any easy way to set 50GB quota per export?

user66638

Posted 2014-10-08T21:34:00.147

Reputation: 274

Yes, setup quotas

– lemonsqueeze – 2014-10-09T12:52:12.267

quotas are not set in the exports file. Usually they are managed by the underlying file system. Setting up quotas will depend on your filesystem. – gogators – 2014-10-09T12:56:10.950

Answers

0

If you don't want to, don't know how or cant use quota stuff - You can create image files on your main storage for each cam.

64GB container ext3 or fat32, choose one.

 dd if=/dev/zero of=cam03.img bs=1M count=64000
 # mkfs ext3 -F cam03.img
 # mkfs fat32 -F cam03.img

Create a mount directory

mkdir /mnt/cam03
chown nobody:nogroup /mnt/cam03

Mount the image

 mount -o loop,rw,sync /mnt/MAIN/CCTV/cam03.img /mnt/cam03

You still have to deal with remounting the image on each boot and making sure NFS remounts too.

My MAIN are 4 2TB disks using ZFS, so I have good redundancy and fast read write. This worked pretty well for me.

Piotr Kula

Posted 2014-10-08T21:34:00.147

Reputation: 3 538