Archive for December, 2009

Check temperature of HDD in a 3ware RAID card

Posted in Hardware, Linux, Monitoring, RAID, Storage, Ubuntu on December 20th, 2009 by alex – Be the first to comment

Recently I bought a 3ware sata raid card and installed 3 hard disks in it for a raid 5 array (maybe that’ll be another blog post), but I noticed that hddtemp didn’t read the temperature correctly anymore.
I figured this had something to do with hddtemp having to read through the raid card to get the temperature, so this is how I got temperature readings for my hard disks in the 3ware raid card.
This is done on ubuntu, but smartctl works on most linux distros so you can use the same instructions on other distros, apart from installing smartctl.
The smartctl script on ubuntu is found in the smartmontools package, so install it:

user@server:~$ sudo apt-get install smartmontools

Once that is installed, you can try the help command to make sure it got installed correctly:

user@server:~$ smartctl -h

If that works correctly, now we’re ready to read some temperatures.
Depending on the series of the 3ware card you have, the care is accessed through either /dev/twa or /dev/twe
Now, to read the temperature of the hdd in slot 1, the command is:

user@server:~$ sudo smartctl -H -d 3ware,0 /dev/twa0

Note that after the comma in 3ware,0 comes the number of the hdd slot you’re trying to read, going from 0 up. For example, for the hdd in the second slot, it would be 3ware,1
Also, I had my 3ware raid card in /dev/twa0, which might not be the case for your setup.
You might also want to look through the smartctl tool’s manual page because it’s quite a powerful tool for monitoring hdd performance and kicking off SMART tests on the hdds.

Share

VirtualBox 3.1 new feature: Snapshots

Posted in Ubuntu, VirtualBox on December 1st, 2009 by alex – Be the first to comment

A new feature in VirtualBox 3.1 is the ability to take a snapshot of a VM.
Each snapshot saves the state of the VM and you’re able to go back to it, just like version control.
This means that if you go back to a snapshot, you will lose all the changes you made after the snapshot.
Snapshots can be taken while the VM is running, so you can take a snapshot before installing a new program to play around with.
If something goes wrong with the installation, just start the snapshot and you’re back in the game.
A snapshot does not create a separate VM, so you’re still using the original VM, just modifying what’s on it.
Remember that if you go back to a snapshot, all the changes you made since taking the snapshot will be lost, so before going back, take another snapshot of the current state.
Now for the practice part.

The scenario is this: you have a fresh install of ubuntu on a VM called vbuntu.
You want to install something on it, but want to create a snapshot in case something goes wrong.

Look at the previous posts to see how to create the initial VM.
Once that is done, this is how you create a snapshot of the original VM called vbuntu, and call the snapshot initial_install

user@server:~$ VBoxManage snapshot vbuntu take initial_install

Then you do your install. If something goes wrong, you want to go back to the initial_install snapshot, here’s how to

user@server:~$ VBoxManage snapshot vbuntu restore initial_install

If your install goes well and want to create another snapshot before you install another program, you should take another snapshot, like above.

For more information about VirtualBox 3.1 snapshots check out the VirtualBox site.

Share