Archives

Categories

Modules and NFS for Xen

I’m just in the process of converting a multi-user system to a Xen DomU. It was running on a stand-alone Fedora Core 5 i386 system and I want to run it on a Fedora 7 DomU under a CentOS 5 Dom0 on an Opteron system.

The first stage of the conversion was to copy an image of the Fedora Core 5 system and make it a DomU under CentOS. I had some problems getting a Fedora Core 5 Xen kernel to boot so I installed a 64bit CentOS 5 kernel with the Fedora Core 5 user-space and surprisingly everything worked. I had expected to have problems with kernel modules, but everything just worked! I had expected that the 32bit modutils would be unable to load 64bit modules, but things just worked.

The first stage was to have the old server NFS export /home and have it mounted by the Xen DomU, this worked well for about a week. The next step was to move the data on to the new server. My first attempt was to have the Dom0 running the filesystems and NFS exporting them to the DomU but this caused an OpenOffice error “Error saving the document Name: General Error. General input/output error.“.

So having 32bit Fedora Core 5 with a 64bit Cent OS 5 kernel NFS mounting from a 32bit Fedora Core 5 system works well, while mounting from a 64bit Cent OS 5 system fails. If anything I would have expected better results from having the same version of the kernel on NFS client and server.

The next issue is whether a 64bit Fedora 7 system in a DomU can NFS mount the data from the Cent OS 5 kernel with Fedora Core 5 user-space. If not it’ll make testing the Fedora 7 upgrade significantly more painful than it might otherwise be.

If only we had a network filesystem for Unix that supported POSIX semantics.

Troll Zapping

Don Marti writes about the idea of setting a Troll-bit on forum posts such that every reply would also be flagged.

I’ve been thinking about how to solve such issues for mailing lists. I think that the way to do this is to create a new list for every contentious topic and automatically subscribe everyone who posted to the thread after the messages that were flagged as being too far off-topic. After that time anyone who tries to post to the main list with a matching subject or a header indicating that the message is a reply to an off-topic message would have their message redirected to the new list – and they would be automatically subscribed.

This would keep the off-topic messages away from the main list and also serve as a minor dis-incentive for people to post to threads that start going off-topic as most people won’t want to be subscribed to the new list for off-topic messages.

However such messages would still be archived (in a different section) so if the moderator mis-classified a thread it could still be reviewed by other people.

Also when moderating such threads it would be interesting to experiment with consensus moderation of posts. If N subscribers of the list who post regularly use a web form to indicate that a certain post was too far off-topic and should spawn a new list then that could happen.

I agree with Joey Hess’ rant about forums, so solving a problem for forums is not of interest to me, but hacking on a list server is something that I would do if I had enough spare time.

Column Width in Blogs

I have just been reading the LinuxWorld Community blog which seems to be mostly Don Marti’s personal blog (currently there seems to be no-one else blogging on that site).

One thing that disappointed me is that the theme designer made it look good at a width of 1000 pixels and no other size. At a smaller width the adverts on the right are cut off (more of a problem for the site owner than for the readers) and at a larger width you have a thin column of text in the middle of the screen. A quick test revealed that while my own blog looks good in wide windows it doesn’t work too well in 800 pixel width and gets very bad at lower widths – my blog would be essentially unusable at 640×480 resolution as the text column in the middle (the most important column) is the one that reduces in size. The LinuxWorld blog has a minimum size of 1000 pixels for the scaling so it allows horizontal scrolling in 640 pixel width and remains quite readable.

The top entry in a google search for web size stats is Browser News which claims that 12% of web browsers are on 800 pixel wide screens. The next link I found claims that as of January 2007 there are 26% of web users with screens that have higher than 1024×768 resolution and 14% with 800×600.

Apart from the first couple of months of blogging my blog has always looked good in screens greater than 1000 pixels wide, but not having it work at 800×600 is a problem. The first thing I did was alter the style.css file for the Blueline theme for WordPress to use 100% of the display width (not 86%). Wasting 14% of the screen width is not a good thing when using a width-intensive three-column theme. This change made my blog work well in 800 pixel width and be bearable in 640 pixel width.

The other change was to use min-width: 700px; in the style.css sections blogtitle, container, and navigation. This means that at 640 pixel width the text column will take more than 1/3 of the screen and should be quite readable (unless the reader has an unusually large font setting). The down-side to this is that if your window width is less than 700 pixels then you will have some horizontal scrolling, but I think that this is an acceptable trade-off.

I was forced to confront this issue when talking to a prospective client about the potential for blogs to be used in his business, he loaded up my blog on an ancient windows machine and it didn’t look very good at all, this coincidentally happened a few hours after I had been reading the LinuxWorld blog on a big screen.

Ron Paul

A politician named Ron Paul is running for the Republican party nomination for president. Tech Crunch has an article about his Web 2.0 based campaign which also includes a link to a google interview with him.

Here’s the good things about him:

  • He strongly defends the constitution and the rule of law, so he’s not a totally bad guy (unlike many of the current politicians who believe that the US president should be able to do whatever he wishes).
  • He wants to refrain from “helping” other countries with their “defense” – such help from the US has caused most of the wars and terrorism around the world since WW2.
  • He wants to reduce military spending to 1/3 current levels (he could reduce it to 1/10 current levels and still be able to prevent a combined attack by Russia and China).
  • He wants to restore liberty.
  • He seems to be in support of repealing most drug laws – but his statements weren’t clear.

Here’s the bad:

  • He wants to remove income tax and give the smallest possible government – no consumer protection laws among other things.
  • He thinks that hospitals should be run by churches and have no government funded medical system.
  • He doesn’t want restrictions on pharmacists who refuse to sell certain drugs (IE the contraceptive pill) – but with no restrictions on who can be a pharmacist such things could be bought without prescription even…

Here’s the ugly:

  • He claims that guns on planes might have prevented 9-11.

Still, he’s a lot better than any other Republican who seems to be in the running.

unaligned access on IA64

I recently had some problems with unaligned access on IA64, messages about unaligned access were being logged via printk and I couldn’t determine the cause – or even how to track it down. To test what an unaligned access means (which wasn’t documented anywhere that a quick google search could find) I wrote the test program in the second half of this post. Below is the output of the test program which accesses an integer at various offsets. As you can see it’s addresses that are congruent to 5, 6, and 7 mod 8 that cause the errors. At the int is 4 bytes long it seems that the cause of an unaligned access error is an access to a data type that crosses an 8 byte boundary. So a pointer or long long would have to be aligned to an 8 byte boundary, an int has to be at an address that is congruent to 4 or less mod 8, and a character can be anywhere.

Also if the sysctl /proc/sys/kernel/ignore-unaligned-usertrap is set to 1 then these messages will be disabled. But you really don’t want to do that, such errors apparently cause a significant performance loss so you want to file bug reports against programs that do this.

# ./a.out
index: 0
index: 1
a.out(10393): unaligned access to 0x607fffffff34ee25, ip=0x4000000000000961
index: 2
a.out(10393): unaligned access to 0x607fffffff34ee26, ip=0x4000000000000961
index: 3
a.out(10393): unaligned access to 0x607fffffff34ee27, ip=0x4000000000000961
index: 4
index: 5
index: 6
index: 7
index: 8
index: 9
a.out(10393): unaligned access to 0x607fffffff34ee2d, ip=0x4000000000000961
index: 10
a.out(10393): unaligned access to 0x607fffffff34ee2e, ip=0x4000000000000961
index: 11
a.out(10393): unaligned access to 0x607fffffff34ee2f, ip=0x4000000000000961
index: 12
index: 13

Below is the test program I used:
Continue reading unaligned access on IA64

HP Sponsors Computer Recycling

Hewlet-Packard is sponsoring the recycling of old computers in Victoria, Australia in a program named Byteback – note that they accept all brands of computer and charge nothing to accept the e-waste. This is a really good thing, I’ll start saving up my old computer parts to deliver to them!

Is there a directory of computer recycling plants that accept old hardware for no charge? If you know of one in your area then please blog about it and send a track-back to my post.

Bizarre “No space left on device” error from Xen

What should have been a routine “remove DIMMs and run memtest until things work” procedure to solve a memory error became a lot more complex due to poor error handling in Xen.

The following error occured because the tdb database /var/lib/xenstored/tdb was corrupt. To fix it you must rm the file and kill the xenstored process (which will otherwise recreate the file with the same corrupt data). It took me a few hours to work this out.

# xm create -c smtp
Using config file “/etc/xen/smtp”.
Error: (28, ‘No space left on device, while writing /local/domain/0/backend/vbd/
18/768/online : 1’)

Strangely the command “/etc/init.d/xend restart” does not restart xenstore or xenconsole (which is why running “/etc/init.d/xend stop” before rm’ing the file didn’t do any good).

After fixing the above problem I encountered the following error condition. It seems that there is no support for restarting daemons such as xenstored. So I had to reboot the machine. After that it worked.

# xm create -c smtp
Using config file “/etc/xen/smtp”.
Error: Device 0 (vif) could not be connected. Hotplug scripts not working.

I’ve filed Debian bug 433780 about this.

The ABC and the Supposed Liberal Bias

A common meme is that the media is biased towards the political left. This meme was deliberately created to encourage well-meaning journalists to be more generous in their reporting of Neo-Cons in a misguided attempt at being fair and also as a mechanism for refuting criticism of any media reports that criticise Neo-Cons.

The ABC has been criticised for being biased towards the left as part of this attack on fair media and have recently demonstrated that they are in fact biased towards the Neo-Con ideas by airing a pseudo-documentary about climate change The Great Global Warming Swindle.

The fake documentary has been refuted by many scientists, here is one by George Monbiot published in The Age.

I wonder whether this blog post will get Google adverts related to Nostradamus and UFOs – I’m sure that the google search engine has worked out that cranks are interested in that fake-doco.

Religion and Cars

The Catholic Church has recently issued a set of 10 road commandments. Number 9 is “On the road, protect the more vulnerable party” which ties in with an article by Barney Zwartz published in the religious column of The Age about the spiritual issues related to 4WD cars.

Barney makes better points than the Catholic Church starting with “How can Christians living in suburban Melbourne justify getting around in huge four-wheel drives? It’s harder to imagine a more “me-first, up yours” statement to the rest of the world*“. He also links to a report by the Australian Academy of science showing that 4WDs are less safe for their owners (which fits the theory of some Christians that bad actions tend to get punished in this world as well as the next).

IEA predicts global oil crisis

The ABC reports that an oil shortage is predicted soon. The International Energy Agency predicts that oil supply problems will start within the next five years. Oil production has been dropping over the last two years (we have passed the “peak oil” point) and demand is steadily increasing. Regardless of wars oil prices will increase significantly in the near future.

According to the Australian Bureau of Statistics the average age of Australian cars was 10.7 years at the end of 1998. So the vast majority of the current fuel-hungry cars on Australian roads will still be in use in five years time – if the owners can afford them.

The government needs to start providing tax incentives for fuel efficient cars and to end tax incentives for inefficient cars. Currently 4WD vehicles have reduced taxes and the tax deduction for a business car is based on the engine size (get a less efficient car and get a bigger tax deduction).

The government claims to be protecting the economy (at the expense of the environment). But with the way things currently work the economy will be destroyed in less than five years.

Even though the government cares little for the environment (in spite of the effect that climate change is having on farmers) they need to do something if they want to fulfill their claims of protecting the economy!

Thanks to Chris Samuel for informing me of this.