I'm having some trouble recording to an external hard drive. I added the drive in fstab and it shows just fine. added it in the storage section and ZM sees it and reports the size but when I have a camera try to record to it there are errors and nothing gets recorded
Maybe a permissions error?
an example of some errors:
DiskSpace: Event does not exist at /media/data/2/2020-03-24/2:ZoneMinder::Event: AlarmFrames => 37 AvgScore => 12 Cause => Motion DefaultVideo => 2-video.mp4 EndTime => 2020-03-24 12:29:48 Frames => 97 Height => 480 Id => 2 Length => 9.71 MaxScore => 48 MonitorId => 2 Name => Event- 2 Notes => Motion: All Orientation => ROTATE_0 SaveJPEGs => 1 Scheme => Medium StartTime => 2020-03-24 12:29:39 StateId => 1 StorageId => 2 TotScore => 476 Width => 704
Could not open out file '/media/data/1/2020-03-24/3/3-video.mp4': No such file or directory
Can't open /media/data/1/2020-03-24/3/01031-capture.jpg for writing: No such file or directory
External storage
Re: External storage
Additional info:
lsblk:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465.8G 0 disk
└─sda1 8:1 0 465.7G 0 part /media/data
sdb 8:16 0 29.8G 0 disk
└─sdb1 8:17 0 29.8G 0 part
├─slime--vg-root 253:0 0 28.9G 0 lvm /
└─slime--vg-swap_1 253:1 0 976M 0 lvm [SWAP]
ls -lstra:
total 36
4 drwxr-xr-x 3 root root 4096 Mar 23 18:43 ..
4 -rw-r--r-- 1 rach rach 807 Mar 23 18:43 .profile
4 -rw-r--r-- 1 rach rach 3771 Mar 23 18:43 .bashrc
4 -rw-r--r-- 1 rach rach 220 Mar 23 18:43 .bash_logout
4 drwx------ 2 rach rach 4096 Mar 23 18:44 .cache
0 -rw-r--r-- 1 rach rach 0 Mar 23 18:47 .sudo_as_admin_successful
4 -rwxr-xr-x 1 root root 850 Mar 23 18:48 zm-install
4 -rw------- 1 rach rach 35 Mar 24 12:14 .bash_history
4 drwx------ 3 rach rach 4096 Mar 24 12:15 .gnupg
4 drwxr-xr-x 4 rach rach 4096 Mar 24 12:15 .
lsblk:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465.8G 0 disk
└─sda1 8:1 0 465.7G 0 part /media/data
sdb 8:16 0 29.8G 0 disk
└─sdb1 8:17 0 29.8G 0 part
├─slime--vg-root 253:0 0 28.9G 0 lvm /
└─slime--vg-swap_1 253:1 0 976M 0 lvm [SWAP]
ls -lstra:
total 36
4 drwxr-xr-x 3 root root 4096 Mar 23 18:43 ..
4 -rw-r--r-- 1 rach rach 807 Mar 23 18:43 .profile
4 -rw-r--r-- 1 rach rach 3771 Mar 23 18:43 .bashrc
4 -rw-r--r-- 1 rach rach 220 Mar 23 18:43 .bash_logout
4 drwx------ 2 rach rach 4096 Mar 23 18:44 .cache
0 -rw-r--r-- 1 rach rach 0 Mar 23 18:47 .sudo_as_admin_successful
4 -rwxr-xr-x 1 root root 850 Mar 23 18:48 zm-install
4 -rw------- 1 rach rach 35 Mar 24 12:14 .bash_history
4 drwx------ 3 rach rach 4096 Mar 24 12:15 .gnupg
4 drwxr-xr-x 4 rach rach 4096 Mar 24 12:15 .
Re: External storage
Did you chown the mount to www-data (deb) or apache (centos)?
I put instructions for 1.32.3 here https://wiki.zoneminder.com/Using_a_ded ... Hard_Drive
I put instructions for 1.32.3 here https://wiki.zoneminder.com/Using_a_ded ... Hard_Drive
Re: External storage
I have been successful with "external" drives when I set them up with the OS. Have used Ubuntu and Debian and when the install gets to formatting drive I choose manual, do the external with EXT4 mounted as /zmstore. Once set up I create an events directory on zmstore and give the drive www-data ownership. Just remember to set up the storage in zoneminder.
Using a systemd mount is also good. See the wiki.
Using a systemd mount is also good. See the wiki.
Re: External storage
Thanks bbunge and snake!
After some reading and before your replies I did try to chown but was unsuccessful. After some more research I figured out that Vfat wouldn't let me change the owner so I reformatted the drive to ext4 and it works great! That wiki section from snake was perfect.
I added the storage to the purge filter and now I just will wait for it to fill up
After some reading and before your replies I did try to chown but was unsuccessful. After some more research I figured out that Vfat wouldn't let me change the owner so I reformatted the drive to ext4 and it works great! That wiki section from snake was perfect.
I added the storage to the purge filter and now I just will wait for it to fill up