Saving videos to NFS

A place for discussion of topics that are not specific to ZoneMinder. This could include Linux, Video4Linux, CCTV cameras or any other topic.
Post Reply
valid
Posts: 10
Joined: Thu Dec 31, 2009 6:27 am
Contact:

Saving videos to NFS

Post by valid »

I'm running ZM on a VM hosted on WHS - WHS has a large drive that I'd like ZM to use for storing all recordings, so I set up an NFS -- I can access it via File Browser with:
smb:192.168.1.50/sharename/

But I can't figure out how to access the folder via terminal. Is there a better way to do this?

* Note: I cannot just share the HDD via VMWare because it's not a linux drive (leastaways, that's what I think the problem is)
agoodm
Posts: 52
Joined: Tue Oct 09, 2007 12:16 pm

Post by agoodm »

mkdir /mnt/smbfs
mount -t cifs //192.168.1.50/sharename /mnt/smbfs -o user=username,password=password

Then look in /mnt/smbfs
valid
Posts: 10
Joined: Thu Dec 31, 2009 6:27 am
Contact:

Post by valid »

agoodm wrote:mkdir /mnt/smbfs
mount -t cifs //192.168.1.50/sharename /mnt/smbfs -o user=username,password=password

Then look in /mnt/smbfs
Awesome! That did work, mostly - I now have the mount in that folder, all visible, but I don't have write access to it for some reason. I've even included the -w flag, but to no avail.

Any ideas how I can mount with read/write permissions? Again, using smb://192.168.1.50/share works perfect -- has read/write, just can't access it except through file browser
valid
Posts: 10
Joined: Thu Dec 31, 2009 6:27 am
Contact:

Post by valid »

This is the guide I used to set up the NFS:
http://www.mediasmartserver.net/2009/12 ... fs-in-whs/
valid
Posts: 10
Joined: Thu Dec 31, 2009 6:27 am
Contact:

Post by valid »

I was able to link the HDD directly to Ubuntu using the fstab, but the changes seem to be local (not adding to the HDD, just a cache of the structure or something) so that's not working. If anyone can help me get Ubuntu correctly hooked up to an NFS, I'd really appreciate it.
coke
Posts: 518
Joined: Wed Jan 30, 2008 5:53 pm
Location: St. Louis, MO, USA

Post by coke »

Mount the smbfs (for the record, you're mounting smbfs with url you've been using, not an nfs) by putting this in your fstab.

Code: Select all

//server/share /mnt/nameme smbfs credentials=/etc/credentials,uid=www-data,gid=www-data,fmask=0770,dmask=0770 0 0
credentials file should include two lines

Code: Select all

username=insertusernamehere
password=insertpasswordhere
Once that's in the fstab, a "sudo mount /mnt/nameme" should work, and/or it'll come up on reboot.

I'm not sure how vmware deals with shares, as I've been converted to VirtualBox for a while, but VirtualBox works much faster if you use the guest additions and make the host shares accessible to the guest under a different name.
valid
Posts: 10
Joined: Thu Dec 31, 2009 6:27 am
Contact:

Post by valid »

You sir are a gentleman and a scholar.

The only hiccup I had after that was having to 'chown' the symlink from root to www-data.

Thanks again!
Post Reply