Skip to main content

Posts

Showing posts from 2012

Hmm... powertop crashes on my squeeze box

Recently, when I launched powertop in my "squeeze" machine,  it crashed. Hmm... I looked around the Debian bug database and finally found the cause. The bug report #646522 says that it crashes if /boot/config-* has more than 5000 lines. Yes, I ran the kernel of linux-image-2.6.32-5-xen-686 and the package contains a config file with 5023 lines. That's it!

Trial of Xen, Xorg, and an Intel graphics controller on wheezy

A few weeks ago, I upgraded one of my Debian box from squeeze to wheezy. Upgrading task was not so difficult, also I had to manage a trouble concerned with X11. Then I tried running Xen dom0 kernel upon the Xen hypervisor 4.1. After the installation I booted the hypervisor followed by the dom0 kernel. When a X server launched, the screen was filled with the textile-like tiling patterns. But after several seconds, the normal GDM login console appeared. I did some tasks in the desktop environment, for example, watching a video stream. During the tasks, I encountered one Xserver's crash and one kernel panic. The thing around Xen and xorg's Intel driver must be getting better. But it seems to be still unstable.

No planned electricity outage

The planned electricity outage for a peak overload has never taken place this summer in Japan. Although we were encouraged to cut ten percent peak load off and avoided the outage, we might lose a chance to learn enough how much we depend on uninterrupted electricity supply in the western part of Japan, which the huge earthquake didn't hit directly last year. It is still in question on the papers whether the two atomic power plants, which were re-started in July,  were necessary.

Backup comfortably with rdup

Several days ago, I wanted to make a backup of my home directory to an external HDD connected with USB, and decided to use the "rdup" utility. "Rdup" is a set of commands to manage multiple generations of backups of a certain directory.  What caught my eyes was its feature to make hard links between the generations automatically to save disk space. In order to accomplish a typical backup task, rdup's three commands should be combined appropriately.  But if your backup goes to a local storage straightforward daily, a shell script 'rdup-simple' gives a shortcut to the task like: # rdup-simple /home/mine /media/BACKUPHDD/mypc/ Because rdup is provided as a package in Debian, its installation was also very simple.

Heavy rain, thunder, and computers

One of my friends said  several power supplier parts of the servers that he administrates has been damaged by a electric surge, caused by thunders in Kyoto the day before yesterday. Indeed, the climate around here was very bad. Streams were flooded with heavy rain, trains had been stopped for hours, and short-term electric outage occurred, I've heard.  I might be lucky that my computers were not damaged at all because I was out and pulled off their electric cables  from the outlets.

Massive data loss incident in a hosting service provider

Here is another report on an incident in Japan. First Server is one of the major hosting providers of rental servers in Japan. On June 20th, when one of their engineers tried to apply a security fix to their customer's OS environment, he/she mistakenly erased more than five thousand disk images of their customers, as well as the corresponding backup disk images. After three days of recovery work they given up recovering all of them. Tragically the compensation will be at most the total price which the customer has been paid for the service, the spokesman of the company explained. This incident seems to be an alarm bell on the service management depending on the hosting service of third-parties. You can make a contract with them, but they do what they can do at most.

Electricity outage is planned this summer

You know, we're facing electricity shortage here in Kyoto.  All the nuclear electricity power plants are shut down periodically for the security inspection, but never to be brought back again after Fukushima nuclear power plants are damaged by the earthquake and the tsunami in March 11th last year.  Now, all the nuclear power plants are stopped in Japan. Electricity shortage is supposed to be inevitable. Especially, Kansai district including Kyoto is heavily dependent upon the nuclear power plants, electricity outage is planned this summer. The government says that Ooii power plants are going to be in service in six weeks, but it is far from enough.  I am planting creepers in the garden to block the summer sunshine, wishing that the climate will be moderate this summer.
Ssh command can send back the data on the remote standard output stream to the local standard input like: ssh hoge@remote 'dd if=/dev/zero count=512' | dd of=/dev/null Of course, this does not make sense, but works  :-)  I often use this data transmission method for the backup purpose. Recently, I was asked by the network administrator to limit the band width of ssh data transmission. I didn't know how to archive his demand at first, but I found a good command-line tool, and worked it out. It was "cpipe". I could install very easily with: apt-get install cpipe and here is an example how to use cpipe: ssh hoge@remote 'dd if=/dev/zero count=512 | cpipe -s 1000' | dd of=/dev/null Have fun!

Multiple generations of backup and hardlink

I suppose it a common way to preserve multiple generations of backup copy of your important data. To preserve them as much as possible, archiving and compressing the backup copy is one way. But there is another way to save the storage: hard-linking. The basic idea is to share the identical files between different generations of backup copy with hard links. If the target data consist of normal files, rsnapshot does most of the hard-linking management automatically. But I recently encountered the problem with the database files managed by daemon processes. Because they are supposed to be changed asynchronously,  the consistency of th オプション eir copy taken with the cp command is not guaranteed. Because this kind of problems is often aware in the design of the daemon processes, special backup methods are provided to export the consistent backup copy. For example, Subversion provides "svnadmin hotcopy" subcommand, and Trac provides  "trac-admin hotcopy&

Chroot login environment for each login users

Recently, I have written an article about how to make a chroot login environment for each user in the diskspace-saving way. It is for Kansai Debian meeting , and I'm going to give a presentation  based on the article there on Feburary 26th. The article is written in Japanese. Its title is "Building a multi-user environment with autofs and pam_chroot". Another effort is needed to translated it into English. If anyone wants it, please give me a comment. :-)

Compress log files efficiently with 7zip

 7-zip is a popular compression tool and  famous for high compression ratio. But unfortunately, there is no description in the man pages about switching the compression algorithm to PPMd . Actually, PPMd provides very high compression ratio with lower CPU power consumption with a text data, and I would like to show its efficiency. Here is an example. Below is a comparison of size and CPU time between variety of  compression methods .    command       size      time    7z a -tzip -mx=9    3699 bytes   0m0.410s 7z a -tgzip -mx=9    3610 bytes   0m0.411s 7z a -tbzip2 -mx=9    3363 bytes    0m0.608s 7z a -m0=lzma -mx=9    3406  bytes   0m0.109s 7z a -m0=PPMd -mx=9    2699 bytes   0m0.058s The original file is a 6795 byte text file. As you can see, efficiency of PPMd is outstanding! PPMd helps me a lot to compact log files.

Nested xdm session under the gdm session

I usually use the gdm for X session manager. Under this circumstance, I wanted to test a xdm, a very traditional X session manager. Rather than replacing gdm with xdm, I tried to start a xdm within a gdm session. Here is how I did: In a gnome-terminal type as follows: # su # xdm -server ":1 nest local /usr/bin/Xnest :1 -geometry 800x600" Cheers!

Nested gdm session

I am preparing for a presentation using X desktop, and want to start another gdm session inside my GNOME desktop environment. It seemed to require long descriptions in the configuration file at first, but  a simple command solved the problem. $ gdmflexiserver -n This starts another gdm greeter inside a  Xephyr (if unavailable, Xnest instead) window. Excellent!

One out of ten virtual servers are lost in Sakura Cloud

Here is a tragic news from Japan. Japanese hosting provider Sakura Internet started its cloud service 'Sakura-no Cloud' last November. Unfortunately, after the serious performance depression in December, about ten percent of the virtual servers has lost its whole data in the end of the year 2011. They say one of the operators has done a wrong data shrinking operation while they struggled against the performance depression. I feel sorry for the owner of the lost virtual servers. At the same time, this accident makes me change the point of view at the cloud service. That is, you can't control this kind of risks behind the virtualized service. You've got to protect your data by yourself. Refrecence: The trouble report of Sakura Cloud around new year

A Happy New Year 2012

A happy new year. The climate was good here in Kyoto. I watched the final game of  the Emperor's Cup All-Japan Soccer Championship on TV, because Kyoto Sanga, my favorite football club team, played the game. Surprisingly, Kyoto Sanga doesn't belong to the top division, but inferior J2 division. Although Kyoto Sanga didn't win the game, I feel satisfied with the fact the team fought the final game. I'm sure I can enjoy the Sanga's games of the coming regular season.