Referring to a Linux share

Discussion about using NAS on Linux and Unix OS.
Post Reply
zy682517
New here
Posts: 5
Joined: Thu Jan 16, 2020 1:30 am
Contact:

Referring to a Linux share

Post by zy682517 » Thu Jan 23, 2020 1:00 am

Hi,

This is a Linux posting not a PHP/Web Server posting.

I've discovered, quite by accident, that I refer to a QNAP shared drive as /share/Multimedia or /share/Public or whatever when using PHP on my NAS web server

Here is the command line used when mounting a remote share on a Linux box (QNAP NAS) :- mount -t cifs //"ip-of-remote-nas"/"share-on-remote-nas" -o username="username for remote NAS",password="paswd for remoteNAS" /share/remoteNAS

Everything in ""'s needs to be entered

My question what is the share name when this is done???

/remoteNAS perhaps

Robert, Edinburgh
Robert, Edinburgh

User avatar
OneCD
Ask me anything
Posts: 7829
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Referring to a Linux share

Post by OneCD » Thu Jan 23, 2020 6:57 am

zy682517 wrote:
Thu Jan 23, 2020 1:00 am
Here is the command line used when mounting a remote share on a Linux box (QNAP NAS) :- mount -t cifs //"ip-of-remote-nas"/"share-on-remote-nas" -o username="username for remote NAS",password="paswd for remoteNAS" /share/remoteNAS
...
My question what is the share name when this is done???
After mounting a remote share locally, you don't need to refer to it by a share-name, you only refer to it by the mount-point in your local filesystem. So, using your example, the mount-point in your local filesystem will be [/share/remoteNAS].

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

zy682517
New here
Posts: 5
Joined: Thu Jan 16, 2020 1:30 am
Contact:

Re: Referring to a Linux share

Post by zy682517 » Thu Jan 23, 2020 5:24 pm

Tried the command line and it doesn't work!

I had got this from another posting so back to the starting line again.
Robert, Edinburgh

User avatar
OneCD
Ask me anything
Posts: 7829
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Referring to a Linux share

Post by OneCD » Thu Jan 23, 2020 5:45 pm

I don’t know why you’re now posting that the command line doesn’t work. I didn’t ask you to try it. I only answered your question regarding the mounted share-name.

Maybe you should rethink and rephrase your question so the community will have some idea what the ** you’re asking about? :S

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

zy682517
New here
Posts: 5
Joined: Thu Jan 16, 2020 1:30 am
Contact:

Re: Referring to a Linux share

Post by zy682517 » Sat Jan 25, 2020 7:18 pm

OK after your reprimand here it is in plain English.

I have successfully written a PHP application that runs on a TS-251+ and can access folders on this NAS1 using the following sample path /share/Multimedia/MyFilms/V/video.mp4

I want to mount a share name on NAS1 that refers to a folder on my second NAS2. The Forum suggested the command line I posted and it simply doesn't work. This was supposed to mount a share on my NAS1.

So, I would appreciate a suggestion as to how I mount a share on NAS1 that refers to a folder on NAS2. Both are TS-251+. If I can get it to work I will share the working code on the PHP forum so all QNAP NAS owners interested in PHP can benefit.
Robert, Edinburgh

torch1
Getting the hang of things
Posts: 95
Joined: Thu Jul 04, 2019 4:53 am

Re: Referring to a Linux share

Post by torch1 » Mon Feb 10, 2020 12:57 pm

Try:
mount -t cifs -o username=user,password=pass //NAS2/share /mnt/mountpoint
or
mount -t nfs NAS2:/share /mnt/mountpoint

Note that the "/mnt/mountpoint" must already exist on NAS1 (which you can create by "mkdir /mnt/mountpoint").

Post Reply

Return to “Linux & Unix (NFS)”