On 2018 May 17 05:38:56, you wrote to Richard Kettlewell:
TP> And I thought I was the grumpy old man...
by far, you are not the only grumpy old man here ;)
)\/(ark
Always Mount a Scratch Monkey Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong... ... Fight Crime: Shoot a politician
Ro> and it returned: Ro> mount: mount point /mnt/CCTV/PiZero does not exist
you have to create the CCTV directory in /mnt... you might also have to create PiZero inside there unless it already exists on the other machine you are mounting...
)\/(ark
Always Mount a Scratch Monkey Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong... ... Having the right to do it doesn't always mean that doing it is right.
I have tried: sudo mount -t cifs -o username=USERNAME,password=PASSWD //192.168.1.88/shares /mnt/share
and it returned: mount: mount point /mnt/CCTV/PiZero does not exist
I then changed it and added //192.168.0.22/CCTV /mnt/CCTV/PiZero in the fstab file The line in fstab looks like this: /192.168.0.22/CCTV /mnt/CCTV/Pizero, but till get the same error message as above mount point does not exist.
yes. Mount is a process of replacing a local directory *contents* with a remote directory *contents*, conceptually
So e.g. mount ...... remote:/home/zaphod /home/remote-zaphod replaces the CONTENTS of /home/remote-zaphod with the *contents* of remote:/home/zaphod.
--
?it should be clear by now to everyone that activist environmentalism
(or environmental activism) is becoming a general ideology about humans,
about their freedom, about the relationship between the individual and
the state, and about the manipulation of people under the guise of a
'noble' idea. It is not an honest pursuit of 'sustainable development,'
a matter of elementary environmental protection, or a search for
rational mechanisms designed to achieve a healthy environment. Yet
things do occur that make you shake your head and remind yourself that
you live neither in Joseph Stalin?s Communist era, nor in the Orwellian
utopia of 1984.?
Vaclav Klaus
Yes the folder/directory/dataset does exist on my NAS box, and have been downloading pictures and video to /CCTV for about 3 years now. Now I want to dowonload video from my PiZero to /CCTV/PiZero on my NAS box
Pi Zero ls / . bin dev home lost+found media opt root sbin sys usr .. boot etc lib man mnt proc run srv tmp var
NAS box ls / .cshrc boot entropy mnt sys
.profile compat etc proc tmp
.rnd conf lib rescue usr
COPYRIGHT data libexec root var
bin dev media sbin
Why I added this /mnt/CCTV/PiZero to /etc/fstab, was because running the mount command kept say the said folder doesn't exist.
On my linux desktop I a similar line to the fstab file as I was using emby media player:
here I guess I need to clarify that you should exchange * USERNAME to the username used to log on to the NAS * PASSWORD to the password of above user on the NAS * //192.168.1.88/shares to the ipaddres of the NAS + the name of the share * /mnt/share to a local directory. /mnt/nas is not to bad
if /mnt/nas does not exist - create it : sudo mkdir /mnt/nas sudo chown -R pi:pi /mnt/nas
to fix permissions
so what does ls /mnt/CCTV/PiZero on the pi say ? Most likely that is does not exists.
if the NAS publish a file-share called CCTV and you want to reference that - deom the pi - with /mnt/CCTV/PiZero, then /mnt/CCTV/PiZero must exist on the pi.
It never ocurred to you to create the directory, e.g.: $ mkdir /mnt/CCTV $ mkdir /mnt/PiZero
'mount' is for mounting disk partitions by creating a directory, typically in the root directory, that points to the partition - not for creating directories in partitions.
Then I strongly suggest you get "Linux in a Nutshell" and/or bookmark the Debian reference that I also mentioned and read. understand and inwardly digest what it they have to say about mounting remote filing systems.
'man mount' explains the specifics of using the 'mount' command. Reading either of the above gives the context you need to understand what happens when you mount a local partition and/or a remote mount point. Finding out about nfs and/or samba are also useful things to do. So is finding out about the 'apropos' command.
On Thu, 17 May 2018 14:44:08 +0100, RobH declaimed the following:
Now, giggles, show us the result of:
ls /mnt
and
ls /media
If neither of those has a CCTV in them, you'll need to create it.
mkdir ...
{hopefully you realize the ... is to be replaced with the correct arguments}
fstab just tells the OS what file systems to mount during boot-up, so you don't have to do a manual mount everytime you reboot. It won't work unless the manual mount is successful.
And the odds are good that sometime, somewhere, a mkdir command was used to create the destination point.
I was afraid of that... cut&paste coding/administration: find an example of a statement, duplicate that statement in a different environment (entering shell statements into a Python script, Python statements into a shell prompt), and then get frustrated when they don't work.
Anecdote: Had a person like that at my place of employment many moons ago. Assignment: to configure four GPIB devices in an equipment rack when data collection was scheduled by another system. "Solution" write a program to configure one device -- based on cut&paste from example programs. When that program worked, it was cloned (3 times) and each modified to do configuration of the other three devices. Finally -- write a DCL script to chain the four programs together. We got to the deployment site, and were unable to get any data collection to work. We were only supposed to be there for two weeks. This person flew back to the US at the end of the time swearing that the programs (when tested individually) worked as expected, and no idea of why data collection failed. I got extended over the weekend to work this system -- never having coded GPIB interfacing before -- and going solely be the on-line documentation discovered:
All GPIB control programs had to start with an Initialize operation. Initialize RESETS ALL DEVICES on the bus!
So -- first program set up first device... Second program set up second device -- AFTER having reset the first one!
I had to consolidate the four programs into a single program that controlled all four devices. And do that in about 24 hours to get working data collection demonstrated before I could reschedule my return flight. /Anecdote
At the very least, learn to use "man".
man mount
{Had to squeeze the console to half width to avoid severe wrapping in this post} """ MOUNT(8) System Administration MOUNT(8)
NAME mount - mount a filesystem
SYNOPSIS mount [-lhV]
mount -a [-fFnrsvw] [-t vfstype] [-O optlist]
mount [-fnrsvw] [-o option[,option]...] device|dir
mount [-fnrsvw] [-t vfstype] [-o options] device dir
DESCRIPTION All files accessible in a Unix system are arranged in one big tree, the file hierarchy, rooted at /. These files can be spread out over several devices. The mount command serves to attach the filesystem found on some device to the big file tree. Conversely, the umount(8) command will detach it again.
The standard form of the mount command, is
mount -t type device dir
This tells the kernel to attach the filesystem found on device (which is of type type) at the directory dir. The previous contents (if any) and owner and mode of dir become invisible, and as long as this filesystem remains mounted, the pathname dir refers to the root of the filesystem on device.
If only directory or device is given, for example:
mount /dir
then mount looks for a mountpoint and if not found then for a device in the /etc/fstab file. """ {There's more, of course -- at that width, the entry for "mount" is over
2500 lines long; at normal width, 1900 lines!}
Key point: "dir" needs to exist first, after which "mount" attaches "device" "at the directory".
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
Ok I removed the previously created directories or folder, and re created them as per mkdir for each folder, as doing as all in 1 line didn't create the CCTV/PIZero folders.
Now when I run the mount command, because I have used the filetype as NFS, it returns unknown filesystem type: nfs.
Then I changed it to a cifs filytype and it returned: mount error(115): Operation now in progress Refer to the mount.cifs(8) manual page (e.g mount cifs)
So I guess I'll have to read up on that, but why is NFS an unknown filesytem type, because I don't have any windows computers and my shares on the NAS box are all NFS shares.
are you saying there are no cifs shares on the NAS?
a way of finding out is to use smbclient an exsample from my network
bnl@sebjlun-deb64:~/back_during_race$ smbclient --list 192.168.1.20 WARNING: The "syslog" option is deprecated Enter bnl's password: Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.5.12-Debian]
Sharename Type Comment --------- ---- ------- print$ Disk Printer Drivers IPC$ IPC IPC Service (Samba 4.5.12-Debian) bnl Disk Home Directories Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.5.12-Debian]
Server Comment --------- ------- IBM2 Samba 4.5.12-Debian TECHNICOLOR DSL Gateway
No, I'm not saying that, it's more of that I have NFS shares as well as smb shares.
I login to my NAS box and can see at a glance what shares I have.
After I created the the said folders ie /mnt/CCTV/PiZero I then ran the python script for the sensor detection and camera , and it returned :
Traceback (most recent call last) File "intruder_recmotion.py", line 37, in shutil.copyfile(RAMname, NASname) File "/usr/lib/python 2.7/shutil.py", line 83, in copyfile with open(dst, 'wb') as fdst: IOError: [Errno 2] No such file or directory: '/192.168.0.22/mnt/CCTV/PiZero/2018-16-16_11.25.36.h264'
I have checked the path to the PiZero folder or dataset on my FreeNAS box and it is correct.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.