TechnicalDrive Pi mounting

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  william (WILLIAMA)  
 To:  ALL
41812.1 
Any Linux peeps:

I want to mount an external USB drive to my Raspberry PI 3 so that it attaches to a particular mount point on boot. When I put this in FSTAB

UUID=(my disk's UUID) /media/ownclouddrive auto nofail,uid=33,gid=33,umask=0027,dmask=0027,noatime 0 0

It does a weird thing. It's an NTFS formatted drive and I have the relevant NTFS package installed. It's empty apart from a txt file called TEST. It seems to mount but when I look at the mount directory 'ownclouddrive' I see all of the Raspian root folders and contents (BIN BOOT DEV ETC HOME and so on) and not the TEST txt file as though it's symlinked to root or something odd.

By default, the drive automounts to another mount point as well via the built in USB routines. When I look there (/MEDIA/PI/USB1) I see a nice drive empty apart from the TEST txt file. If I disable the USB automount it makes no difference, apart from not mounting to USB1.

Any ideas?
never trust a man in a blue trench coat, never drive a car when you're dead
0/0
 Reply   Quote More 

 From:  william (WILLIAMA)  
 To:  All     
41812.2 In reply to 41812.1 
well, thank you collective mind of teh. That 5 minutes or so thinking as I typed the question out gave me an idea.

Which I shall test.
never trust a man in a blue trench coat, never drive a car when you're dead
0/0
 Reply   Quote More 

 From:  ANT_THOMAS  
 To:  william (WILLIAMA)     
41812.3 In reply to 41812.1 
You could symlink the auto mount point to the place you want it to be. Also, I don't like the look of that fstab line. Let me get an ntfs example from my server.
0/0
 Reply   Quote More 

 From:  ANT_THOMAS  
 To:  william (WILLIAMA)     
41812.4 In reply to 41812.1 
UUID=yourdriveuuid /media/whatever ntfs-3g defaults,windows_names,locale=en_GB.UTF-8 0 0

That's what I use on an Ubuntu server for ntfs drives.

There might be some Pi specific bits to add for better performance and user ids but try that to start.
0/0
 Reply   Quote More 

 From:  william (WILLIAMA)  
 To:  ANT_THOMAS     
41812.5 In reply to 41812.3 
Yes, I could do a symlink. I may end up restoring the automatic USB mount and stick all the CHMODs and CHOWNs that I need in init.d and link from owncloud to the USB mountpoint.

I'm no expert on FSTAB syntax but it fits with the manual and I've seen some very similar recommendations for what I want to do (and yes, I know the interweb is full of peeps copying each others examples so that's no guarantee).

My theory is that the problem may be my using a drive powered from the Pi. I'm using a high quality power supply and I'm happy that there's bags of volts and amps and stuff to run everything, but, it sounds to me as though the drive powers down at least once during boot which suggests that some of the rails are being tested/played with on boot. My theory is that the drive is actually powered off when FSTAB is run. Just now I booted up with the drive unplugged and got exactly the same result, a folder with all the root folders visible inside. Now where did I put that USB cable with the extra power connector?

edit: crossed with your reply. I shall give that a try too. Thanks :)
never trust a man in a blue trench coat, never drive a car when you're dead
0/0
 Reply   Quote More 

 From:  ANT_THOMAS  
 To:  william (WILLIAMA)     
41812.6 In reply to 41812.5 
If you haven't already, and you think power is possibly an issue give this a go (assuming you're using a B+, 2 or 3)

Add
max_usb_current=1
To
/boot/config.txt
0/0
 Reply   Quote More 

 From:  william (WILLIAMA)  
 To:  ANT_THOMAS     
41812.7 In reply to 41812.6 
Finally got it going with an old powered enclosure for the USB drive. Thanks for advice, although this time the original FSTAB entry worked OK. The max-usb-current thing was interesting. I went and had a read and concluded that there are some clever people about.

Honestly, it's amazing how problem piles in after problem sometimes. One day you try something out and it works right away. Next day you try something else nothing goes right. I suppose that being an old z/OS mainframe sysprog/DBA/programmer used to TSO, DB2, REXX and COBOL I should know better than to play with Linux.

 
never trust a man in a blue trench coat, never drive a car when you're dead
0/0
 Reply   Quote More 

 From:  william (WILLIAMA)  
 To:  william (WILLIAMA)     
41812.8 In reply to 41812.7 
I should point out, in case anybody on teh is looking at Owncloud - setup is a fucking nightmare and it absolutely isn't a simple project for the Raspberry Pi.
never trust a man in a blue trench coat, never drive a car when you're dead
0/0
 Reply   Quote More 

 From:  ANT_THOMAS  
 To:  william (WILLIAMA)     
41812.9 In reply to 41812.8 
I played with Owncloud a while back (not on a Pi but my normal server), if I remember it worked fine but for some reason I ended up not using it any more. Home upload speeds at the time could have been the reason because I think I wanted to use it as a dropbox replacement.

Glad to see you got it working. Even though the newer Pis are better when it comes to power I've always had issues when it comes to power and USB devices. A powered hub or enclosure tends to fix the problems. Crap USB cables and rubbish cheap power supplies are often to blame too.
0/0
 Reply   Quote More 

 From:  CHYRON (DSMITHHFX)  
 To:  william (WILLIAMA)     
41812.10 In reply to 41812.8 
I did a test install of it a couple of years back on a regular x86 linux pc with lamp already up and running, and didn't find it too terrible, but I wasn't faffing around with external drive mounts either. Didn't seem terribly useful though.
Apple patents bold new innovation: a paper bag.
0/0
 Reply   Quote More 

 From:  william (WILLIAMA)  
 To:  ANT_THOMAS     
41812.11 In reply to 41812.9 
The problem for home users comes in little gotchas like dynamic IP addresses. So you give your Pi a static address and set up port forwarding and get some DNS help from noip.com or similar. At which point, enter the owncloud config file stage left. The help file for this is plain inadequate and arguably misleading. Certainly the default set up is no good for a home user - unless you only ever want to access your data from your home LAN. The interweb gives 100 different answers on how to set up the config file and if none of them work you're on your own as to whether it's port forwarding of NginX or Apache or Owncloud or...

So I haven't fixed that yet and it's only one of the problems I hit.
never trust a man in a blue trench coat, never drive a car when you're dead
0/0
 Reply   Quote More 

 From:  william (WILLIAMA)  
 To:  william (WILLIAMA)     
41812.12 In reply to 41812.11 
Got it up and running. It's free and so far it seems to work. It doesn't have the slick functionality of offerings such as dropbox and Google drive etc. but it actually has enough functionality to work and I'm sure that much of the lag and patchy connectivity etc. are down to my network which isn't exactly bullet proof enterprise standard. If you're in urgent need of a large amount of disk space that you can get at from multiple devices and across the internet, this might be worth considering.

The project has just had an acrimonious split as open source projects often do, with the founder developer and some of his fellow developers leaving to start Nextcloud (which is pretty well identical to ownCloud at the moment). Nextcloud seems to be run on a rather more traditional open source basis. No idea whether one or both will survive.
never trust a man in a blue trench coat, never drive a car when you're dead
0/0
 Reply   Quote More 

Reply to All    
 

1–12

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats