Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General > Member Success Stories
User Name
Password Member Success Stories Just spent four hours configuring your favorite program? Just figured out a Linux problem that has been stumping you for months?
Post your Linux Success Stories here.


  Search this Thread
Old 03-11-2011, 02:52 PM   #1
Registered: Jun 2005
Location: Fargo, North Dakota
Distribution: Debian Stable
Posts: 238

Rep: Reputation: 42
Smile [SOLVED] External USB + LVM2 + Boot Sequence Race Condition

This has been a problem for me for several years. I am enamored with LVM and most of my system are on LVM logical partitions. As a result, I don't generate a bootlog, since when I mount the /var logical partition, it causes anything resembling a bootlog to scream and die, so I couldn't access a bootlog to see what was happening.

I had been having a race condition when mounting the logical partitions during the bootup init sequence, and had been misdiagnosing the problem since the beginning. I had originally written a script as a kludge and linked to it in /etc/rcS.d, but when I built my new computer, the race condition appeared again, even with my kludge script.

I then started backtracking through the /etc/rcS.d directory to discover where, exactly, the race condition existed. After about a billion reboots of testing several changes to the init scripts, I think that this is, finally, a valid solution to my problems, although there is always the possibility that I am still dead wrong.

I think the race condition was in the /etc/lvm2 script. The external drives didn't have the time to spin up and have the logical volumes recognized and activated before the script gave up on them and decided that they couldn't be mounted, then the /etc/ script (which fscks the filesystems) couldn't recognize the logical volumes as legitimate partitions, which caused fsck to throw an error on the filesystems on the logical volumes.

I took the brute-force-kludge-approach and I inserted a delay into /etc/lvm2 (start) by way of having it attempt to activate all logical volumes twice. I hope this solves my race conditions with my external logical volumes on USB, and I'll have to write a non-brute-force kludge in that script.


booting, externalharddrive, init, lvm2, usb disk

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible race condition between HID-USB and i8042 Linux - Kernel 2 02-11-2009 05:25 AM
What is race condition? LinuxInfo Programming 1 09-15-2008 10:44 PM
Kded race condition during automounting SpelledJ Slackware 6 10-25-2007 02:51 PM
Race condition in /etc/rc.d/ with latest -current ? Yalla-One Slackware 1 08-06-2006 03:23 PM
race condition in close socket?? jwstric2 Programming 3 03-18-2005 06:01 PM > Forums > Linux Forums > Linux - General > Member Success Stories

All times are GMT -5. The time now is 05:28 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration