ok i have Plex running on a Raspberry Pi with a USB Hardrive attached to it and this works great, it can see the media and it all indexed fine.
I decide to brush the dust of my WD MyCloud 3TB box (single bay) and from windows i can see the share fine via \IP_Address…
I’ve installed Plex on my Desktop and it is happy with the above (i dont need to create a mapped drive) and indexes ok.
so i’d like to use the WD via the Pi instead (i dont keep the pc running all the time) … so when i had a library i can only see the local
linux shares, the USB drive is in the /MNT/ folder already…
So do i need to create a manual folder in the /mnt area and then somehow link the UNC path to that folder…
on the windows version i was able to just use the UNC Path for the library folder… doesnt seem to let me on the Pi version.
just checking to see what the correct method is… thanks.
i notice my Pi had SMBClient preinstalled… so in the end the following command worked.
mount -t cifs -o user=,password= //{IP_ADDRESS}/Public /mnt/wdmedia/
now on the WDMyCloud, there is a Public folder which doesnt require any username/password to access it. In Windows
i could just get to the folder no problem and that what i wanted to get via the Pi. so the above will do that.
Now on the WD i can create password user folders so the above i could refine so it passes the correct Creds.
maybe there was/is a better way…
now i need to make it so that it gets mounted if i reboot… guess that where FSTAB file comes in…?
I have a MyCloud Ex2, but I assume they are practically the same regarding the software on them. I had to do a lot of google research & trial and error but eventually got an FSTAB setting to reliably mount the relevant shares on boot up.
I would note that this uses the MyCloud’s IP address. If you are using DHCP then this may well be regularly changed by your router. You need to log in to your router and assign a fixed IP address. On my UK Virgin Media router I believe this was called IP reservation, so you will need the MAC address
sudo apt-get install nmap
nmap -sn 192.168.0.1/24
I also found that I needed a user ID on the MyCloud that matched my Ubuntu login username. Just go into the web console and create a new user.
I documented this for myself in case I need to redo everything again. I may have forgotten what some of the steps actually do, but google is your friend!
sudo apt-get install cifs-utils
Make a new directory for each share sudo mkdir /media/sharename
sudo chmod 777 /media/sharename
Putting your login credentials in plain view in the FSTAB file is poor security. I used a credential file instead;
gedit ~/.smbcredentials
Enter your Windows username and password in the file: username=MyCloudusername
password=MyCloudpassword
Save the file, exit the editor.
Change the permissions of the file to prevent unwanted access to your credentials: chmod 600 ~/.smbcredentials
Copy your old FSTAB file as a backup sudo cp /etc/fstab /etc/fstab_old
sudo gedit /etc/fstab
Add in the following lines at the bottom of the file //192.168.0.xx/sharename /media/sharename cifs credentials=/home/ubuntu_username/.smbcredentials,iocharset=utf8,sec=ntlm 0 0
Thank you for the nice little write up… thats pretty much where i have ended up…
I really should document all the bits i like that then worked, as i intend to start over but without all the bits that i installed
for testing different attempts.