How To - Log data to an external CIFS share (e.g. NAS) - No more USB

Hi,

You have to use forward slash /. Also note it is case sensitive. I.e. /datamine and /dataMine are different.

Cheers Rene

These recent posts have caused me to re-look at the problem, since I had been having the same “Permission denied” error on my Edge, whereas it works perfectly on three other VeraLites.

I’ve just found what I believe to be the problem… an application ([tt]DataYours[/tt], in fact) had some open files in the directory that I was trying to mount the NAS on. So my recommendation would be two-fold:

[ol][li]Make sure that there aren’t any files in the directory you mount to;[/li]
[li]Make sure that applications don’t write to the root directory of mounted file systems, but point them instead to sub-directories on the mounted drive.[/li][/ol]

That way, there should be no way that an application can ‘accidentally’ write to a directory which should have a mounted drive on it but, for some reason, doesn’t.

Hope this helps - it works for me now, so thanks again for raising the issue!

I also note that I’m using the command:
[tt]
mount -t cifs //172.16.42.100/DATAMINE /nas -o user=XXX,pass=YYY,sec=ntlm
[/tt]

[quote=“akbooer, post:63, topic:176822”]I also note that I’m using the command:
[tt]
mount -t cifs //172.16.42.100/DATAMINE /nas -o user=XXX,pass=YYY,sec=ntlm
[/tt][/quote]

Well, I really don’t know why but I tried your command

mount -t cifs //192.168.1.1/16gbusb/datamine /datamine -o user=,pass=,sec=ntlm

and did NOT receive a “Permission denied” or " can’t read ‘/etc/fstab’: No such file or directory" error (the later seems to been from using "" in the path).

Yey!

Used command df to check mount and received this outut:

Filesystem 1K-blocks Used Available Use% Mounted on rootfs 9600 4464 5136 47% / /dev/root 9728 9728 0 100% /rom tmpfs 63344 6464 56880 10% /tmp /dev/mtdblock6 9600 4464 5136 47% /overlay overlayfs:/overlay 9600 4464 5136 47% / tmpfs 512 0 512 0% /dev /dev/mtdblock10 66304 8836 57468 13% /storage /dev/mtdblock10 66304 8836 57468 13% /etc/cmh-firmware /dev/mtdblock10 66304 8836 57468 13% /etc/cmh-backup /dev/mtdblock9 7168 7168 0 100% /mios //192.168.1.1/16gbusb/datamine 15633388 90516 15542872 1% /datamine

Should mean the USb stick on the router is mounted properly, right?

How do we get the mount command to happen automatically at boot? As mine stands, I have to rerun it every time my Vera reboots :confused:

See some posts back. [url=http://forum.micasaverde.com/index.php/topic,16452.msg186165.html#msg186165]http://forum.micasaverde.com/index.php/topic,16452.msg186165.html#msg186165[/url]

Cheers Rene

See some posts back. [url=http://forum.micasaverde.com/index.php/topic,16452.msg186165.html#msg186165]http://forum.micasaverde.com/index.php/topic,16452.msg186165.html#msg186165[/url]

Cheers Rene[/quote]

Doh, thanks much. Sincere apologies for being “that guy”.

Not sure why it would not be native in the OS but seems like there needs to be a Vera App to add CIFS.

The system is based on OpenWrt - highly configurable and used in routers, etc., which commonly have no need for CIFS.

...but seems like there needs to be a Vera App to add CIFS.
I don't think that an app is the right thing here - you don't want something hogging memory when its only used once for configuration. CIFS has nothing to do, anyway, with Luup.

I’m no expert, but the various posts around helped me to get it going on both UI5 and UI7.

I upgraded my VeraLite UI5 to a VeraEdge UI7 today. DataMine was broken on the upgrade because the VeraEdge did not have a CIFS package installed and did not have a share mounted to my external NAS storage.

To allow DataMine to work, I made a directory on the VeraEdge called NAS to use as a share:

 mkdir NAS

I then installed a CIFS package on the VeraEdge:

 opkg update
 opkg install kmod-fs-cifs

I then mounted the share NAS to my external NAS at 192.168.0.1/DataMine:

 mount -t cifs -o user=<username>,pass=<password> //192.168.1.101/DataMine /NAS

Through trial and error I found that the mount opitions nounix,noserverino did not work so I omitted them.

On the VeraEdge device for DataMine, I set the following variables:

 SetDataDirectory:         /NAS/
 SetMountPoint:            //192.168.0.1/DataMine
 SetMountOptions:        -t cifs -o user=<username>,pass=<password>  

Joy! I am recording 40 channels to external storage running DataMine on the VeraEdge UI7.

Robert, nice how-to

Sent from my HTC6525LVW using Tapatalk

Hi Aaron:

Thanks. I made a mistake in the example mount command - I used a sample LAN IP address that did not match the IP address used in one of my previous sentences. I should have used the example command:

 mount -t cifs -o user=<username>,pass=<password> //192.168.0.1/DataMine /NAS

I used the sample LAN IP address 192.168.1.101 instead of 192.168.0.1.

Thanks again.

[quote=“robertloll1, post:70, topic:176822”]I upgraded my VeraLite UI5 to a VeraEdge UI7 today. DataMine was broken on the upgrade because the VeraEdge did not have a CIFS package installed and did not have a share mounted to my external NAS storage.

To allow DataMine to work, I made a directory on the VeraEdge called NAS to use as a share:

 mkdir NAS

I then installed a CIFS package on the VeraEdge:

 opkg update
 opkg install kmod-fs-cifs

I then mounted the share NAS to my external NAS at 192.168.0.1/DataMine:
What Ip adress I use…?

 mount -t cifs -o user=<username>,pass=<password> //192.168.1.101/DataMine /NAS

What is the password I use and the IP address…?

Through trial and error I found that the mount opitions nounix,noserverino did not work so I omitted them.

On the VeraEdge device for DataMine, I set the following variables:

 SetDataDirectory:         /NAS/
 SetMountPoint:            //192.168.0.1/DataMine

What is the IP address I use…???
SetMountOptions: -t cifs -o user=,pass=

Joy! I am recording 40 channels to external storage running DataMine on the VeraEdge UI7.[/quote]

I am not sure to understand exactly what are the infos I need to put for the IP address… I have some questions that I wrote in red characters…
Tks for your help… :wink:

Hi Viruta57,

The IP is that of your NAS. You best assign a fixed one on your router, or set a static on your NAS if the first cannot be done on your router.

The user ID and pwd is that of a user ID on your NAS that is allowed to write to the folder mounting to. I created a special user id for just that purpose.

Cheers Rene

Help. Updated UI5 to UI7, install all the packages, mount the external media, re-create all the graphics. All shows, all comes, the files on the media is created, the read / write is, but no new data is written to the file. What could be the problem?

root@MiOS_3510xxx:/# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 4608 4608 0 100% /rom
tmpfs 31240 324 30916 1% /tmp
tmpfs 512 0 512 0% /dev
/dev/mtdblock7 11264 7820 3444 69% /overlay
overlayfs:/overlay 11264 7820 3444 69% /
/dev/mtdblock8 5376 5376 0 100% /mios
//192.168.1.1/mios 518320 28164 490156 5% /nas

root@MiOS_3510xxx:/nas/nas# ls -la
drwxr-xr-x 1 root root 0 Nov 29 12:54 .
drwxr-xr-x 1 root root 0 Nov 29 12:52 …
-rwxr-xr-x 0 root root 401952 Nov 29 12:53 Vera-3510xxx.040.urn^upnp-org^serviceId^TemperatureSensor1.CurrentTemperature.wsp
-rwxr-xr-x 0 root root 401952 Nov 29 12:54 Vera-3510xxx.112.urn^upnp-org^serviceId^BarometerSensor1.CurrentPressure.wsp

Hmm, one of the graphs began to draw, perhaps it was necessary to just wait.

Always good to wait a day or so when adding stuff to a Vera :smiley:

Hi!

I’m stuck… trying to fallow the guide but see attachment for result :frowning:

can anyone help me?

Hi da1901,

Did you enter this?

opkg update opkg install --force-depends kmod-nls-utf8 kmod-nls-base kmod-crypto-hmac kmod-crypto-md5 kmod-crypto-misc kmod-fs-cifs

You may want to enter the last line two or three times.

Cheers Rene.

Hi reneboer!

Thanks for helping!

I’ve tried you tip, is it suposed to fail instaling? see attachments.