Monday, January 16, 2012

Installing the MegaRAID Storage Manager Server on CentOS 6.2

First download the MegaRAID Storage Manager server software package:

http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/8.33-01_Linux_MSM.zip
 Then install the libs that it needs. Note that we're install libstdc++ x86 even if we're on an x64_86 OS.
yum install net-snmp net-snmp-utils libstdc++.i686 unzip csh
You should be able to log in to your MegaRAID device now via the MSM Console software from Windows! Cool!

Thursday, December 8, 2011

Dave's Tech Resources: Easy Fax to Email

Dave's Tech Resources: Easy Fax to Email: Attn.TO is a hot new service that provides drag and drop faxing right from your desktop.

Easy Fax to Email

It's been a while since my last post but I'm pretty psyched to be making this one. The company that I co-founded a few years ago is releasing a new product, call attn.to that make is really easy to send a fax online.


The attn.to system makes sending a fax from your computer as easy as copying files to a USB drive -- seriously! The interface is entirely drag-and-drop. You pick the files on your computer -- they can be image files too for those cheapo home scanners -- and drag and drop then into the file window on attn.to.


After you've uploaded your files, enter the recipient's name and fax number, your name and email address and the comments you'd like on the cover sheet. If the fax is one page or less, it's free. Seriously! If it's more than one page, the price is really straightforward -- just $1.29 per 5 pages, payable by PayPal. If something goes wrong with your fax and it's not received for whatever reason, you'll be automatically refunded by PayPal.


Just a few minutes after pressing send, you will receive your confirmation fax to email sheet. That's it -- no paper, no waiting, no hassle. Just super easy, quick internet faxing. Powered by attn.to!


If you didn't catch the URL that explains how to fax online, you can see how to fax at https://www.attn.to/


Enjoy!
Dave

Monday, September 12, 2011

Using RenWeb on a Terminal Server

RenWeb is a cloud-based school management program. It seems like it's a great little application and the price appears to be right too. A major problem with RenWeb is that it doesn't appear to be intended for a multi-user environment and can corrupt its own cache if you use it in a multi-user environment out of the box.

The solution is to create a temp directory for each user and then launch RenWeb from inside of the temp directory so that it creates a separate configuration file and cache directory for each user on the TS. Here are the steps to get this going on a TS environment:

  1. Create c:\RenWebUserData and make sure that all users have full access to it in the permissions tab
  2. Save the contents of the .vbs file (below) to a file called StartRenWeb.vbs
  3. Create a shortcut to StartRenWeb.vbs in the C:\Users\Public\Desktop folder
  4. Right click your new shortcut and change the icon to the RenWeb icon (can be found in c:\RenWeb, the base installation directory for RenWeb)
  5. Launch RenWeb for many users simultaneously and enjoy!
Place this script data into the StartRenWeb.vbs file by editing it with notepad (make sure there is not an extra .txt extension at the end of the name!)
On Error Resume Next  
Set objShell = WScript.CreateObject("WScript.Shell")
Set objNetwork = WScript.CreateObject("WScript.Network")

objShell.Run "cmd /C ""mkdir c:\RenWebUserData\" & objNetwork.UserName & """", 0, False

' now copy the renweb shortcut into that folder
objShell.Run "cmd /C ""copy c:\RenWebUserData\RenWeb.com.lnk C:\RenWebUserData\" & objNetwork.Username & """", 0, False

'  now run the program
objShell.Run "cmd /C ""cd c:\RenWebUserData\" & objNetwork.Username & " && C:\RenWebUserData\" & objNetwork.UserName & "\RenWeb.com.lnk""", 0, False

Wednesday, August 31, 2011

Moving a Logical Volume (LV) to a new Physical Volume (PV) in LVM2

When I create templates for VMStorm, I always need to make sure that we can increase the size of the virtual disk with ease. This generally means creating a PV on the raw block device rather than on a partition therein. Most linux installers (especially centos) won't allow you to do this from anaconda, so we have to do it after the fact. Here is the process to move an LV to a new PV with LVM2:

  1. Add the new disk (let's say it's /dev/sdc)
  2. pvcreate /dev/sdc
  3. vgextend VolGroup /dev/sdc (add the new space to the VG)
  4. pvmove /dev/sda2  (this is the disk we want to remvoe from the VG)
  5. vgreduce VolGroup /dev/sda2 (this removes the old disk from the VG)
  6. pvremove /dev/sda2 (this wipes the LVM labels from the original old disk)
Let's say that now we want to move the boot partition to a new drive:
  1. partition the new drive (let's say it's /dev/sdb) and create one primary partition with all of the space. use fdisk /dev/sdb for this.
  2. mount the new drive to /newboot (mkdir /newboot, mount /dev/sdb1 /newboot)
  3. copy the contents of the boot directory: cp -r /boot/* /newboot
  4. set up grub on the new boot drive:
  5. grub
  6. root (hd1,0)
  7. setup (hd1)
  8. MAKE SURE YOU UPDATE THE UUID IN /etc/fstab or the system will hang when it tried to reboot...
Let's say now that we want to rename the volume group:
  1. vgrename VolGroup ubuntu
And now we can rename the logical volume (lv):
  1. lvrename ubuntu lv_root disk1
  2. MAKE SURE TO UPDATE /etc/fstab OR YOUR SYSTEM WON'T BOOT!
  3. ALSO UPDATE grub.conf in /boot/grub/grub.conf with the new names
We've now completely replaced the hard drive in a LVM-based linux system, then renamed the lv and the vg -- all without a boot cd! WOW!

Tuesday, August 30, 2011

Apache Virtual Host Configuration

Apache is ubiquitous -- nearly every linux server used it up until very recently when some faster packages started gaining market share. Some of the configuration files required to set up apache can be a bit hard to manage though. One of the questions we get most frequently over at VMStorm, the managed cheap vps hosting company that I run, is about how to properly configure apache. Below is a simple virtual host configuration directive:
<VirtualHost 192.168.1.90:80>
        ServerName www.mydomain.com
        ServerAlias mydomain.com sub.mydomain.com
        DocumentRoot /home/mydomain.com/htdocs
        ErrorLog /home/mydomain.com/logs/error_log
        CustomLog /home/mydomain.com/logs/access_log combined
</VirtualHost>
Once you customize the directories and IP addresses in that directive and then place it in your sites-enabled folder in apache, you'll be cooking with gas!


Good luck! 

Tuesday, August 16, 2011

Hosted Linux Recovery Shell

I've been kicking around some ideas about the best way to provide the ability to 'recover' a hosted linux installation without the need for a traditional console (ie VNC to the console or IPKVM). 

Consoles are traditionally rather difficult to deliver over the internet in a way that's fast and secure. Some solutions that others have come up with include serial console hooked into a server that can do ajax-based delivery of the text on the serial console. That's a cool implementation that I like but seems really intensive to implement.

My most recent idea for easy remote recovery of a hosted VPS is this: dismount the hard drive from the VPS that requires recovery. Re-mount that drive as a secondary disk on a linux VPS that is running fine, ie, with net connectivity. Once the disk is mounted, use a chrooted SSH session to allow the owner of the broken VPS to remotely log in and fix their configuration files. This seems really elegant to me in that we can provide SSH access to the disk itself and allow the owner to recover network settings, without any crazy need for serial consoles, etc.