Is it possible to enable a Linux or OpenSolaris based server to process standard unix login requests without spinning up the hard drive holding the root partition?

I have a Nexenta-based (1) server that uses a very old 40GB PATA drive for the root partition which could not reside in the main storage array (nor would I want it to, though it does back up to it). It performs well because everything that actively accesses storage uses the SATA raid2z array. This means that the root partition itself is actually completely inactive and the 40GB disk is usually left asleep.

Or rather, almost completely inactive. Login requests require the drive to spin up, causing both annoying login delays and unnecessary strain on this old drive which could otherwise remain completely dormant.

As far as I can tell, the drive is only accessed to read the passwd and shadow files, and I'm surprised that these do not remain cached in memory after first being read and thereafter unmodified. Is it possible to explicitly keep them cached, relocate them elsewhere, or otherwise prevent the root partition from having to spin up? (2)

  1. For those unfamiliar, Nexenta is a variant of Ubuntu that uses the OpenSolaris kernel and tool chain while supporting the Debian tool chain as much as possible. For the most part, I have access to the capabilities of both.
  2. Please note that I do not consider a suitable solution anything that breaks logins or bootup when the storage array is not present.

Could it be logging the logins to the wtmp and utmp files? It's not clear how it "never" accesses the root partition after startup, I assume that you've moved all of the files off of the disk. Is /etc on the 40G drive?

| improve this answer | |
  • /etc remains on the 40G drive along with all other system-needed directories. Regular-write files, like mysql databases/logfiles and subversion repositories, reside on the storage array. I was ignorant of the utmp and wtmp files. Looking into them, it appears Nexenta uses utmpx and wtmpx symlinks into /var/adm, which in turn appears to be a haven for anything frequently-written. My /var/log directory is clear of regular-write files (last modify was May for most, earlier for the rest). So if I can remap /var/adm to memory without breaking anything, the disk should stay asleep permanently. – HonoredMule Oct 19 '09 at 7:05
  • Simply removing /var/adm appears not to faze my running system in the least...log attempts fail silently for both logins and system logging without disrupting actual operations. Can anyone confirm that rebooting will work as smoothly? If so, I won't mind simply symlinking to the storage array and thus retaining persistent system logs. – HonoredMule Oct 19 '09 at 8:00

Does your BIOS support booting from USB? I think nexenta does, you could use a usbstick.

Otherwise a CF card with an adapter can be had for next to nothing these days and plugs straight to the IDE.

| improve this answer | |
  • +1 for the CF card! That venerable IDE drive sounds like it will brick in the most inconvenient moment. – lexu Oct 19 '09 at 4:47
  • I'd sooner rely on an old hard drive than a cheap flash drive. A dead drive is easier to diagnose and fix than random corruption, and replacing it will cost no more time, effort or money after bricking than now. Besides which, system boots occur only as frequently as upgrades and power outages (8 month average so far, I think). I seriously doubt the drive will ever fail if it stays off permanently. – HonoredMule Oct 19 '09 at 6:50
  • For what it's worth, the last CF adaptor I bought supported a master/slave card so you could have a mirror. Consider that you are putting way less strain on the card than a digital camera would. – gnibbler Oct 19 '09 at 11:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.