LINUX LITE 7.2 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
network share drives me mad
#11
Hi,

Some what baffling..!!,, Couple of other things to try.

Try changing the sleep to 20 just in case there is a timing issue on when the "Network" is established.
I see you are mapping/binding to the mnt dir

Code:
mount -t cifs -o username=username,password=yourpassword,uid=username,gid=users //dellserver/cArchive /mnt/dellserver

I don't suspect it's the issue, but I'm mapping to specific folders in my /home/dave/zshare/<dir>

Also in my notes I had a note about security... and "sec=ntlm"
Try changing the line by adding it in:
Code:
mount -t cifs -o username=username,password=yourpassword,uid=username,gid=users,sec=ntlm //dellserver/cArchive /mnt/dellserver

I will try to investigate

Dave
Upgrades WIP 2.6 to 2.8 - (6 X 2.6 to 2.8 completed on: 20/02/16 All O.K )
Linux Lite 3.0 Humming on a ASRock N3070 Mobo ~ btrfs RAID 10 Install on 4 Disks Smile

Computers Early days:
ZX Spectrum(1982) , HP-150 MS-DOS(1983) , Amstrad CPC464(1984) ,  BBC Micro B+64(1985) , My First PC HP-Vectra(1987)
Reply
#12
Many thanks again, Dave:

Your suggestions made a lot of sense, especially the one about maybe I was creating a problem by trying to mount directly to the /mnt folder.

Unfortunately, strangely, or whatever, NEITHER of the changes you suggested made any difference. 

It tried them incrementally, first adding the sec=ntlm switch, and tested just by adding to the rc.local file and rebooting.  Nothing - did not mount.
I think executed the same command (sudo mount...... with the ntlm switch set from terminal. 
Same result as before - error message on the first try, then on the second try it mounted.

I then tried your suggestion about mounting to the home directory.
Didn't work from rc.local, then when I tried it from the command line (after first creating a directory in my home folder of the same name) I got the same result.
Same error on first pass , then on second try i worked flawlessly. 

I am sorry to be asking such a precise question and to take up so much of your time.  Maybe someone else will profit from this somewhere down the road.  I am a classic windows refugee trying to make a small office network work, and maybe I am doing something that others will stumble on as well.
Reply
#13
Hi greenisland,

Not sure what to suggest at the moment, will do some digging...
Out of interest you could try Gigolo,
You can also configure it to Auto Connect to Shares

https://sites.google.com/site/easylinuxt.../reserve-6

Dave
Upgrades WIP 2.6 to 2.8 - (6 X 2.6 to 2.8 completed on: 20/02/16 All O.K )
Linux Lite 3.0 Humming on a ASRock N3070 Mobo ~ btrfs RAID 10 Install on 4 Disks Smile

Computers Early days:
ZX Spectrum(1982) , HP-150 MS-DOS(1983) , Amstrad CPC464(1984) ,  BBC Micro B+64(1985) , My First PC HP-Vectra(1987)
Reply
#14
Thank you Dave.  The reason for my issue is that I use a couple of programs that seem to work well when a network drive is "mounted" but do not work so well (or at all) when the connection is just a smb share such as gigolo sets up.  I don't know enough to understand the difference but maybe I can find a link from another forum.  At any rate, thank you for your efforts so far.

Here is something I read some time ago that gave a stab and explaining the difference:

"Is there any difference technically in the resulting connection between (1) adding the entry in fstab, and (2) using Dolphin in KDE to navigate over to the share? 

I realize that the fstab entry is "permanent" but I don't know if I should worry about getting it right in fstab if going through Dolphin creates the same technical result.

Yes, there is.

Using fstab will mount the network into the local filesystem, making it available to any other process like any other file.  It is completely application agnostic, and more in-line with the original Unix/Linux filesystem ideology.

Accessing it though Dolphin uses "kioslaves" (or, whatever their current KDE4 equivalent may be), without making the files "locally accessible".  Only (probably KDE/QT) aware applications will be able to properly access them, in even in those case, they may actually copy the file to "tmp" before accessing it.  This is most noticeable, for example, if you try to use LibreOffice in this way...opening the file will probably fail.

Personally, I would recommend the fstab approach, or manually (either at the command line, or through a batch file) mounting the resource into the local filesystem.

One thing I've noticed, that may be worth note, when I've manually mounted SMB shares:  on occasions where I've failed to un-mount them prior to shutting down or rebooting, the process would hang and require a hard boot.  I'm not 100% certain, but if it is in fstab, then un-mounting all mounted drives is part of the shut down process.
Reply
#15
Well after playing further with gigolo and also pyneighborhood, I have made zero progress.

However, what this has made me realize is that hitting the same command twice in the terminal window really isn't so bad after all.  Elegant it is not, but it is doing the trick.
Reply
#16
Hi greenisland,

I'm now at the limits of my knowledge on this.?
I really don't understand why it's failing,
I'm sure there is a clue in the fact that when done manually, it works 2nd time.!!

This is a thought, I have no idea how to do it, not done any scripts.
Create a script with the relevant commands X 2, and have it in your Auto Start-up
Not pretty or elegant, but may work.?

Dave
Upgrades WIP 2.6 to 2.8 - (6 X 2.6 to 2.8 completed on: 20/02/16 All O.K )
Linux Lite 3.0 Humming on a ASRock N3070 Mobo ~ btrfs RAID 10 Install on 4 Disks Smile

Computers Early days:
ZX Spectrum(1982) , HP-150 MS-DOS(1983) , Amstrad CPC464(1984) ,  BBC Micro B+64(1985) , My First PC HP-Vectra(1987)
Reply
#17
Hello!

In your script, you might be able to use a wait loop (if/then) to look for the text of the error message that stops it when it's echoed back, and then have the script execute the second command after that.

Just a suggestion...

73 DE N4RPS
Rob

[Image: EtYqOrS.png%5D]

A gun in your hand is worth more than a whole police force on the phone.
Reply
#18
Thank you Wirezfree and N4RPS for the suggestions. 

Along the lines of the above suggestions using sleep, someone (I think on the PCLINUX forum in the past) suggested this as a script in the rc.local file to make sure that the device was connected to the network before attempting to mount.  I used this is in the past with some success, so thought it might be worth adding here:

RC.LOCAL
       
        ( until ping -q -W4 -c1 google.com &>/dev/null; do
            sleep 5
          done
          mount /mnt/<servername>
        ) &

----------------------------------------

But that doesn't seem to be doing the trick for me this time, probably for the reason wirezfree says -- there's something about issuing the command once that makes it work the second time through, and I don't think it's because the wireless came up at that point. 

Just in case I wasn't clear before, this is a concern for me because I use some windows programs in Crossover/wine that don't seem to work properly unless the network drive is "mounted" to the file system.  I realize that's a kind of rare need, so it may not affect most people, who simply want a method of transferring files back and forth.  I think, that having fully mounted through fstab may be important for programs that hold files open for a long period of time (such as database programs, perhaps).

I did some more reading on the links I posted earlier about the bug reports on mount.cifs, and that does seem related to what I am experiencing.

Again, thanks to all, and if I figure this out I will report back.
Reply
#19
Hi greenisland,

Thanks for the update and trials.
Hang in there, I find it hard to believe it's a LL issue.
I'm doing another install tomorrow/Saturday.
I will be using the rc.local method, I will reverify my steps,
just in case I have missed something to pass on to you.

Dave
Upgrades WIP 2.6 to 2.8 - (6 X 2.6 to 2.8 completed on: 20/02/16 All O.K )
Linux Lite 3.0 Humming on a ASRock N3070 Mobo ~ btrfs RAID 10 Install on 4 Disks Smile

Computers Early days:
ZX Spectrum(1982) , HP-150 MS-DOS(1983) , Amstrad CPC464(1984) ,  BBC Micro B+64(1985) , My First PC HP-Vectra(1987)
Reply
#20
Thank you Dave, I feel quite sure also that this is not a Linux Lite issue.  The difficulties of mounting network drives (especially those on Windows computers) have plagued me for years across PCLINUXOS, Puppy, Solydxk, and now my new favorite distribution.  I read similar posts elsewhere and my pet theory is that this is one of those things that results from networking, and especially networking to windows machines, not being a first priority in the linux world itself.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)