Use a ZFS Dataset for ZM Events

Add any particular hints or tricks you have found to help with your ZoneMinder experience.
Post Reply
User avatar
eracc
Posts: 107
Joined: Wed Mar 08, 2006 3:26 pm
Location: USA

Use a ZFS Dataset for ZM Events

Post by eracc »

Hello folks. I just got back into ZoneMinder in the past two weeks from the date on this post. I am running it on my soon to be retired 2010 built home server with FreeBSD 13.4-RELEASE. I want to get some new hardware to move my disks over, but that will have to wait until after the end of 2024. Anyway ...

This system has two mirrored ZFS pools on it, a boot/root pool and a data storage pool. Of course the ZM install puts the event data in /var/db/zoneminder/events/ on my boot/root pool, which is not optimal for me. So this morning I created a couple of ZFS datasets on my storage pool for the event storage. This worked like a charm. For future me, and anyone else who might want to do this here is how I got that created with the quota size I wanted for the events:

Code: Select all

# zfs create storage0/zoneminder
# zfs create storage0/zoneminder/events
# chown www:www /data0/zoneminder
# chown www:www /data0/zoneminder/events
# zfs set quota=500G storage0/zoneminder/events
# zfs set quota=600G storage0/zoneminder
I will probably adjust those quotas in the future. Then I went to each camera and set them to use the new storage. Events were now going to the new storage.

Code: Select all

# ls -l /data0/zoneminder/events/
total 2
drwxr-xr-x  3 www  www  3 Nov  1 08:35 1
drwxr-xr-x  2 www  www  2 Nov  1 08:33 2
lrwxr-xr-x  1 www  www  1 Nov  1 08:33 BackPTZ -> 2
lrwxr-xr-x  1 www  www  1 Nov  1 08:32 FrontPTZ -> 1
HTH any of you wanting to do this.
User avatar
eracc
Posts: 107
Joined: Wed Mar 08, 2006 3:26 pm
Location: USA

Re: Use a ZFS Dataset for ZM Events

Post by eracc »

User avatar
iconnor
Posts: 3197
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Use a ZFS Dataset for ZM Events

Post by iconnor »

Nice!

ZFS works well for me so far for storing events, unlike btrfs.
Post Reply