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

[quote=“S-F, post:17, topic:176822”]I’m having some trouble getting this functionality up and running. I seem to have been able to get all of the packages installed. I make the directory at the root (I called it nas like in the earlier description for no good reason other than it was there in front of me) and I created a corresponding directory on my file server. When I try to mount it I get this error message:

Command 'mount -t cifs -o user=XXXXXXXX,pass=XXXXXXXX //192.168.1.110/Colin/nas' failed with return code 1 and error message mount: can't read '/etc/fstab': No such file or directory.

I’m doing this all through WinSCP for the record.

Can anyone shed any light on this?[/quote]

Looking at your code line above and reading the first posting of this thread you are missing your target.

mount -t cifs -o user=,pass= /// /nas

You are missing the “/nas” at the end.

Yep. That did it. It was a combination of me leaving the /nas/ off the end and trying to use a directory within a directory.

Thanks!

Thank you for this info - am now logging to my NAS ;D

Keep in mind that a mount done via the command line will be lost during a restart, therefore to ensure it is mounted again for DataMine to use make sure the detail are listed in the plugin itself,

Please… is there an easy step - plan?

Ok, this is what I did hopefully it will work for others.

The following assumes you’ve installed the required CIFS packages

First I needed some confidence that the mount process and commands I was going to use would work, So I first logged onto my Veralite via SSH and then created the target mount directory and then I run the mount command to see if it works.

a) I did this because it tells me if it will mount correctly when DataMine does it - plus you’ll see error if not and these will help you troubleshoot.
b) one mapped i can check I have access to the share on the NAS and I can see the files and check the permissions if needed

To do this I did the following at the command line, I typed …

  1. cd /
  2. mkdir /nas
  3. mount -t cifs -o user=username,pass=password,nounix,noserverino //192.168.1.101/backup /nas

This created a new directory on Vera called /nas which the mount command converts to what I guess is a shortcut to my NAS so I could access/see all my files.

As the mount is removed after each restart you need to put these details into DataMine as it will remount it for you after any restart.

I completed the following fields


SetDataDirectory = /nas/
SetMountPoint = //192.168.1.101/backup
SetMountOptions = -t cifs -o user=username,pass=password,nounix,noserverino
MountLocation = /192.168.1.101/backup
MountType = cifs


On the target share on your NAS I then placed all the DataMine config files I originally had in the auSB key so that the app knows what to watch/capture.

that worked perfectly for me. add the mount/cifs info into dataMine, rebooted and it connects subsequently and writes data
thanks a lot! plus I free up a USB port :smiley:

@ SanderL,

The only thing I’d like to add to what parkerc said is you can use WinSCP to run these commands. Here’s a good thread on it: http://forum.micasaverde.com/index.php/topic,11492.msg82474.html#msg82474. If you have any questions that are more specific please just ask!

Is winscp meant to log into vera via ssh? Can I use putty as well?

Oh sure you can use putty. I just already have WinSCP all set up for moving files to Vera and the like.

What does this mean after initiating the mount CIFS command

df: /nas: Value too large for defined data type

btw, I used:
mount -t cifs -o user=datamine,pass=datamine,nounix,noserverino //192.168.1.100/datamine /nas

I’m sure you have done this, but Google is your friend and can help you out when you get errors.

I posted the following in a link that was listed earlier in this thread…

[quote=“parkerc, post:28, topic:175444”]UPDATE - surfing the net I can across some posts that had the same issue as me when I tried to do a ls command whilst in the new NAS share (Error was - “can’t open ‘.’: Value too large for defined data type”)

They suggested you add nounix,noserverino to the mount options, making it.

mount -t cifs -o user=admin,pass=Password,nounix,noserverino //192.168.1.101/backup /nas

So i did this and I can now do a ls call on Vera and it will show ma all the Datamine files on my NAS share and i can also do a mkdir and create files too.

Checking what Vera see as the target files permissions they see this.

-rwxr-xr-x 1 root root 25623 Aug 25 23:59 dataMineConfig.json [/quote]

Now that worked for me, have you tried a simple mount command like @Pseudomiser suggested earlier - or maybe try it with unix instead nounix and serverino instead of noserverineo ?

You’ll find some good resources on the net that will suggest commands to mount a CIFS share, as they can be specific to the device/share you are trying to mount.

It’s not surviving a reboot for me. I can mount the folder every time via the cmd but for some reason the settings I have in dataMine aren’t doing the trick.

The only thing missing from the screenshot is SetMountOptions, which is mount -t cifs -o user=XXXX,pass=XXXX,nounix,noserverino

Any ideas?

Parkerc, yes I used that… it’s in my post…

@ All. I made a “newbie” manual. It’s working for me now!

Hope this helps other people. Once again. I am not repsonsible for any damage. Use at your own risk. I am not an expert and only copy pasted eveything from the forum into 1 document that I needed to make it work.

Good luck!!

SEE ATTACHED PDF MANUAL

This works greate.Followed the PDF manual and now i?m logging to my NAS.
Do i have to configure DataMine again.I have 0 channels.

How can i keep my old settings in datamine.Is it possible to transfer my old data and settings from USB stick?

I tried to copy the database folder from USB stick to the new DataMine folder on NAS but that didn’t work.
Any suggestions.

Update:
Got it to work.
Started all over again
Configured dataMine back to USB logging,and deleted all files in NAS folder.
Then I copied all files back to NAS folder from USB stick.
Configured dataMine for NAS logging again and then it works… :slight_smile:

I’d like to set this up on my NAS, which is a 32gb flash drive plugged into my router’s USB. The router configures this flash drive as a share drive (NAS). Do you all think I cam use this one for my cifs mount??

If that NAS supports CIFS then it should be worth a go.

It works for me with a USB stick plugged into an Apple TimeCapsule.

that’s a good idea… Did you just copy the directory with the files to keep the data from the attached USB drive? I would not want to lose all my data…