Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Strange issue during boot mounting multiple NTFS partitions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Techbart
n00b
n00b


Joined: 24 Jun 2014
Posts: 23
Location: Sweden

PostPosted: Tue Jun 24, 2014 9:05 pm    Post subject: Strange issue during boot mounting multiple NTFS partitions Reply with quote

'ello all! First time Gentoo user here, and I must say I'm loving what I see so far. Hyper tweakability, awesome community and a crazy fast system once configured without choosing insane kernel build params :p. Aaaanywhoo, I've got my base system installed by following the Handbook(tm), and everything works fine. However, when I've attempted to configure my automounts, I'm hitting a strange issue during boot where it fails to mount one of my NTFS partitions.

This rig is aimed at being a minecraft and media server, so I'm needing my external NTFS drives to hook up to my Gentoo box, but still be able to use them on other systems. I've made sure that ntfs support is working fine, emerged ntfs-3g as I've heard the kernel support is meant to be depracted, and sucessfully browsed to any NTFS device I connect and manually mount. I have a standard fstab config that automounts by UUID, and so far am only trying to mount 2 NTFS drives hooked up through a USB hub, and then to the Gentoo box. One of the drives is auto mounted on boot no problem, but the other isn't, simply receiving an init message during boot that it wasn't able to be mounted. Once I'm logged in, when I run "mount-a", the second NTFS drive successfully mounts according to fstab, so the only thing I can think of is that perhaps the USB hub is delaying the initialisation of some drives connected.

Soooooo, I'm wondering what steps I'd need to take in order to either create a custom init script that would do something like run "mount -a" after the localmount script has finished, or editing the localmount script itself in order to retry mounting from fstab. I have a pretty solid understanding of the concepts, but as far as execution is concerned, I've only just started to play with Python, so I'm a little out of my depth here. Any help would be greatly appreciated. Many thanks!
Back to top
View user's profile Send private message
Techbart
n00b
n00b


Joined: 24 Jun 2014
Posts: 23
Location: Sweden

PostPosted: Tue Jul 08, 2014 5:10 pm    Post subject: Reply with quote

Bumpity bump bump :)
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Wed Jul 09, 2014 3:24 am    Post subject: Reply with quote

Techbart wrote:
Soooooo, I'm wondering what steps I'd need to take in order to either create a custom init script that would do something like run "mount -a" after the localmount script has finished, or editing the localmount script itself in order to retry mounting from fstab. I have a pretty solid understanding of the concepts, but as far as execution is concerned, I've only just started to play with Python, so I'm a little out of my depth here. Any help would be greatly appreciated. Many thanks!
No need to charm snakes, working with shells is quicker, easier and less likely to result in bites. You could make use of the local rc script to mount, and unmount, the file system as a workaround. However, if you are going to keep the overall setup in place long term, locating and remedying the underlying issue would be a better approach.

Techbart wrote:
Bumpity bump bump :)
Poor, poor, Amy.
Back to top
View user's profile Send private message
Techbart
n00b
n00b


Joined: 24 Jun 2014
Posts: 23
Location: Sweden

PostPosted: Sun Jul 13, 2014 1:35 pm    Post subject: Reply with quote

Hehe, yeah Amy is how my head feels sometimes trying to tackle issues like this :p. As you mention and correctly assume, this is a long-term setup, since it's acting as my media, Minecraft, DNS and Apache server, so it's hardly ever turned off. The underlying issue, at a well-educated guess, is that either the hub or the drive itself is causing some kind of latency issue, or a stall in initialising the disk at a hardware level.

The main reason I'm using the USB hub is because several of the USB ports are fubar'd. The server itself is solid, only victim to its former life as a word processor and over-zealous office workers jamming pen drives in there with the fervour of a rabid ferret, thus busting up the prongs something fierce. So I'm kinda stuck with the configuration I have, which is why I thought - as it's such a trivial matter, not really affecting anything apart from my need to type "mount -a" after a reboot - I might take my hand to scripting as a workaround.

Is it possible that I might pick your mind as to the right approach in using the local rc script? Like I said earlier, I'm pretty solid on the concept of what I'm trying to do, I just don't possess any coding or scripting experience worth a poop. Cheers again :)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54214
Location: 56N 3W

PostPosted: Sun Jul 13, 2014 2:57 pm    Post subject: Reply with quote

Techbart,

It does sound rather like a race.

Build all of the USB support you need into the kernel. This way USB will have more time to settle before localmount is run as the USB subsystem will start earlier than with modules.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Mon Jul 14, 2014 3:59 am    Post subject: Reply with quote

Expanding on the approach suggested by NeddySeagoon, a quick and dirty way of working around a race like that (or at least testing for it) would be to add a call to sleep for a few seconds at the top of the start function in the localmount init script, as ever make a backup before twiddling bits in init scripts.

Techbart wrote:
The main reason I'm using the USB hub is because several of the USB ports are fubar'd. The server itself is solid, only victim to its former life as a word processor and over-zealous office workers jamming pen drives in there with the fervour of a rabid ferret, thus busting up the prongs something fierce. So I'm kinda stuck with the configuration I have, which is why I thought - as it's such a trivial matter, not really affecting anything apart from my need to type "mount -a" after a reboot - I might take my hand to scripting as a workaround.
If you happen to know anyone with a suitable soldering setup who owes you a favor, you might be able to fix the problem outright.

Techbart wrote:
Is it possible that I might pick your mind as to the right approach in using the local rc script? Like I said earlier, I'm pretty solid on the concept of what I'm trying to do, I just don't possess any coding or scripting experience worth a poop. Cheers again :)
Essentially, just stick what you do in a shell into a script with a name ending in .start in /etc/local.d, make sure the shebang line is properly formed and the script is marked as an executable. If local is part of your default runlevel, as it normally is, that should be all you really need to do. If you have any specific questions do not hesitate to ask.
Back to top
View user's profile Send private message
Techbart
n00b
n00b


Joined: 24 Jun 2014
Posts: 23
Location: Sweden

PostPosted: Fri Jul 25, 2014 6:00 pm    Post subject: Reply with quote

Ossum! Thanks very much desultory, that's exactly the information I was looking for. I tried to make sense of the official Gentoo init.d article, but the script examples it was using went a bit over my head. Just knowing that I can add any command I need - much like a bash script, which I have some understanding of -, naming it properly and storing it in the right location, is exactly the approach I was looking for.

NeddySeagoon, I appreciate the advice that the most optimal thing I could do would be to include the USB support I desire into the kernel, but as things stand I've only just started using Gentoo, and have it setup the way I need it. That's why I was looking for more of a simple patch approach, as it would be something that can quickly fix a very minor issue without my worrying that I might end up breaking the system with a kernel recompile (something I find more scary than adding a startup script), and it would be something I could do to gain a better understanding of init.d and basic scripting. Once I install Gentoo on another machine however - one that isn't acting as a server - I'll have more experience to work from so that recompiling a kernel won't be quite so daunting.

Thanks again for all the advice guys, much appreciated :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum