Posts tagged: Linux

Lazy Blogger

By Johnny, April 19, 2009 4:23 pm

The other day, I was checking on the comments on this blog and inadvertently received a message which I interpreted as spam. The message read, “Your a good, but lazy blogger.” Some might think that maybe a legitimate comment but the link provided with the message went to some obscure spam site. Well, they’re right! I am a pretty damn lazy blogger. Not to make excuses, lots of things are happening in my life. I’ve got maybe 5 projects at work. I’ve been working hard in starting one and maintaining the other one. You think with this economy, work would be slow. Not where I’m at.

I became a charter member and and officer for my company’s Toastmasters club (first one on the list). Sorry guys, this is only opened to employees of the company. I’m actually really excited about this one. For awhile now, I’ve been to join Toastmasters but with this opportunity, I can hone my public speaking skills. That’s one area I feel I need the most improvement on. Hopefully this will instill the skills I need.

I’m still settling in at my new home. Worked out a weekly routine now in which I pick a day to visit the folks and spend the rest of the week riding into work (if weather permits). I have my laundry day and my grocery shopping day on the bike. I’m definitely been car-lite. Only filling up twice a month. Riding about 50+ miles a week to work and running errands. I had a roommate who stayed for 3 months and moved out at the end of March. Although she was cool, it is definitely nice to have the whole place to myself. I am able to leave stuff all over the place as I choose. It is certainly one of those benefits where you couldn’t put any amount of money on.

My file-server died recently. I had to rebuild and recover the machine this past week. Upgraded to Slackware 12.2 for 10.0. Not much difference. I finally switched from a Dual Celeron computer to a P3 500Mhz . Yes very impressive. If you haven’t already realize, I don’t buy the latest and greatest when it comes to my computers. Heck, the computer I’m typing on was given to me by a co-worker who decided to buy a laptop when her hard drive died. It’s a P4 3Ghz w/HT Dell Dimension 4700. Decided to put Ubuntu 8.10. Main reason to see what the hype was all about. I have to tell you, I like it alot. I am able to do everything I can on a Windows or Mac system. I’m able to use virtual machines to run Windows for free using VirtualBox. I haven’t tossed my other systems away. Still using the laptops to portable access and the Mac for my home theater system. It’s nice to see how Linux has finally evolved to something that is useful and can compete with the likes of Microsoft and Apple.

Another thing I want to mention is that I’m thinking about doing 2 things that are going to be life changers. No, not get hitched! I’m thinking about going car-free. I read, “How to Live Well Without Owning a Car: Save Money, Breathe Easier, and Get More Mileage Out of Life” and got me thinking about a car free life. It is very doable considering I’ve already being car-lite. Even if I have to rent cars twice a month, I am not paying more than I am on car related expenses every year. I’ll be sure I’ll post up when that happens. The second big thing I am going to do is cut my hair. Not just cut it for my own selfish need. I am planning to donate my hair for a good cause.

See even guys can donate their hair. I’m thinking about giving it to this cause. I may or may not make a video like this guy but definitely some pictures will be required. Again, I’ll make sure to post up here. For more information on hair donation, check this page out.

Setting Up an ezRAID Enclosure

By Johnny, January 20, 2008 2:13 am

Another post inspired by the lack of information on the Internet. Here’s some background information. I run a Linux file server at home for about 5 years now. I recently hit the 80% capacity of a 200GB hard disk and was looking for more storage on my file server. The file server is a dual processor Celeron 500Mhz with the 200GB in a RAID 1 configuration and about 768MB of memory. That means my data is being mirrored between both drives. In theory if one should fail, I still have the other one. I also have an extensive back-up procedure using 2 external hard drives. I’ll go over that at a later time.

At first I wanted to rebuild my entire system and stick in a couple of higher capacity drives. That didn’t seem feasible since that may cost me a chunk of change and in reality, I don’t need a faster system. Just more storage. I had opened up my system and realized I couldn’t even add another disk controller since I am out of PCI slots. Since I have a Firewire card in the machine and my external drives are attached that way, I decided to see if there are any possibilities of getting a hard drive enclosure with Firewire (IEEE1394a specifically), RAID capabilities, and SATA drive interface. There were many that fulfilled 2 of the 3 features but there was only 1 that had all these requirements met. I even posted a question on LinuxQuestions.org to see if anybody had used this before. Unfortunately no one responded. Instead I was asked to see if I can provide some feedback. So here it is!

I snatched one up at FireWire Depot’s website. I also bought 2 500GB hard drive from Fry’s Electronics which was mentioned in the previous post. For $.18 per GB, it was the cheapest deal around. I was so tempted to get the 1TB drive but decided to save some money. That’s still plenty of storage for awhile.

The enclosure finally was delivered today. So I spent sometime installing and documenting the setup. But first let’s see what is included:

The Box
The Box Again
Here are a couple of pictures of the box that arrived

The Enclosure -Front
The Enclosure - Rear
A bit fuzzy but here are the front and rear of the enclosure. The box seems very well built.

Packaging
Here is what’s included. You get a power cord, Firewire cables (both 400 & 800), USB cable, some screws with the disk lock key, and a sheet of instructions. Pure and simple.

Ports
The ports in the back reveals 2 Firewire connections and a USB connection.

Racks
Here are both of the disk rack removed from the enclosure.

Enclosure - No Racks
The enclosure without the racks.

Fan
Under each disk rack, there is a fan for cooling.

Rack Rear
Empty disk rack. A view from the rear.

Rack Front
Front of the rack with a display and some buttons.

Ok, enough eye candy for now. Let’s see what is needed to get things setup on my Linux Slackware 10 system.

  1. I changed the setting on the enclosure to make sure that it treats the disks as a RAID 1 setup and nothing else. The number was suppose to be “0″. You do that by simply pressing on little “-” and “+” buttons with a pen or pencil tip.
  2. I changed the jumper settings on my disk to SATA I opting for reliability than performance. Even though the company I bought it from stated that SATA II was supported, the literature did not mention SATA II anywhere. Seeing that so many people are having DOA disk, it seems that they are using the disk in default setting of SATA II enabled.
  3. I installed both disk into the drive racks. It took 6 screws to hold a snug fit. The rack had a heat sensor that I had to slip in there. Fairly straight-forward.
    Disk Rack & Disk
  4. Plugged the drives back into the enclosure and connected the enclosure to my laptop. I powered the enclosure and the laptop on with System Rescue CD booting up (If you haven’t done so, I highly recommend downloading this and burning it onto a CD to add to your arsenal of tools for techie problems.).
    Enclosure On
    Shiny blue lights!
  5. Start X-windows and launched gparted. I used this tool to an upgrade of my laptop hard drive a couple of months ago. Excellent tool. It had no problems recognizing the single device. Remember, the OS has no idea that this enclosure is RAID 1.
    Gparted Screenshot
  6. Gparted asked me to create a disk-label. I selected MS-DOS, which was default. I did some research and found that this is correct for Linux systems.
  7. It then let me create a partition. I selected ext3 since my other drives on the box was ext3. It had no problems creating this partition.
  8. I then quit out of System Rescue CD and powered down everything.
  9. The enclosure was attached to the file server finally. Before I powered it on, I had to unmount and turn off the other enclosures. I also had create an entry of the /etc/fstab file and create the new mount point.

    /dev/sda1 /u2 ext3 defaults 1 2

    You may notice that this was created on the sda device. Depending on which devices is plugged in and powered first, it will get the first device name. This means the RAID enclosure must always be the first Firewire device plugged in and powered before any of the other enclosures.

  10. I finally powered the RAID device on. Unfortunately the system didn’t see the device. I had run the rescan-scsi-bus.sh script. Slackware 10 apparently has a bug that it won’t detect hotplugged Firewire drives without rescanning for it. I had to add the script call in my /etc/rc.d/rc.local file as well as the mount to the enclosure so that it boots up mounted. Why not upgrade to the recent Slackware? Nah! Upgrading to another version is a waste of my time when Slack 10 has been great. It may not be an elegant solution but it’s been working for 5 years now!
  11. Rebooted the system to double-check that the enclosure comes up. It did!
    My Server
    Here’s my server with the ezRAID enclosure sitting on top.

All-in-all a very simple implementation. I’m still testing the enclosure by transferring items into and out of it. Symbolic linked a couple of folders that I access through Samba and testing on both a PC and OS X system. I am streaming videos and music off of it. So far so good. Hopefully no dead hard drives. If so I’ll note it in another post.

**Edit 01/20/2008: This post is linked from the following website: http://technology.anything08.com/setting-up-an-ezraid-enclosure/. This looks like a generic blog that someone put together that takes posts from various blogs online. It thinks that this site is called Patrickâ??s Notebook? I did a quick whois search and found that it is owned by NameCheap.com. Looks like a parked site from a domain company.

Hard Drive Upgrade

By Johnny, September 23, 2007 5:46 pm

I got my Seagate 160GB laptop hard drive on Friday in the mail. Needless to say I was looking forward to bump my storage needs from a maxed out 25GB factory drive. I bought the drive refurbished from Computer Geeks online. It cost me about $100 which was alot cheaper than many of newer drives out there even in eBay. What began as a task that I was looking forward to in the week, finally ended now at Sunday evening. Copying a hard drive may seem to be a trivial task, since many people would just reformat and reinstall the operating system and all your software. I didn’t want to do that. I wanted to retain the same exact settings from my previous hard drive and did not want to go through reinstalling. I hate starting over when I don’t have to.

Back when I first worked as a System Administrator, I use to configure and build out similar laptops by first installing and setup 1 laptop with the exact software and settings required. I would then use, at the time, Norton Ghost to image the entire hard drive and saved the image on a server somewhere on our network and then use that image to duplicate on laptops with the same hardware. It was the coolest thing back then and would save alot of time versus setting up and installing manually. I did a quick Google search for “free hard drive cloning” which yielded several references to 2 free Linux-based solutions: Gparted and Partimage. They were both part of a live CD called SystemRescueCD. You use Gparted to setup your new hard drive’s partition and use Partimage to clone and restore a partition.

I could go through the excruciating tasks I had to endure but I’ll save that pain and give you a brief summary of what worked for me.

  1. Cloned all three of my partitions from my smaller hard drive to my Linux file server. I did this by booting up the live CD and issuing the following commands:

    mkdir /mnt/samba

    mount -t smbfs -o username:johnny //192.168.0.xxx/johnny /mnt/samba

    partimage -z1 /dev/hda1 /mnt/samba/location/to/image/folder/clonefilename.gz

    I had to turn on DHCP on the rescuecd start-up prompt by executing the command rescuecd dodhcp

  2. Physically installed my new hard drive.
  3. Executed the following command at the start-up prompt:
    rescuecd dodhcp dostartx This started the X-Windows with a valid network connection.
  4. I then used Gparted to partition all my partitions exactly the same as my previous hard drive. This step is important since I actually jumped the gun and partitioned the main boot drive to fill-up the disc’s maximum capacity. This rendered the partition unreadable from Windows XP. It only saw the original 25GB and not the 140GB. I also turned on the “boot” flag for the main partition that had Windows XP and turned the “hidden” flag on the other 2 partitions that wasn’t there in my original drive.
  5. I then started the x-term window and executed the command: partimage restore /dev/hda1 /mnt/samba/location/to/image/folder/clonefilename.gz.000. I did this for each 3 partitions.
  6. After all my data was restored, I rebooted the system into Windows XP.
  7. Windows XP sees the new drive and ask to reboot the system once again after it automatically installed the drive.
  8. I reboot again into SystemRescueCD and ran the previous command to start X-windows and DHCP.
  9. I opened up Gparted and chose to resize my partition from 25GB to the remaining unallocated disk space.
  10. I rebooted to XP again.
  11. XP automatically jumped into CHKDSK mode and revalidated the hard drive space.
  12. XP then boots into the operating system and finds the new hard drive. I then asked for me to reboot my system once again. I obliged.
  13. Voila! My new C: drive is now 140GB.

I probably left out alot of details but the general idea is captured here. I tried so many ways of setting this up which included an attempt to use 1 large partition, setting up a larger partition for the boot partition, etc. All this did was give me blank screens with a flashing prompt. I was never able to boot-up using the other methods. But when I finally followed the steps above, I was successful.

Just a bit of a warning. I’ve been using Linux for over 8 years now so I know my way around the operating system. Doing this requires alot of patience. Hopefully I did most of the grunt work for those who stumble upon this post to use.

My laptop is a Dell Inspiron 8600. The other 2 partitions are backup crap that Dell installs with every new laptop. I tried so hard to not include them in my new hard drive. Unfortunately, I was not able to do that. C’est la vie.

Drobo

By Johnny, June 17, 2007 8:43 pm

I was listening to TWIT’s 100th episode this weekend and they had mentioned Drobo. Drobo is a new USB hard drive which uses a much more intelligent way of protecting your data. They claim that it is a robot that manages the best use of your hard drive. It will shrink and expand your disk space as soon as you add or remove a drive from your array. It is also not picky of the size and brand of hard drives that gets inserted into the disk array. Just as long as it is 3.5″ drive with SATA interface.

This got me excited since my Raid-1 Linux server at home is close to 60% of capacity. This is only a 200GB file server. I figure I should be in the market for this or similarily a NAS device like Infrant’s ReadyNAS NV+. I stumbled upon an entry in the blogosphere from isnoop.net which briefly goes over the differences of each devices. One of the things I wish the Drobo would have is NAS capability so I can just plug this into my network and give access to multiple systems much like my Linux file server. The negative for ReadyNAS is that it won’t use all the available disk space if you had put in bigger disks. It would just use the least common denominator and default to the smallest disk size. Both negativity are critical in my opinion and I have decided that I will wait later to consider a new storage solution. I also read on drobospace.com that you can use an Apple Airport Extreme Base Station to attach the Drobo and have it serve like a file server. That wouldn’t work since I just got a new wireless access point.

What I have to consider is that if I replace my Linux server, I wouldn’t have the ability to offset any other features my Linux box gave me like bittorrent downloading. Yup, I even looked to see if the Drobo was Linux compatible. It is possible but not built in natively. Hopefully the NAS version of Drobo is coming out sometime soon. *Crossing my fingers*

Panorama Theme by Themocracy