Unbootable system since broken disk in /etc/fstab

inquam
Posts: 78
Joined: Sat Dec 11, 2010 12:22 pm

Unbootable system since broken disk in /etc/fstab

Postby inquam » Sat Jan 01, 2011 10:43 am

I have a setup of

Disk1: 300GB for system
Disk2: 1TB for storage pool
Disk3: 2TB for storage pool
Disk4: 2TB for storage pool

The other day disk 3 decided to stop working. The end result was a system that would not boot since I had the enteries in /etc/fstab and it complained about the file system. Quite easy to fix if you are by the computer, but since my system is a headless one this was quite annoying. My question is, would it work to have the munts being mounted by another script or something to avoid this? The best would actually be to have greyhole mount the storagepool partitions when it starts and having these defined in the grayhole.conf. If a disk would not function greyhole could mark it as gone and notify the user.

But what's the best way around this "problem" today? I don't want to be sitting with an unbootable headless system again anytime soon ;)
My HDA: Q6400, 8GB ram, 2x1TB disk in raid 1 for system drive, 6x2TB drives for storage

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Unbootable system since broken disk in /etc/fstab

Postby gboudreau » Sat Jan 01, 2011 12:15 pm

This is not really how Greyhole or Amahi works, but how Linux in general works.
Linux will just not boot if the drives in fstab are not working.

Greyhole will not take care of mounting drives (because that would be re-inventing the wheel).
You can mount the drives however you want. Just make sure you do it before the Greyhole service is started, or Greyhole might not be too happy to be missing all the data drives.

I guess you can either disable the watchdog on the greyhole service, and stop it from loading on boot, then in /etc/rc.local, mount your drives then start the Greyhole service.
Or you can leave the greyhole service as-is, and create a new init.d script that would run before Greyhole.
- Guillaume Boudreau

inquam
Posts: 78
Joined: Sat Dec 11, 2010 12:22 pm

Re: Unbootable system since broken disk in /etc/fstab

Postby inquam » Sat Jan 01, 2011 1:03 pm

This is not really how Greyhole or Amahi works, but how Linux in general works.
Linux will just not boot if the drives in fstab are not working.

Greyhole will not take care of mounting drives (because that would be re-inventing the wheel).
You can mount the drives however you want. Just make sure you do it before the Greyhole service is started, or Greyhole might not be too happy to be missing all the data drives.

I guess you can either disable the watchdog on the greyhole service, and stop it from loading on boot, then in /etc/rc.local, mount your drives then start the Greyhole service.
Or you can leave the greyhole service as-is, and create a new init.d script that would run before Greyhole.
Think I'll go the init.d script route... How do I ensure that this script is run before the greyhole script?
My HDA: Q6400, 8GB ram, 2x1TB disk in raid 1 for system drive, 6x2TB drives for storage

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Unbootable system since broken disk in /etc/fstab

Postby gboudreau » Sat Jan 01, 2011 1:17 pm

Hum. Just thought of something. I think there's an option in the fstab file that tells Linux to continue booting even if the mount fails.

And I think it's nofail: http://www.eazynet.de/nofail_option_in_etc_fstab
(didn't try myself - you can try by adding that option, then disconnecting a drive after you shutdown)
- Guillaume Boudreau

inquam
Posts: 78
Joined: Sat Dec 11, 2010 12:22 pm

Re: Unbootable system since broken disk in /etc/fstab

Postby inquam » Sat Jan 01, 2011 1:35 pm

Hum. Just thought of something. I think there's an option in the fstab file that tells Linux to continue booting even if the mount fails.

And I think it's nofail: http://www.eazynet.de/nofail_option_in_etc_fstab
(didn't try myself - you can try by adding that option, then disconnecting a drive after you shutdown)
That was way easier :)... Great!
What's the best way to get a notice from greyhole of a failed drive/partition used in the storagepool?
I saw something about email in the .conf but in the standard amahi settings for the storage pool there is no info of this. Is it possible to have it send an email or do I have to look at the greyhole.log from time to time?
My HDA: Q6400, 8GB ram, 2x1TB disk in raid 1 for system drive, 6x2TB drives for storage

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: Unbootable system since broken disk in /etc/fstab

Postby gboudreau » Sat Jan 01, 2011 1:39 pm

Emails are sent when something happens. They are sent to the user/email address in the config file (greyhole.yml & greyhole.conf in Amahi).
By default, 'root' is the recipient of those emails. You can change that to your own email address (in both files mentioned above).
You'll need to configure your server to be able to send outgoing emails too; that's not enabled by default on Amahi.
- Guillaume Boudreau

Who is online

Users browsing this forum: No registered users and 24 guests