Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!



Raspberry Pi as a N...
 
Share:
Notifications
Clear all

Raspberry Pi as a NAS

11 Posts
2 Users
0 Likes
150 Views
 Anonymous
Joined: 53 years ago
Posts: 0
Topic starter  

I have a raspberry pi 2b which I have been using as a NAS with an attached usb ssd to backup my linux lapttops. About a month ago it locked up and I couldn't restart it. I assumed the OS was corrupted so I re-flashed the sd drive with a new copy of the Raspian OS. Since I did that and installed Samba I can no longer access the usb drive on Linux laptops. I get an error message saying that i can't mount the USB in Linux.

I would really appreciate if anyone can help me solve this problem.


ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 9 years ago
Posts: 2236
 

Hi Bigbadjohn!

Sorry to hear you're running into issues with your setup. I do not have a setup like that, so some more details may be helpful.
Here a few initial thoughts that may be helpful ...

Did you configure the Samba shares and access rights correctly? (access to the shares - I presume this is what you're referring to)

On that note: When working on the RPI (SSH for example), can you access the USB drive(s)?

Does the "lsusb" command list the drives?


ReplyQuote
 Anonymous
Joined: 53 years ago
Posts: 0
Topic starter  

@hans 

Thanks for the reply.

I have added the lines at the end of the smb.conf file to set the permissions to 0777 and set public = yes. I don't know what else to do to set the sharing of the usb drive.

It is listed when I run lsusb.

If you have any other suggestions I would appreciate it.

Thanks,

John


ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 9 years ago
Posts: 2236
 

Do you have more details on the mount error?

Client side message (try from Terminal) and Server (RPi) side?

While trying to find the path for that log, I did run into these 2 posts, that may be helpful (trying to solve the same or similar issue):

https://raspberrypi.stackexchange.com/questions/3498/how-can-i-log-into-my-raspberry-pi-samba-share-from-windows

which refers to

https://superuser.com/questions/57092/cant-change-permission-ownership-group-of-external-hard-drive-on-ubuntu

Not sure if that is helpful or not, since I don't know the exact error message 😉 

Also worth looking into: do you use username/password to access the share? If not, then that may be the issue, since support for that kind of login seems to have been dropped initially by Microsoft (quite a while ago) and may have been adopted by the Samba team?


ReplyQuote
 Anonymous
Joined: 53 years ago
Posts: 0
Topic starter  

The error message says +Unable to mount -file does not exist.

I have tried attaching a screenshot of the error message but I don't know if it will work.


ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 9 years ago
Posts: 2236
 

Attaching images: yeah, the first few post will have to be manually approved before the forum allows posting images and/or attachments.
In this case it worked 😁 

Ouch, sounds like one of those random and not very useful messages.
Common mistake, which I doubt it will be, would be the wrong path (eg. local path versus share path).
But I'm confident you already checked that.

Next guess would be SMB protocol version (dialect) ...
A while ago this would be rather common with older NAS devices.
Add the "vers=x.y" option to your mount, something like this:

mount -t cifs //servername/someshare -o vers=3.0 /mnt/tmp

 

Default I believe SMB will try to go with version 2 or better. However, for example a version 1 mount to a version 3 server would fail.
Version 1 is the classic SMB protocol and version 3.x is currently the "common" SMB protocol. There are some changes in for example password encryption and such.

You could explore the "sec" parameter (security) - maybe give "sec=ntlmv2" a try as an option in your mount.

Are you seeing any errors elsewhere (RPi and laptop) ? (dmesg on either machine)

All this is kind-a odd, since it worked before. I think we can agree that it must be a config issue on the newly install Raspberry OS ...


ReplyQuote
 Anonymous
Joined: 53 years ago
Posts: 0
Topic starter  

Hello Hans,

I have tried the mount command options as you suggested but they both failed saying permi ssion denied. I am assuming that you meant for me to run it on my client laptop, which is what I tried.

I would really like to get this working again like it did for the past couple of years but I am getting frustrated and may have to resort to a real NAS.

Thanks very much for your assistance.

John


ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 9 years ago
Posts: 2236
 

Yep, I meant indeed that you should use those on your client laptop.

Permission denied at least indicated that the options have been used, but that something is out of sync still.
There is something wrong with your Samba config - or better said: there is something different - on your Samba config on the Raspberry Pi.
Too bad you do not have a backup of your old setup 😞  (I assume)

I would try to start from scratch with the smb.conf file on your Raspberry Pi. (follow this guide for example)

On your Raspberry Pi, can you see your mount attempts being rejected?
The SMB log used to be in "/var/log/samba", but this can be different on your Raspberry Pi.
It may reveal more details why the mount is rejected by you Raspberry Pi ...?

 

Note:
Switching to a real NAS: That is an option of course - I gravitate towards QNAP, as I have been using a few of those for 15 years now (at home, work, family and friends) and the experience has been excellent.
Most NAS devices will probably be much more reliable as well, but also much more expensive. 😉 


ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 9 years ago
Posts: 2236
 

Maybe useful: (it's an older guide, but gives some good pointers even for today's purposes)

https://www.samba.org/samba/docs/using_samba/ch12.html


ReplyQuote
 Anonymous
Joined: 53 years ago
Posts: 0
Topic starter  

Hello Hans,

I guess my attempts to solve this are finished. I have managed to destroy my Raspberry Pi. It will no longer boot.I got a new power supply but unfortunately the output was reversed and destroyed the Pi.

I attempted to order a new one but they seem to be unavailsble at the moment.

Anyway thanks for all your help.

John


ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 9 years ago
Posts: 2236
 

Oh man that s*cks ... 😞 
I'm sorry to hear that ...

Well, just give me a shout when you need help again! 😉 


ReplyQuote
Share: