Smb server with fstab

Hi there,

I’m trying to automount an smb server using fstab.
I tried autofs for a while but i couldnt get it working so i uninstalled it.
Someone told me that i don’t need it anyway so…

it did the following:

sudo nano /etc/fstab
//WindowsPC/Share1 /mnt/mountfoldername cifs rw,username=admin,password=xxxx,iocharset=utf8,sec=ntlmv2 0 0

After that i mounted all in fstab like this:

sudo su (i can’t mount all without root priviledge)

mount -a

I tried df -h after that and it was mounted.
I also could make folders on the server with sudo mkdir (checked it on laptop who also has acces to the smb server).
But for some reason it won’t automount it on boot. I even tried adding noauto,x-systemd.automount to the mountoptions in fstab.
Also tried writing a mountscript similar to this: networking - Automatic mounting of NAS drive fails - Raspberry Pi Stack Exchange
So basically i’m pretty desperate :?
Am i missing something here?

Instead of hostname (WindowsPC1), use the numeric IP address.

tried it, same result. I can manually mount it but no auto mount at reboot:(

After you try mounting it run dmesg. What error does it report for CIFS

I didn’t mention that i use a hard drive that is formatted HFS+. I used “sudo dmesg reboot” and the last line is this: “write access to a journaled filesystem is not supported, use the force option at your own risk, mounting read-only.”

Why sudo dmesg reboot?
Try running

sudo mount -a

and then

sudo dmesg

Post the last few lines of the output - one of them shoul refer to the mount failure.

1 Like

“write access to a journaled filesystem is not supported, use the force option at your own risk, mounting read-only.” The weird this is that i can make folders on it. Als within folders that are already created. I will format it to non-journaled.

hello again,

I have formatted my drive and edited /etc/fstab
when i use sudo dmesg it still says: “write access to a journaled filesystem is not supported, use the force option at your own risk, mounting read-only.”
When is use force in the options dmesg says: CIFS: Unknown mount option “force”.

I read somewhere that i need to install hfsprogs.
mounting would be something like this:
sudo mount -t hfsplus -o force,rw /dev/sdx# /media/mntpoint
But i think that is for a physically mounted drive.

My /etc/fstab looks like this:
//servername/sharefolder /mnt/smbserver cifs username=admin,password=xxxx,iocharset=utf8,uid=99,gid=99 0 0

If your intention is to share the HFS drive via Samba and it is attached to the OSMC device, you simply need to install Samba server from the App Store. It should be automatically shared.

No i have a Samba server set up on my router. I want to acces it from my raspberry pi.

Then you don’t need to touch hfsprogs or anything like this at all. CIFS is a network based filesystem, and we don’t need to worry about the filesystem of the drive.

I had another hfs+ drive plugged in my raspberry pi and it probably was listed in fstab.
That caused the line in dmesg about not supporting journaled file system.
But for now, i really don’t know why it’s not mounting at boot.