content top

[FreeBSD+ZFS]One or more devices has experienced an error resulting in data corruption. Applications may be affected.

[FreeBSD+ZFS]One or more devices has experienced an error resulting in data corruption.  Applications may be affected.

When you check the ZFS status, you may find the following error message: One or more devices has experienced an error resulting in data corruption. Applications may be affected.. There can be million reasons to cause this error message showing up. Of course, 99% of them are caused by hardware failure, such as bad hard drives, broken cables, defective motherboard, or even bad memory. In this article, I am assuming that you already...

Read More

How to Clean Up / Reset User Account To Default on Linux, Ubuntu, Fedora Automatically

How to Clean Up / Reset User Account To Default on Linux, Ubuntu, Fedora Automatically

Imagine that you set up a computer at a public location, such as cafe, library, or computer lab in your school, so that any one can use your computer. Most of the time, users mainly use the web browsers for surfing the web, checking the email, or updating the status on social websites etc. At the mean time, they may download some files on your computer, generating a lot of browsing history in your web browsers, accidentally saving their...

Read More

[FreeBSD]Problem to update PHP port

[FreeBSD]Problem to update PHP port

A new version of PHP (5.3.9) was available in FreeBSD today. Since it contained a lot of security fixes and enhancements, I decided to give it a try. After testing the new PHP in couple test servers, I think it is ready to upgrade the PHP on the production server. Oh well, I didn’t expect that I needed to spend my whole lunch break to trouble-shoot this problem. So here is what I did: # cd /usr/ports/lang/php5 # make install ===> ...

Read More

How to keep the server running when the CPU fan is dead (and without buring the CPU)?

How to keep the server running when the CPU fan is dead (and without buring the CPU)?

Few days ago, I found that the CPU fan of this server (i.e., icesquare.com) was having some troubles. It was spinning slowly and making some weird noise. After opening the computer case and had a brief investigation, I found that the fan needed to be replaced. Unlike the computer case fan, CPU fan works with CPU socket. Given that there are so many different sockets available, it is not likely that the local stores have each in stock. In...

Read More

[FreeBSD-update]Installing updates…install: ///usr/src/lib/libc/gen/libc_dlopen.c: No such file or directory

[FreeBSD-update]Installing updates…install: ///usr/src/lib/libc/gen/libc_dlopen.c: No such file or directory

When I tried to upgrade my FreeBSD system today, I received a last minute Christmas gift from the FreeBSD team. #sudo freebsd-update fetch Looking up update.FreeBSD.org mirrors... 4 mirrors found. Fetching metadata signature for 8.2-RELEASE from update4.FreeBSD.org... done. Fetching metadata index... done. Inspecting system... done. Preparing to download files... done. The following files will be added as part of updating to...

Read More

How to Delete System Mail / Empty System Mail box in FreeBSD / Linux?

How to Delete System Mail / Empty System Mail box in FreeBSD / Linux?

When I checked my FreeBSD system mail box today, I found that there were 8000 system mails sitting my mail box: mail Mail version 8.1 6/6/93. Type ? for help. "/var/mail/root": 8182 messages 8182 new >N 1 root@localhost.my.do Fri Sep 30 03:02 44/1330 "x.com output" N 2 root@localhost.my.do Fri Sep 30 03:02 72/2464 "x.com output" N 3 root@localhost.my.do Sat Oct 1 03:01 35/1075 "x.com output" ... Another 8000...

Read More

Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

When I tried to connect to the MySQL server through PHP, I got the following error: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) To give you some background, here is my situation. My Fedora Linux is a 64-bit machine, and I have installed a 32-bit version of XAMPP (i.e., 32-bit PHP, 32-bit MySQL) for the web server. Also, I have some PHP scripts that will be run in background. These...

Read More

ZFS+USB: Building a Super Large Server Using USB Memory, CF Card and SD Card.

ZFS+USB: Building a Super Large Server Using USB Memory, CF Card and SD Card.

I got a lot of unused USB thumb drives, CF flash card and SD cards sitting in my drawer. The sizes range from 8MB to 8GB. Unlike few years ago, it is getting a lot easier to access to the Internet, so I no longer need to carry my data via memory device any more. Instead, I simply connect to the Internet and the data is with me. That’s why my USB thumb drivers / CF flash cards / SD cards have been sitting in my drawer for few...

Read More

[Solved]TFTP: Error code 2: Access violation

[Solved]TFTP: Error code 2: Access violation

This post is an extension of my original post on TFTP: How to Setup TFTP. Although the post was written for Ubuntu, the same idea can be applied to all systems. So, here is our problem. You set up a TFTP server. It starts fine. You upload a file, it gives no error. Now, you try to download a file, it throws you an error: tftp> get myfile.jpg Error code 2: Access violation If you google the error message, Error code 2: Access...

Read More

[PHP]How to get the number of CPU cores in Fedora, Ubuntu, and FreeBSD

[PHP]How to get the number of CPU cores in Fedora, Ubuntu, and FreeBSD

I am working on a PHP application which needs to be deploy to multiple places. One of the variables is the number of CPU core. Since each server has different number of CPU cores, I need to specify the number of CPU core in my application for each server. I think there should be a smarter way to do it. PHP is a scripting language, it has limit support on accessing the hardware level information. In short, there is no library or function...

Read More
content top