SkinZ
Posts: 2
Joined: Tue Jun 25, 2013 7:47 pm

NTFS Shares Not Automounting and other problems!

Tue Jun 25, 2013 8:25 pm

Hi,

I have a Raspberry pi model B

4TB ext USB HDD
16GB SD card running headless Raspian

I am trying to get a headless SABnzbd system up and running on the Pi with NTFS file structure on HDD (to use on windows systems)

Problem 1
The HDD doesn't seem to want to automount.
On boot via SSH (with ntfs-3g installed) -

Code: Select all

pi@raspberrypi ~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs           15G  1.7G   13G  12% /
/dev/root        15G  1.7G   13G  12% /
devtmpfs        235M     0  235M   0% /dev
tmpfs            49M  376K   49M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            98M     0   98M   0% /run/shm
/dev/mmcblk0p1   56M   19M   38M  33% /boot
pi@raspberrypi ~ $
Fstab reads as:

Code: Select all

proc            /proc           proc    defaults          0       0
/dev/mmcblk0p1  /boot           vfat    defaults          0       2
/dev/mmcblk0p2  /               ext4    defaults,noatime  0       1
/dev/sda1    /HDD   ntfs-3g   rw,default   0   0
# a swapfile is not a swap partition, so no using swapon|off from here on, use  dphys-swap$
However if i do a manual mount I get:

Code: Select all

pi@raspberrypi ~ $ sudo mount /dev/sda1 /HDD
pi@raspberrypi ~ $ df -l
Filesystem      1K-blocks     Used  Available Use% Mounted on
rootfs           15037448  1695808   12712284  12% /
/dev/root        15037448  1695808   12712284  12% /
devtmpfs           240516        0     240516   0% /dev
tmpfs               49756      376      49380   1% /run
tmpfs                5120        0       5120   0% /run/lock
tmpfs               99500        0      99500   0% /run/shm
/dev/mmcblk0p1      57288    18888      38400  33% /boot
/dev/sda1      3845694472 44624520 3605719836   2% /HDD
Problem 2
SAMBA is installed and smb.conf

Code: Select all

snip-
#======================= Share Definitions =======================

[homes]
   comment = Home Directories
   browseable = no

# By default, the home directories are exported read-only. Change the
# next parameter to 'no' if you want to be able to write to them.
   read only = no

# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
   create mask = 0700

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
   directory mask = 0700

# By default, \\server\username shares can be connected to by anyone
# with access to the samba server.
# The following parameter makes sure that only "username" can connect
# to \\server\username
# This might need tweaking when using external authentication schemes
   valid users = %S

# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
;   comment = Network Logon Service
;   path = /home/samba/netlogon
;   guest ok = yes
;   read only = yes

# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)

snip- 

[HDD]
  comment = Public Storage
  path = /HDD
  valid users = @users
  force group = users
  create mask = 0777
  directory mask = 0777
  read only = no


After manual mount as above I map a drive to \\192.168.1.114\HDD (logging in as pi/raspberry)

I see the HDD directory but it only gives read-only access via pc (cannot mk folders/files), but can mkdir on HDD via SSH

Problem 3

When I try to setup folders on SABnzbd I get the error about writing to /HDD

Should i be running "sudo sabnzbdplus" instead of "SABnzbdplus" at SSH command line?
Although when i try that, i cant seem to access it from web browser..

Many thanks in advance you linux gods!

Cheers
SkinZ

SkinZ
Posts: 2
Joined: Tue Jun 25, 2013 7:47 pm

Re: NTFS Shares Not Automounting and other problems!

Thu Jun 27, 2013 7:38 pm

Please could anyone help me with this? I'm really stuck :?
Help with any of the questions would be greatly appreciated.

Thank you

andrum99
Posts: 1637
Joined: Fri Jul 20, 2012 2:41 pm

Re: NTFS Shares Not Automounting and other problems!

Thu Jun 27, 2013 9:11 pm

You can test what happens on boot when Linux tries to mount everything in /etc/fstab using the command 'sudo mount -a'. This should give you more information about what it going wrong. I suspect you need to change the relevant line in /etc/fstab to this:

Code: Select all

/dev/sda1    /HDD   ntfs   rw,defaults   0   0
i.e. change 'ntfs-3g' to 'ntfs' and add an 's' on the end of 'default'. You might also want to consider the 'noatime' option.

Note that the NTFS file system is rather slow on the Raspberry Pi.

tgwiz
Posts: 4
Joined: Fri Jan 23, 2015 11:39 pm

Re: NTFS Shares Not Automounting and other problems!

Fri Jan 23, 2015 11:47 pm

I have a similar issue. The NTFS usb drive will not automount. I verified that ntfs-3g is loaded. The drive mounts perfectly from the command line, but not during startup. I have tried SEVERAL variations of the line in /etc/fstab and it doesn't seem to make any diff. I don't see any errors or problems in /var/log/messages. I also ran mount -a and it mounts!! Just won't do it from a hard start or reboot. I would almost think that the driver isn't getting loaded before /etc/fstab runs or something like that. I can see in /var/log/messages that the drive is being recognized during boot, but it just doesn't mount. After system is up, I run the mount command and its there perfectly.

I have tried the UUID and /dev/sda - no diff. I have tried every combination of anything I can find in any post on any forum and still no mount on boot.

Any help would be appreciated.

klricks
Posts: 8425
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA

Re: NTFS Shares Not Automounting and other problems!

Sat Jan 24, 2015 3:20 pm

tgwiz wrote:I have a similar issue. The NTFS usb drive will not automount. I verified that ntfs-3g is loaded. The drive mounts perfectly from the command line, but not during startup. I have tried SEVERAL variations of the line in /etc/fstab and it doesn't seem to make any diff. I don't see any errors or problems in /var/log/messages. I also ran mount -a and it mounts!! Just won't do it from a hard start or reboot. I would almost think that the driver isn't getting loaded before /etc/fstab runs or something like that. I can see in /var/log/messages that the drive is being recognized during boot, but it just doesn't mount. After system is up, I run the mount command and its there perfectly.

I have tried the UUID and /dev/sda - no diff. I have tried every combination of anything I can find in any post on any forum and still no mount on boot.

Any help would be appreciated.
Do you really need to have NTFS format? NTFS is only required if you have a need to physically remove the drive from the RPi and connect it to a Windows computer. Otherwise a Linux ext3 or 4 formatted drive will work fine for Windows & Linux access, and the NAS (RPi) will not suffer from the huge performance bog of the NTFS-3g driver.
Unless specified otherwise my response is based on the latest and fully updated RPi OS Bullseye w/ Desktop OS.

tgwiz
Posts: 4
Joined: Fri Jan 23, 2015 11:39 pm

Re: NTFS Shares Not Automounting and other problems!

Wed Jan 28, 2015 4:20 pm

klricks wrote:
Do you really need to have NTFS format? NTFS is only required if you have a need to physically remove the drive from the RPi and connect it to a Windows computer. Otherwise a Linux ext3 or 4 formatted drive will work fine for Windows & Linux access, and the NAS (RPi) will not suffer from the huge performance bog of the NTFS-3g driver.
So you are saying that NTFS is the problem? It seems strange that it mounts after it is bootup, but not during boot. I could spend the time to remove all the files (AV server) reformat and load them all again, but would really hate to go through all that just to find it still doesn't automount.

User avatar
DougieLawson
Posts: 42213
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: NTFS Shares Not Automounting and other problems!

Wed Jan 28, 2015 4:43 pm

Is your NTFS drive defined in /etc/fstab? That's what controls the things that get mounted during boot (or with a sudo mount -a command).
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

tgwiz
Posts: 4
Joined: Fri Jan 23, 2015 11:39 pm

Re: NTFS Shares Not Automounting and other problems!

Wed Jan 28, 2015 6:02 pm

Yes, it is in /etc/fstab. Running mount -a after it boots up mounts it perfectly. It just doesn't mount during boot. I have also tried several different syntax in /etc/fstab - using UUID, using ntfs vs ntfs-3g, different options, etc. And combinations of all. None of them mount during boot. After boot, they mount perfectly. So I know there is not a problem in the /etc/fstab.

I have this unit at my brother's house. Right now the solution is I wrote instructions on how to get into putty and run "mount -a" after it boots up to mount the drive.

Just weird it won't mount during boot.

klricks
Posts: 8425
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA

Re: NTFS Shares Not Automounting and other problems!

Wed Jan 28, 2015 6:13 pm

tgwiz wrote:
klricks wrote:
Do you really need to have NTFS format? NTFS is only required if you have a need to physically remove the drive from the RPi and connect it to a Windows computer. Otherwise a Linux ext3 or 4 formatted drive will work fine for Windows & Linux access, and the NAS (RPi) will not suffer from the huge performance bog of the NTFS-3g driver.
So you are saying that NTFS is the problem? It seems strange that it mounts after it is bootup, but not during boot. I could spend the time to remove all the files (AV server) reformat and load them all again, but would really hate to go through all that just to find it still doesn't automount.
No I don't know why you are having trouble with auto mounting? ... but my NAS setup (ext3) on model B has no problems with auto mount.
Unless specified otherwise my response is based on the latest and fully updated RPi OS Bullseye w/ Desktop OS.

User avatar
DougieLawson
Posts: 42213
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: NTFS Shares Not Automounting and other problems!

Wed Jan 28, 2015 7:07 pm

That's because ntfs uses a userspace driver, not a kernel driver so it can't mount until the last thing in the boot process.

Move your data, reformat as ext4, move your data back.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

tgwiz
Posts: 4
Joined: Fri Jan 23, 2015 11:39 pm

Re: NTFS Shares Not Automounting and other problems!

Thu Feb 05, 2015 8:15 pm

Changing drive to ext4 worked. It does mount on boot. However I was using a windows machine to load more files and windows doesn't recognize the drive now. I guess I will have to load files from Linux.

Thanx for the help!

- tom

klricks
Posts: 8425
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA

Re: NTFS Shares Not Automounting and other problems!

Thu Feb 05, 2015 8:44 pm

tgwiz wrote:Changing drive to ext4 worked. It does mount on boot. However I was using a windows machine to load more files and windows doesn't recognize the drive now. I guess I will have to load files from Linux.

Thanx for the help!

- tom
Many Linux distros have a trial 'live' version which boot to RAM and leave the Windows untouched.
You could make a Live Linux boot CD or USB stick and temporally boot your Windows computer to Linux then copy your files over.
Unless specified otherwise my response is based on the latest and fully updated RPi OS Bullseye w/ Desktop OS.

jslay
Posts: 1
Joined: Fri Feb 20, 2015 9:53 pm

Re: NTFS Shares Not Automounting and other problems!

Fri Feb 20, 2015 9:55 pm

First, anytime you are trying to add an external drive in fstab, you need to be using a UUID. It is not wise to use /dev/ with external devices, as they might change.

Code: Select all

sudo blkid
this will list you UUID

In /etc/fstab

Code: Select all

UUID=xxxxxxxxxxxx /home/wd ntfs-3g defaults 0 0
This is likely to fix your issue, as it is separate from waiting for the devices to be listed under /dev/

UUID is addressable even from BIOS/boot loader.

Return to “Troubleshooting”