Page 1 of 1

Adding NAS to Conky

Posted: Sat Mar 23, 2019 11:19 pm
by dudesplace
Ok I been playing with Conky now for months, 4 different Distro's and numerous hardware config's.
Most every situation I could search and dig and figure out what I needed.
But on my recent build I got everything working but one that worked for every other Distro I used it on previously.
Using Conky 1.10.8 as installed by this link. https://www.hiroom2.com/2018/07/21/linu ... -conky-en/
Which I have used on every LM install and hardware I have, and some other distro's as well.

Trying to get my NAS drive to show in Conky.
I used to use the folowing method checking the mount first:
[sudo mount -t cifs //192.168.1.9/Download /media/NAS1 -o username=xxxxxx,password=xxxxxx,nounix,uid=1000]
If that mounted then:
[sudo mkdir /media/NAS1]
Then I add line in fstab:
[//192.168.1.8/Download /media/DUDENETNAS1 cifs username=admin,password=akb2357,nounix,auto,user,uid=1000 0 0]

And all worked well up to Mint 19.1, which broke auto mounts, and NAS drive mounting.
Since then the only thing that seems to work well is install Giolo, add the NAS drives, and auto start Gigolo so the the NAS auto mounts and displays on desktop.
Now just trying to figure out how to make it show the NAS drive in Conky.
My conky line to do that used to work:
${color}NAS1:${color}${alignr}${fs_size /media/NAS1} ${fs_used /media/NAS1}
${color orange}${fs_bar 8 /media/NAS1}
Sorry for the long post but wanted to give as much info as necessary to get the needed result.

Re: Adding NAS to Conky

Posted: Sat Mar 23, 2019 11:35 pm
by catweazel
dudesplace wrote:
Sat Mar 23, 2019 11:19 pm
I used to use the folowing method checking the mount first:

Code: Select all

sudo mount -t cifs //192.168.1.9/Download /media/NAS1 -o username=xxxxxx,password=xxxxxx,nounix,uid=1000
If that mounted then:

Code: Select all

 sudo mkdir /media/NAS1
Then I add line in fstab:

Code: Select all

//192.168.1.8/Download /media/DUDENETNAS1 cifs username=admin,password=akb2357,nounix,auto,user,uid=1000 0 0
I don't see how that could possibly work, even prior to Mint 19. Your mkdir is attempting to create a directory in a place that almost assuredly already exists if the drive is already mounted at that mount point, and the line in fstab is attempting to mount the network share to a directory that you don't seem to have created in the steps you've posted.

BTW, unless you use code tags, it's difficult to read your post. Enclose the output between [ⅽode] and [/ⅽode] code markers by selecting </> from the mini toolbar above the textbox where you type your reply.

Re: Adding NAS to Conky

Posted: Sun Mar 24, 2019 3:12 am
by dudesplace
Woops sorry pasted wrong line that was part of an old code.

Correction:

Code: Select all

sudo mount -t cifs //192.168.1.9/Download /media/NAS1 -o username=xxxxxx,password=xxxxxx,nounix,uid=1000
If that mounted then:

Code: Select all

sudo mkdir /media/NAS1
Then I add line in fstab:

Code: Select all

//192.168.1.9/Download /media/NAS1 cifs username=xxxxxx,password=xxxxxx,nounix,auto,user,uid=1000 0 0

Re: Adding NAS to Conky

Posted: Sun Mar 24, 2019 3:27 am
by catweazel
dudesplace wrote:
Sun Mar 24, 2019 3:12 am
Woops sorry pasted wrong line that was part of an old code.

Correction:

Code: Select all

sudo mount -t cifs //192.168.1.9/Download /media/NAS1 -o username=xxxxxx,password=xxxxxx,nounix,uid=1000
If that mounted then:

Code: Select all

sudo mkdir /media/NAS1
Then I add line in fstab:

Code: Select all

//192.168.1.9/Download /media/NAS1 cifs username=xxxxxx,password=xxxxxx,nounix,auto,user,uid=1000 0 0
The problem remains, you're trying to create a directory at /media/NAS1 while you've already got the device mounted at /media/NAS1. It won't work. The only way it would work is to create /media/NAS1, set the correct owner to the user, mount it, then if it mounts, add the line to fstab.

Re: Adding NAS to Conky

Posted: Wed Apr 10, 2019 11:54 am
by dudesplace
catweazel wrote:
Sun Mar 24, 2019 3:27 am
dudesplace wrote:
Sun Mar 24, 2019 3:12 am
Woops sorry pasted wrong line that was part of an old code.

Correction:

Code: Select all

sudo mount -t cifs //192.168.1.9/Download /media/NAS1 -o username=xxxxxx,password=xxxxxx,nounix,uid=1000
If that mounted then:

Code: Select all

sudo mkdir /media/NAS1
Then I add line in fstab:

Code: Select all

//192.168.1.9/Download /media/NAS1 cifs username=xxxxxx,password=xxxxxx,nounix,auto,user,uid=1000 0 0
The problem remains, you're trying to create a directory at /media/NAS1 while you've already got the device mounted at /media/NAS1. It won't work. The only way it would work is to create /media/NAS1, set the correct owner to the user, mount it, then if it mounts, add the line to fstab.
So are you saying that I should delete /media/NAS1,
and then add //192.168.1.9/Download /media/NAS1 cifs username=xxxxxx,password=xxxxxx,nounix,auto,user,uid=1000 0 0

Re: Adding NAS to Conky

Posted: Sun Sep 01, 2019 11:31 pm
by mgold1
Just create the directory BEFORE you try to mount the drive there. And you only need to type it once.