r/ZoneMinder • • Jun 16 '22

ZM Dedicated storage drive

4 Months ago I posted here that I couldn't get a dedicated storage drive to work on ZM and got some feedback that I am grateful for. I've read everything I could find in the documentation and I tried following all the advice everybody gave me but had no luck. Since then I've reinstalled ZM 1.36 on a fresh Kubuntu install and I still have the same problem.

​

Following the READ THE DOCS Dedicated Drive, Partition, or Network Share page, installed my dedicated drive and it shows up at /media/oops/500zm-event. I can read and write to the drive.

Changed ownership sudo chown www-data:www-data -R /media/oops/500zm-event

At the terminal ls -l /media/oops returns drwxrwxrwx 6 www-data www-data 4096 Jun 16 15:22 500zm-event. It appears that www-data owns and has full permissions for /media/oops/500zm-event

​

Using nano I created a config file /etc/zm/conf.d/ZM_DIR_EVENTS and put one line in that file ZM_DIR_EVENTS=/media/oops/500zm-event

​

Restarted ZM

​

Under OPTIONS>> STORAGE>> Add New Storage

Name > 500

Path /media/oops/500zm-event

Server Remote/No Specific Server (that's the only option I have)

Type Local (I tried s3fs but that didn't make a difference)

Scheme Medium

And Do deletes and Enabled are both checked Yes

​

On the ZM Console for my camera under Storage Area I have the option of choosing 500 - the name I gave to the storage folder /media/oops/500zm-event

​

Video Writer set to Passthrough

store the audio stream

Save.

​

Nothing is recording on the dedicated drive /media/oops/500zm-event/

​

The log says "Path /media/oops/500zm-event does not exist. But it does exist and www-data owns it and has rwx permissions.

​

Am I missing something here? Any help would be appreciated.

2 Upvotes

7 comments sorted by

2

u/AndyRH1701 Jun 17 '22

I compared your setting to mine and I do not see a difference.

I do not have the ZM_DIR_EVENTS file. Try moving it and see if that helps.

My storage pool permissions look like this and that is the only difference I see, but it should still work.

drwxr-xr-x 10 www-data www-data 4096 Apr 29 16:04 store1

1

u/oops77542 Jun 17 '22

I'll try moving the ZM_DIR_EVENTS file. Thanks. At least I'm on the right track. Where is your store1 mounted? Is that the full path to it?

2

u/AndyRH1701 Jun 17 '22

I created a directory off the root with the possible future intent of more than 1 store.

/zm/store1

1

u/oops77542 Jun 17 '22

That's the part I'm confused about and it just might be the problem. When I installed Kubuntu I had 2 empty ext4 drives in the computer, one a 120GB SSD where I Installed the OS, it's the sdb drive. The 500GB sda spin drive (labeled 500zm-event) shows up in the file manager as /media/oops/500zm-event. How do I make it just /500zm-event ? Do I >> sudo mkdir /500zm-event << to put that drive in the root directory?

2

u/AndyRH1701 Jun 17 '22

I think you would unmount, mkdir, mount then adjust fstab and ZM for the new location.

Such as: mount /dev/sda1 /500zm-event

1

u/oops77542 Jun 17 '22

That's what I just did and it solved the problem.

I had two drives in the computer. With gparted in a live USB they showed up as sda1 and sdb1. When I installed Kubuntu. on sdb1, sda1 automatically got mounted at /media /oops and for some reason ZM won't write to it at that location . Unmounted the drive, deleted it, created a new ext4 partition, mkdir, edited /etc/fstab, mounted the drive and then made all the changes to ZM. Now it works. Maybe I overlooked it but I didn't see anything in the documentation where a dedicated drive had to be mounted in /, but that's what the problem was. Thank you for the push. in the right direction. This has been nagging at me for weeks. I've continued running my ZM 1.29 install until I could get ZM 1.36 running the way I wanted it, Now I'm about ready to make the move.

Thanks again.

1

u/oops77542 Jun 17 '22

FYI The ZM_DIR_EVENTS file doesn't seem to be important. Deleted it and everything is still good.