return to I Love My Journal
A Little Closer to Center...
Musings about Life, Linux, and Latter-day Saints.
Pages
About Me
Links


Tags
PERSONAL 520
SPIRITUAL 416
LDS 312
BOOK OF MORMON 237
SCRIPTURES 154
STUDIO-JOURNEY 129
RELIGION 112
LINUX 79
COMPUTERS 65
LIFE 60
GENERAL CONFERENCE 46
GENTOO 39
MISCELLANEOUS 37
MUSIC 37
PROGRAMMING 33
CARS 29
MICROSOFT 23
FAMILY 23
AUDIO 21
I LOVE MY JOURNAL 18
FUN 15
CHILDREN 12
CURRENT EVENTS 10
NATURE'S WAY 10
VIDEO 9
DRM 9
CONEXM 7
BABBLINGS 7
PROVO CITY CENTER TEMPLE 6
FRIENDS 6
HEROD THE FINK 5
GAMES 5
COMPUTER HARDWARE 5
DRUMS 4
HAND OF GOD 3
ADVERSITY 3
KDENLIVE 3
AUDIO HARDWARE 3
GENERAL INSANITY 3
STUDIO 3
THANKS4GIVING 2
CATS 2
MY JOURNAL 1
POETRY 1
FOREVERGREEN 1
EVERYDAY THOUGHTS 1
GOSPEL 1
PARENTING 1
YOUTH CONFERENCE 1
CHURCH NOTES 1
POLITICS 1


RSS Feed

RSS FeedSubscribe!
Mon - Feb 02, 2009 : 09:48 pm
amazed
   rated 0 times
>>next>>
<<previous<<
LVM2 Auto-Reconnect
I run a server in my home.  It's nothing more than a hobby-type server that runs gentoo Linux, a couple of web-sites, my myth-tv installation for my home-theater, and all the family files.  I also have about 150 compressed movies on there, all of which can certainly take up a lot of hard drive space.

I started this project back in 2004, and my little server just keeps chugging along.  It's gone through 2 motherboards, 2 CPUs, a root hard drive failure (which was 99% recovered thanks to the beauty of ReiserFS's fsck implementation), and about 4 sets of hard drives.

The reason for so many hard drives is quite simple.  I keep buying movies.  As the need for additional hard drive space goes upward, I simply buy another hard drive and (using the magic of LVM2), simply move all content from one hard drive, remove the hard drive, insert the bigger one, assign it the space, and voila! my movies directory magically has more space!

Anyway...  Because this server's gentoo installation has undergone some serious abuse over the course of 4 years, the installation was seriously getting foobed.  This isn't a server which just sits and runs.  Every month or so, I get the itch to try something new and funky on it, and then sometimes remove the new package, sometimes not.  I've switched between instable and stable for practically every package on there at least 5 times.

The wear and tear on this poor server was getting evident.  It only recognized one of the two CPU cores (and yes, I checked and re-checked the kernel), mythtv was forgetting to record stuff and crashing intermittently, and more and more stuff just didn't work quite right.

I think the original kernel installed on the box 4 years ago was around 2.6.8.  Anyway...  I digress.

To make this already-too-long story a bit shorter, suffice it to say that it was well past time to do a complete re-install of gentoo.

So, yesterday, I undertook the challenge and built my new server Linux installation, on my workstation, and after verifying everything, I powered the old beast down, removed the root hard drive, and put the new one in.

Now, my box has had from 4 to 6 hard drives in it through the years and at the time, there were 5.  Four of these hard drives were driven by LVM2 and ReiserFS.  Their destiny in life is to provide me a place to store about a terabyte of media.  The fifth was the root.

So, I completely assumed that removing the root hard drive would kill all the data needed to restore the LVM partitions containing my media.  No problem.  I backed it all up beforehand.

So, with the new hard drive in, I powered it up, fixed a few things I forgot, got it to boot, and all was good.

I powered it down to do some hardware maintenence, and just happened to be watching the shut-down scripts, and I was about to head back to the server, when I saw the system unmounting the LVM2 partitions which I thought had been deleted.

I had to do a double-take.

So, I powered it up, went to /dev, and sure enough...  All the nodes for my media were there waiting to be mounted to their directories.

I couldn't believe it!  Ever since the idea of a Linux-driven media server came to mind, I've depended on LVM2 to help keep things in check.  I've loved it.  It's done exactly what it is supposed to, and hasn't caused me any grief at all.  This was the icing on the cake.

So, I quickly mounted my "movies" node to a directory, and sure enough, a full listing of all my movies was glowing before my smiling face.  Although I was ready to restore it all, and had completely intended on it disappearing, all my original media on my server's LVM2 partitions were already good to go.

Thanks to all the intelligent developers working on LVM2, making my life a little bit better.  Keep it up.