LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Problem with a Samba mount (https://www.linuxquestions.org/questions/linux-software-2/problem-with-a-samba-mount-4175535889/)

Ali3n0id 03-05-2015 04:19 PM

Problem with a Samba mount
 
Hi I've got a 1.5TB drive I use as a network mount controlled by fstab and samba, however the drive does not mount upon booting. Issuing a 'mount -a' mounts the drive correctly, I then restart samba and shaboom it works.

However it seems to unmount itself randomly, when I was copying some files from it today the mount just disappeared so I had to restart the server.

My /etc/fstab looks like:

Code:

# /etc/fstab: static file system information.
#
# <file system> <mount point>  <type>  <options>      <dump>  <pass>

proc    /proc  proc    defaults        0      0
/dev/mmcblk0p2  /      ext4    defaults,noatime        0      1
/dev/mmcblk0p1  /boot  vfat    defaults        0      2
/dev/sda1      /media/Crypt    ntfs-3g defaults,locale=en_GB.UTF-8    0      0

'mount' displays:

Code:

/dev/root on / type ext4 (rw,noatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=437856k,nr_inodes=109464,mode=755)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=88432k,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=176860k)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda1 on /media/Crypt type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)

My Samba config is:

Code:

[Crypt]
comment = Crypt
path = /media/Crypt
browseable = yes
#writeable = yes
valid users = @users
force group = users
#create mask = 0777
#directory mask = 0777
read only = no


My thinking is it's something to do with ntfs-3g...

Ali3n0id 03-05-2015 04:36 PM

/var/log/syslog implies that drive disconnected and it's using usb 1-1.3? The drive is running USB 2.0

Code:

Mar  5 22:01:29 box kernel: [524973.048356] usb 1-1.3: USB disconnect, device number 5
Mar  5 22:01:30 box kernel: [524973.067530] sd 0:0:0:0: [sda]
Mar  5 22:01:30 box kernel: [524973.067559] Result: hostbyte=0x01 driverbyte=0x00
Mar  5 22:01:30 box kernel: [524973.067575] sd 0:0:0:0: [sda] CDB:
Mar  5 22:01:30 box kernel: [524973.067588] cdb[0]=0x2a: 2a 00 6c 32 27 40 00 00 f0 00
Mar  5 22:01:30 box kernel: [524973.067657] blk_update_request: I/O error, dev sda, sector 1815226176


michaelk 03-05-2015 06:33 PM

I assume the drive is connected to the RPi and not version 2. What is the make/model of your drive? Is the drive USB powered?

It might be pulling to much power at start up and when it spins up and also assume that this is a mechanical vs SSD. If it is USB powered then I suggest getting a powered hub.

As a side suggestion I would reformat the drive as ext4 vs NTFS. Makes things a little neater. Be sure to backup any data prior since reformatting will erase all data.

Ali3n0id 03-06-2015 04:53 AM

This is actually connected to a Pi2, good suggestion I'll connect it to my hub (didn't originally as I thought the Pi2 had corrected problems with it's USB power) if the problem persists I'll format over o EXT4 - only reason I didn't initially is that makes it a little easier to pull data from it on 'other platforms'.

The drive is connected via a USB cable with it's own 12V 2A self powered supply. The make is 'CiT'.

Pi2 is powered by a 5v 2A power supply.

rtmistler 03-06-2015 08:36 AM

Quote:

Originally Posted by Ali3n0id (Post 5327744)
This is actually connected to a Pi2, good suggestion I'll connect it to my hub (didn't originally as I thought the Pi2 had corrected problems with it's USB power) if the problem persists I'll format over o EXT4 - only reason I didn't initially is that makes it a little easier to pull data from it on 'other platforms'.

The drive is connected via a USB cable with it's own 12V 2A self powered supply. The make is 'CiT'.

Pi2 is powered by a 5v 2A power supply.

Still don't believe the Pi is going to be capable of powering USB accessories no matter how much current you make available for it. The Pi2 did not add USB powering capabilities, instead they added two more ports. The bridge chip on most PC's provides power up to 2A per USB bus for peripherals, the ARM does not have this and most of the bridge chips they're using also do not have these capabilities.

However the drive is powered differently, as you've already cited. Therefore I'm confused a bit. You mention connecting it to a hub. Well whether a hub or a cable, if there is sufficient power provided to the USB accessory via external power, then it doesn't matter whether it's a hub or direct cable. Reformatting the drive is probably too reactionary of an early diagnostic.

What I'd do is see if that drive worked with a normal x86 architecture. Do you have a full PC setup where you can test it? If so, and if the drive works fine in that case, then it's not the format or contents on the drive but instead the power being provided to it. 2A should be sufficient.

It's not one of those 50 foot powered CiT USB cables is it? The power there would likely be chewed up by the line propagation for the length of such a cable. Instead try to find and use a normal length < 6 foot USB cable. And if this means that you need to swap over to a powered USB HUB, then so be it.

Ali3n0id 03-16-2015 11:16 AM

I took your advice as recommended and the some issues came up even on my Desktop machine - I eventually worked out that the hard drive enclosure only supports upto ~1TB and haven't had an issue since.


Thanks again

rtmistler 03-16-2015 11:51 AM

Quote:

Originally Posted by Ali3n0id (Post 5332937)
I took your advice as recommended and the some issues came up even on my Desktop machine - I eventually worked out that the hard drive enclosure only supports upto ~1TB and haven't had an issue since.


Thanks again

Glad you got it worked out. Can you mark the thread as solved and perhaps consider posting some of the details of the final problem solution?

You did post the solution, but in general form and maybe if there are some specifics which can help someone in the future, it would be beneficial to them to see a documented solution.

Regards,

- RT


All times are GMT -5. The time now is 08:30 AM.