Unable to access 2nd HDD for storage

Forum for questions and support relating to the 1.34.x releases only.
rfeyer
Posts: 34
Joined: Sun Jul 10, 2016 11:36 am

Unable to access 2nd HDD for storage

Post by rfeyer » Wed Jan 13, 2021 9:25 pm

Hi all,
I have a system with 2 HDD's: 750Gig for Ubuntu and another 1Tb HDD meant for ZM storage.
I have no problem using any directory on the 1st drive as storage, but have not found a way to use the second.
Second drive is accessible via Caja or Nautilus via /media/rainer/data/ZM_Data
both data and ZM_Data have read write permissions.
In ZM, under options/ storage, I have entered /media/rainer/data/ZM_Data by itself, and have also tried adding same entry in URL (which is how the manpage/ Wiki shows it.
I have tried adding the shares either via Ubuntu 20.04 via right click then Share, and also by changing the /etc/Samba/smb.conf Each time I make changes I restart smbd and nmbd.

Now, I do have problems getting to the drive and folders on my LAN with another Linux machine (Mint 20.04). I believe it is because the exclusion of SMB1 (but I am certainly not a Linux knowledgable individual). I can, however, access the folders via: smb://ip address/zm_data (zm_data being the share name).

Here is some system info if that helps:
System: Kernel: 5.4.0-60-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: MATE 1.24.0
wm: marco dm: LightDM Distro: Linux Mint 20 Ulyana base: Ubuntu 20.04 focal
Machine: Type: Desktop System: LENOVO product: 5048F1U v: ThinkCentre M81 serial: <filter>
Mobo: LENOVO model: N/A serial: <filter> BIOS: LENOVO v: 9HKT58AUS date: 06/10/2014
CPU: Topology: Quad Core model: Intel Core i7-2600S bits: 64 type: MT MCP arch: Sandy Bridge
rev: 7 L2 cache: 8192 KiB
flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 44699
Speed: 3528 MHz min/max: 1600/3800 MHz Core speeds (MHz): 1: 3508 2: 3173 3: 3300
4: 3254 5: 3675 6: 3315 7: 3329 8: 3455

Memory: 20 gig

User avatar
Andyrh
Posts: 28
Joined: Sat Oct 28, 2017 3:55 am

Re: Unable to access 2nd HDD for storage

Post by Andyrh » Wed Jan 13, 2021 9:39 pm

It is unclear what error you are seeing?

My setup:
Under storage I have 2 locations, Default and Store1. Store1 points to my 2nd HD.
In the camera config on the storage tab I selected store1 and all works as expected.

If that does not help please post the error you are seeing.
Andy
o||||o

rfeyer
Posts: 34
Joined: Sun Jul 10, 2016 11:36 am

Re: Unable to access 2nd HDD for storage

Post by rfeyer » Wed Jan 13, 2021 9:42 pm

No telling the storage error was rather silly of me.
I deleted the storage option, so don't have exact verbiage, but, in essence it noted that the storage /media/rainer/data/ZM is not avaliable (or does not exist I think it said)

User avatar
Andyrh
Posts: 28
Joined: Sat Oct 28, 2017 3:55 am

Re: Unable to access 2nd HDD for storage

Post by Andyrh » Wed Jan 13, 2021 9:45 pm

Maybe security.
It should look something like this:
drwxr-xr-x 8 www-data www-data 4096 Jun 22 2020 store1

If you can grab the exact error message I am sure better help will be given.
Andy
o||||o

rfeyer
Posts: 34
Joined: Sun Jul 10, 2016 11:36 am

Re: Unable to access 2nd HDD for storage

Post by rfeyer » Wed Jan 13, 2021 9:59 pm

TY
I will add the storage info again and wait for the error, then post!

rfeyer
Posts: 34
Joined: Sun Jul 10, 2016 11:36 am

Re: Unable to access 2nd HDD for storage

Post by rfeyer » Wed Jan 13, 2021 10:12 pm

OK, I added the second HDD storage path into the options/storage field: /media/rainer/data/ZM_Data
Here is the copy/ paste of the file path shown by Caja File Manager: /media/rainer/data/ZM_Data

Here is the error reported by ZM Log (I don't yet know where the log file resides):
2021-01-13 17:05:28 web_php 10385 WAR Storage::disk_usage_percent: path /media/rainer/data/ZM_Data/ does not exist /usr/share/zoneminder/www/includes/Storage.php 74
2021-01-13 17:05:28 web_php 10385 ERR Path /media/rainer/data/ZM_Data/ does not exist.

The Sharing emblem is embedded in the floder icon of folder ZM_Data with all permissions set to owner and guest. A couple of days ago I also had a different folder which I chown'd to 755. After not getting anywhere I deleted the ZM storage option of this folder and deleted the folder itself.

User avatar
Andyrh
Posts: 28
Joined: Sat Oct 28, 2017 3:55 am

Re: Unable to access 2nd HDD for storage

Post by Andyrh » Thu Jan 14, 2021 4:41 pm

From the description it looks like a OS issue, maybe permissions.

You can successfully cd into /media/rainer/data/ZM_Data? Touch a file there to make sure that works.
What permissions are set on the directory ZM_Data ?
Andy
o||||o

rfeyer
Posts: 34
Joined: Sun Jul 10, 2016 11:36 am

Re: Unable to access 2nd HDD for storage

Post by rfeyer » Fri Jan 15, 2021 1:11 pm

TY for your reply!
I am able to connec to, and read a file, in the second HDD even over samba with abother PC running Mint 20

Magic919
Posts: 364
Joined: Wed Sep 18, 2013 6:56 am

Re: Unable to access 2nd HDD for storage

Post by Magic919 » Fri Jan 15, 2021 3:06 pm

To make sure ZM can write there run -

Code: Select all

chown www-data:www-data  /media/rainer/data/ZM_Data
As a test, touch a file there as suggested.

Code: Select all

sudo -u www-data touch /media/rainer/data/ZM_Data/test_file.txt  

Paranoid
Posts: 129
Joined: Thu Feb 05, 2009 10:40 pm

Re: Unable to access 2nd HDD for storage

Post by Paranoid » Fri Jan 15, 2021 3:09 pm

Open a terminal and run

Code: Select all

df -kh
If your disk does not appear in the list then it isn't mounted and isn't accessible by Zoneminder.

rfeyer
Posts: 34
Joined: Sun Jul 10, 2016 11:36 am

Re: Unable to access 2nd HDD for storage

Post by rfeyer » Sat Jan 16, 2021 12:21 am

TY both!
It still will give the ame error.
I will try a new HDD when it arrives!

Again, Ty for giving me your time!

bbunge
Posts: 2720
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Unable to access 2nd HDD for storage

Post by bbunge » Sun Jan 17, 2021 2:14 am

Your 2nd hard drive should be mounted in the Linux file system. The easy way I do that is to set up the mount for both hard drives when I install Linux. The first HD is mounted as "/" and the second hard drive is mounted as "/zmstore"
It is possible to add the 2nd drive afterwards and here is one way: https://wiki.zoneminder.com/Common_Issu ... ive_or_NAS
Whichever method you use the drive should have a dedicated folder or directory to store events with read write permissions for Zoneminder (Ubuntu used www-data)
This is not hard to do but you need to plan ahead when you set up your server. I have several servers with a SSD for "/" and a conventional (Green) HD for "/zmstore" Both drives were set up and formated off of a mini.iso net installer for Ubuntu

Acewiza
Posts: 24
Joined: Thu Dec 31, 2020 4:52 pm

Re: Unable to access 2nd HDD for storage

Post by Acewiza » Sun Jan 17, 2021 4:21 pm

There is something funky going on internally with ZM storage assignment(s). I had the same issue initially and did not resolve it until after re-installing, and I'm not sure why it worked the 2nd time around. My wild-assed guess is something in the install/config gets confused when multiple block device storage paths are seen on the system. Mine is probably like a worst-case scenario with differing local drives and NFS mounts as well. Initially ZM refused to recognize my NFS mount, returning that same error. It is not a permissions issue. Users own whatever comes up under their media folder by default. There's bigger issues if ZM can't use that by default.

burger
Posts: 224
Joined: Mon May 11, 2020 4:32 pm

Re: Unable to access 2nd HDD for storage

Post by burger » Sun Jan 17, 2021 5:48 pm

Wiki link as a reference: https://wiki.zoneminder.com/Using_a_ded ... Hard_Drive

People have had trouble with network mounts. But I believe they can work. Search the forums. I make sure that whatever hdd is added after the first, that it has a name other than "default". That's the only trouble I've seen.
fastest way to test streams:
ffmpeg -i rtsp://<ipaddress>:554/path output.mp4
from terminal, and run through paths on ispydb or in zm hcl

If you are new to security software, read this:
https://wiki.zoneminder.com/Dummies_Guide

Acewiza
Posts: 24
Joined: Thu Dec 31, 2020 4:52 pm

Re: Unable to access 2nd HDD for storage

Post by Acewiza » Mon Jan 18, 2021 1:47 pm

I plan on adding a dedicated drive for zm after I finish it's IOT phase. We'll see how it goes. Storage needs to come in and out of ZM seamlessly at will - especially in cases where legal issues might be at stake.

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests