I recently came across http://www.fontspace.com which IMHO is the best free font resource on the web, the planet, and possibly the whole universe… For years I have used GRSites.com as the place to get fonts, which does indeed have thousands. However GRsites only has navigation by font name and it has become slow and in comparison to fontspace in clumbersome. Fontspace, not only tags each font, but you can choose the preview text and size tthat you want to the view fonts in. Have a good look round and you’ll never want for a font again.
I read today in Linux Format that IBM are working with the US National Nuclear Security Administration to build a super computer with the following specs: 20 petaflops of processing power, 1.6 petabytes of memory and 1.6 million processing cores ! It will be 10 times more powerful than the current fastest super computer. I am all for super computers but working with the organisation responsible for the USAs nuclear defence is just silly in my book. Have they not seen the films? I am surprised the project is not called Skynet.
The fan on my Thecus N2100 is getting a bit noisy. I am sure it is starting to fail. Trying to get hold of a new one is a nightmare. However, I have eventually found a potential replacement at Maplin.co.uk. I will let you know if it all works.
UPDATE: The above fan from maplin.co.uk works a treat. Fits perfectly (had to tie up the cable to keep it neat and tidy as it is a bit long). It’s brushless, very quiet, has the right connector and works with the two speed settings in the thecus admin interface, even reporting the RPMs. It was a £8 gamble and it paid off 🙂
Again, I’m using VirtualBox to test this, I have a single OS drive with Ubuntu Server (intrepid) installed. I’ve added two 2gb virtual disk to it, which will be the starting point of the Raid5. Most places on the net say you need at least 3 disks to run raid 5, but let’s see what happens.
Lets create the raid:
mdadm --create /dev/md0 --level=5 --raid-devices=2 /dev/sdb /dev/sdc
The raid gets created! and we can monitor it with
When it has finished intitialising, create a file system on the raid array (ext3):
mke2fs -j /dev/md0
create a mount point (/raid) and mount it
mount /dev/md0 /raid
df then reports it as having 2Gb free. Both my VM drives sdb and sdc are 2Gb, so the assumption is it is simply mirroring the data in 2 drive mode. This is exactly what we want, as when I get a new drive later on, I want to add it to the raid and see an increase in disk space. So lets test that, shutdown my machine and add a new drive.
Add the drive to the array
mdadm --manage --add /dev/md0 /dev/sdd
now when I run cat /proc/mdstat it says there are 3 drives in the arras but sdd is marked (S)
Lets now grow the array
mdadm --grow --raid-disk=3 /dev/md0
Watch the progress with cat /proc/mdstat and when complete we can mount it. (adding the 2Gb took about 5 mniutes! eeek! to grow the array).
After completion /proc/mdstat now reports 4gb available, but the file system on the raid still thinks it’s 2gb.
So let’s resize it:
e2fsck -f /dev/md0
Re mount /dev/md0 and df now reports 4Gb.
Nice and simple:
mdadm --stop /dev/md0
mdadm --remove /dev/md0 mdadm --zero-superblock /dev/sdb1 mdadm --zero-superblock /dev/sdc1
Following on from my article on Setting up and Managing Raid1 on Ubuntu Server, I have been testing the raid using a VirtualBox VM.
Today, I took the VM, consisting of an OS drive (with Ubuntu Server installed) and 2 drives set up in raid 1 configuration and created a new OS drive, replacing the existing OS. The intention is to test inserting a new OS drive, re-installing the OS and getting the raid working again without loosing any data.
Useful Reference the mdadm man page
I installed the OS and installed mdadm as per the instructions in my previous post.
All commands are issued as root / sudo
So let’s see if can obtain any information about the raid, we’ll see what it knows about sdb1 which was part of the raid 1 with sdc1:
mdadm –examine /dev/sdb1
It successfully detects that the drive has a superblock and knows that it was part of a raid with /dev/sdc1. See the last two lines of the output.
So lets try to re-assemble the raid.
mdadm –assemble /dev/md0 /dev/sdb1 /dev/sdc1
It responds saying /dev/md0 has been started.
So now we only need to create a mount point
and mount it
mount /dev/md0 /raid
We have successfully mounted the raid so let’s now put an entry in fstab so it mounts at startup.
/dev/md0 /raid auto defaults 0 0
reboot and all should be working.
In preparation for getting my Tranquil PC BBS2, on which I plan to install Ubuntu server on the “OS disk” and have initially two 1TB drives in Raid1 configuration and add an additional 2 later as my storage needs increase, I decided to investigate how to install and configure the raid in such a configuration.
Note: In my configuration, I am setting up a NAS / Home server, I have a single drive for the OS that is not raided as I don’t mind having to re-install the OS if that drive fails. (Which I will test in the near future that I can re-add an existing raid to a new install) The Raided drives are the drives that will store the data shared on the NAS.
I did the test using Virtualbox, creating an OS virtual disk and 2 virtual disks for the raid. I initially only mounted the OS disk and performed an usual
So with ubuntu installed, and the two drives to be raided added to the vm:
All the following commands should be run with sudo or as root.
Creating the Raid array
First we need to install mdadm (I think it means mutli-disk admin), the utility for managing the raid arrays.
Unfortunately, when I tried the expected sudo apt-get install mdadm, there were some weird package dependencies (known issue) that also install citadel-server, which prompts for loads of unexpected configuration. To get round this, do a download-only of mdadm then run the install with dpkg.
sudo apt-get --download-only --yes install mdadm sudo dpkg --install /var/cache/apt/archives/mdadm_2.6.7...deb
For each drive in your raid array, run fdisk or cfdisk and create a primary partition that uses the whole drive. These partitions should be the same size. If not the smallest size will be used for the size of the raid array. The partition type needs to be set to type ‘fd‘ – Auto raid – Linux.
Next, run mdadm to create a raid device (/dev/md0 (thats md followed by Zero) you have to call it mdX where X is an md device not in use) we set the raid level to raid1 (mirroring) and the number or devices to be included in the raid to 2 followed by a list of the disk partitions to be used.
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1
The raid array will be created and you can monitor it’s progress by typing:
watch cat /proc/mdstat
Once complete, we now have a single device that can be mounted, however, it does not yet have a file system on it. I chose to format it as an ext3 fs.
mkfs -t ext3 /dev/md0
create a folder to mount the device in, I chose /raid , and mount it:
mkdir /raid mount /dev/md0 /raid
The raid drive is now mounted and available. To get it to be mounted at system startup, we need to add an entry into the fstab.
/dev/md0 /raid auto defaults 0 0
reboot and all should be working.
Examining the state of the Raid
Whilst the raid is performing operations such as initialising you can see the status with:
mdadm can also be used to examine a hard disk partition and return any raid state information including failed devices, etc.
mdadm --examine /dev/sdb1
Breaking the Array (Replacing a drive)
Building a raid array and not testing it, let alone not knowing how to fix it should a drive go fault is just stupid, so I decided to put the array through it’s paces using the wonderful VirtualBox. So, I shut the machine down and removed the second raid drive from the VM, sdc.
During boot-up I noticed a [Fail] on the mounting file systems and after logging in, the /raid mount was not available. This was my first surprise, I expected as on drive of the array was still plugged in and available, that the device would just be mounted with some form of notification of the raid not being correct. I have not investigated if changing the mount options in fstab would enable this yet, so if you know please comment.
So after logging in the raid device had been stopped, so I tried running it:
mdadm --manage -R /dev/md0
This was successful, and I could even mount the raid device and access the files on it, however it is running with only one drive now.
So, I shut down the VM and created a brand new disk in VirtualBox, and added it to the VM, emulating me replacing the drive with a new one. Started the machine up, logged in and ran mdadm as above to start the array.
Faulty devices can be removed with the following command replacing sdc1 with the partition to remove.
mdadm /dev/md0 -r /dev/sdc1
However, as I had removed the physical VM drive (a bit oxymoronic I know) the device was not classed as part of the array, so now I had to prepare the new drive ready for addition to the array.
So create a primary partition of the required size on the new drive using fdisk.
We don’t need to format it, as as soon as we add it to the array, the existing drives contents will be replicated.
mdadm --manage --add /dev/md0 /dev/sdc1
Run watch cat /proc/mdstat to see it re-building the array
I am now going to have a play with extending the array and seeing if I can start off with a raid5 two drive mode, if that can mirror until I add a 3rd and 4th drive then that migh mean a change in my approach for extending the storage in the future. Hope this all helps some other relative newbies to ubuntu and raid.
Forget the Wind Nettop, this is the baby for me. £360 including vat and delivery, the Tranquil PC barebones server provides you with 2G ram, 64 bit ready Intel Atom 330 (2×1.6GHz) Dual Core, 4 slots for Raid and 1 slot plain hot swap caddy, 1Gb lan, SiliconImage SiI3124 hardware raid, ~23dBA and only 29Watts power usage with a single drive.
Add Ubuntu server and it’s the perfect home NAS / web server / what ever you like.
I’m seriously considering this, along with a purchase of 2x 1Tb drives, to get me started. I’m happy to go with raid1 on those for now and add a couple more as I need more storage.
See the link above for more info….
I’ve had my g1 since xmas, santa was kind enough to bring me one. I love it. Ever since playing with the emulator in a two week of effort to submit an application for the competition, i have loved the os’s simplicity. It is a fantastic os, thought out and designed well from the outset. It is designed to be multi-lingual, multi-device and the choice to make it opensourced was inspired.
This is becoming more and more apparent everyday as we see android running on existing and new devices with comparitively little change and effort.
Eeepc, nokia tablets, and some great new devices at the latest tech shows mean that android is here to stay.
Android is going to be the iphone killer, i can guarantee that. The iphone took at least a year to get flash video playback and there is talk of an adobe port of flash to android being in progress. We wont even mention the lack of picture messaging or copy and paste….
So far the bit of android development i have done, in java which is a whole lot easier than c in my opinion has been fun. I just need to find more time to code or get a new job. Oh how i would love a job writing android apps….. somewhere hot with a good broadband connection…..
The wonderful BBC have finally managed to bundle together a version of iplayer that allows you to download your TV for up to 30 days. It’s still DRMed, using adobe flash and adobe air to give you the iplay application outside your browser.
Follow the link below, to the labs and click the button to enable the labs features. Go to you favourite show, and click download. You will be prompted to install Air etc, which takes a couple of minutes, but after that the download starts and the world is your mollusc.