Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Sunday, August 2, 2009

Growing an XFS partition on Amazon EBS

Amazon EBS is Amazon's Persistent Storage service. I think of it as the ability to have a "thumbdrive in the clouds". I can then "attach" that drive to an Amazon EC2 instance (a machine in the clouds).

Today I needed to add space to a filesystem. The filesystem was 10G XFS partition and I wanted to make it 30G. (don't try this if you're not using XFS, some of these notes are XFS specific).

With the help of Elastic Fox this is pretty easy. Also make sure that you have the xfs_growfs application installed on your server. On Ubuntu/Debian 'apt-get install xfsprogs'.

update: You can do all of this with Amazon Web Console now, Elastic Fox is not the recommended choice.

1. Under ElasticFox > Volumes and Snapshots, I selected the Volume I wanted to work with and chose "create a new snapshot from this volume"
2. Under ElasticFox > Volumes and Snapshots, I selected the newly created snapshot and chose "create new volume from this snapshot" (making sure to specify a size of 30G).
3. Then I detached the old volume and attached the new volume (in this case to /dev/sdp)
4. Finally, I logged in to the server and ran the xfs_growfs command 'xfs_growfs /dev/sdp', my filesystem "magically" grew to be 30G.

I've been working, on and off with EC2 for a few months now. We now have clients hosted on EC2 based infrastructure. Amazon's Elastic Compute Cloud (EC2) is a utility that makes it possible to run virtual machines (Linux,Windows and others) on remarkably powerful infrastructure provided by Amazon.

update:
Recently I tried attaching my new volume to a different device '/dev/sdg' in this case. When I tried to mount the new device I got a 'wrong fs' error. The problem is that I was not able to mount the new device while another device with the identical UUID existed. The solution was to run the following command which generates a new UUID for my new device:

xfs_admin -U generate /dev/sdg

Saturday, May 23, 2009

Ubuntu in Windows

I couldn't take it anymore, been using this windows XP laptop for almost 48 hours. I finally cracked and decided to get Ubuntu on this thing. Since I'll need to return this machine unaltered (read, with Windows still on it). This is my recipe:

1. Download the Desktop ISO of Ubuntu from ubuntu.com

2. Install winxpvirtualcdcontrolpanel this makes it possible to mount the iso as if it were a virtual cd drive, this was the hardest step, it involves moving a special file into the system32/drivers directory and adding a new virtual drive (budget 5 minutes for reading the readme and figuring out stuff)

3. Mount the ISO to a drive in windows, using the winxpvirtualcdcontrolpanel tool. I used the Z drive for my name

4. Launch the "virtual cd" and select "install in windows"


That's it. You'll be asked for an admin username and password and then after a few minutes you'll be prompted to reboot.

That's it. I'm now up and running and so far the important stuff just works, wifi, internet, wifi, internet......

Saturday, October 13, 2007

Run,swim, install IE6 on OS X

Morning (uhm) Run


I brought my young daughter along for the morning run with the jamdammers, the plan was to have her ride her bicycle next to me while I ran. Unfortunately she had other ideas about the riding (like not riding). So I went at her "running" pace, which was mostly walking. I eventually managed to convince her to ride while I ran and held the handlebar with one hand.

This did not help with my half marathon preparation, but overall it was good family time.

The battle for IE6 on OS X


Meanwhile, back home, I had left xcode 2.4.1 (xcode_2.4.1_8m1910_6936315.dmg) downloading on my Macbook. Hopefully xcode would be the last piece of the puzzle in getting ies4linux installed. After my macports port of wine choked on installation, my research suggested that it was due to a problem with the version of the compiler (gcc) that ships with xcode 2.2, so I got xcode 2.4.1.

Took a swim


The download was still going, no worries, we were going swimming anyway. Our youngest really loved the swimming pool.

Back to Xcode


Back home the xcode download had finished and I installed the dmg file which upgraded the current version of Xcode.

Since my inital build failed, I found that I needed to move the failed build before I could install wine successfully.

sudo mv /opt/local/var/macports/build_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_wine /tmp/

Then I was able to run the port command as follows:

sudo port install wine

The output looked something like this:

---> Fetching wine
---> Verifying checksum(s) for wine
---> Extracting wine
---> Configuring wine
---> Building wine with target depend all
---> Staging wine into destroot
---> Installing wine 0.9.44_0
---> Activating wine 0.9.44_0
---> Cleaning wine


Insert IE here


I had previously downloaded ies4linux to my home directory so, from a terminal, I launched X11:


/Applications/Utilities/X11.app/Contents/MacOS/X11


Ran the ies4linux installation script from the resulting xterm:


./ies4linux


This ran without an error (phew!), so the Xcode 2.4.1 thing worked.

Here's the screenshot, so now I can get back to fixing my CSS for IE6.



BTW, I didn't install IE6 because I love it, it is mostly because a large number of internet users still use this legacy browser.

Sign up for my upcoming Plone 5 Book & Video tutorials

plone 5 for newbies book and videos