Derek Bodner’s Blog



Geek talk, sports and ramblings

Various Computer Things

I have a server at home that I used as a Samba server, so I can access my stuff from my desktop/laptop, as well as share stuff with Elyssa. I have it setup with two drives, one that I store the primary stuff on (shares, home dir’s, etc), and the other that I rsync the data to every night. I don’t want to set this up as a RAID1. The server only has 2 drive slots, so I don’t want it to be a RAID 1 in case there’s corruption, or in case of the “oh shit” deletion. Now if either of these happen, I have until the wee hours of the morning to catch it and restore from last night’s sync.

Anywho, I wanted to do a re-install, for various reasons (not the least of which was my growing dislike of CentOS). So I did one final sync over to the backup drive, booted off a livecd, and formated the primary drive (as I’ve got everything on the backup drive). Booted into my new environment, set everything up, went to mount the backup drive, only to see that I didn’t notice that CentOS had originally formated both as LVM’s. I haven’t used LVM’s much before, but didn’t think it would be a problem. I ran lvscan, saw the volume was being recognized, went to mount it, and it yelled at me to define the partition type. o_O. It was an ext3 partition … it should have mounted just fine. So I tried to defined the ext3 type, and said it couldn’t mount it (bad superblock was the error, I believe). Ah crap. I just formated one copy I had to re-install the OS. If this copy was toast, I was screwed. I had everything on this server. Music. Family Photos. Important documents. I just sat there staring at my computer for a good two or three minutes.

After the shock wore off, I took an external drive I had, and immediately created a mirror with dd, just to be safe. I then ran PhotoRec on the drive, just to see what I could recover if all else went bad. I was actually impressed with how much PhotoRec did recover, as it was most of the known file types. It was in completely random names, and I would have spent months going through the Photos figuring out what’s what (there are plenty of programs to rename mp3’s/music from the tags, so that wouldn’t have been a problem). But at least I had my data (for the most part).

Then I went back to playing with the ‘bad’ drive. After a while of trying various things, I just ran an fsck on it. Boom. logical volume mounted no problem. Copied data back to the primary drive, formated the backup drive, sync’d the stuff over, and I was back in business. Turned out to be nothing major, but it certainly had me scared for a little while. A drive failure immediately after I removed the redundant data would just be my luck.

After getting the new OS up and running, I installed smokeping on it, and have it testing google, and my 2 personal external servers I have. Comcast has been having some really high latency in the mornings, and whenever I call them up to complain, all I ever get is “we’re not seeing anything on our end”. Now I have something I can verify it with.

I also then installed vmware-server on my newly installed server. I was going to install VirtualBox, as it kinda irks me that vmware can’t run truly headless, as it is dependent on various X11 libs, but it turns out VirtualBox is as well. I guess I could have gone the Xen route, but I haven’t used it in quite a while, and I wanted something I could setup quickly. OpenVZ was out since I wanted both windows and linux. I currently setup a windows vps that I run 24/7, both for applications I use that may require windows, and for my family to login to so they can access the samba share and see any pictures I place on it. I then setup a ‘gentoo server’ for my brother so he can get his feet wet with Linux (without breaking anything of mine). I have gentoo server in quotes because I really just created the virtual environment, and booted it off a minimal install cd iso. If he’s going to learn, he should do so from the ground up.

No comments

No comments yet. Be the first.

Leave a reply