RealTechTalk (RTT) - Linux/Server Administration/Related
We have years of knowledge with technology, especially in the IT (Information Technology) industry.
realtechtalk.com will always have fresh and useful information on a variety of subjects from Graphic Design, Server Administration, Web Hosting Industry and much more.
This site will specialize in unique topics and problems faced by web hosts, Unix/Linux administrators, web developers, computer technicians, hardware, networking, scripting, web design and much more. The aim of this site is to explain common problems and solutions in a simple way. Forums are ineffective because they have a lot of talk, but it's hard to find the answer you're looking for, and as we know, the answer is usually not there. No one has time to scour the net for forums and read pages of irrelevant information on different forums/threads. RTT just gives you what you're looking for.
Linux Screen How To Scroll Up and Down
I admit I didn't know you could do this for the longest time and is an annoying feature of screen.
In order to scroll up and down just hit "Ctrl+a+Esc" or "Ctrl+a+[" and then you can Pageup, Pagedown and using the arrow keys.
Directadmin Install Segfault Error
*************************************
* *
* All parts have been installed *
* *
*************************************
Type: /sbin/service httpd restart
./install.sh: line 282: 15803 Segmentation fault ./directadmin i
./install.sh: line 285: 15804 Segmentation fault ./directadmin p
System Security Tips:
http://help.directadmin.com/item.php?id=247
*********************************
*
* Cannot find /usr/local/directadmin/conf/directadmin.conf
* Please see this guide:
* http://help.directadmin.com/item.php?id=267
*
*********************************
The issue was actually caused by choosing the wrong OS in the Directadmin client center or by your ISP/host. Eg. if you choose Redhat 7.3 but install Centos 5.5, you'll get this error (I think it's actually kind of silly how the DA client system works). With CPanel the license is simply tied to the IP address and there's no need to manually specify anything.
So the solution is for the host to get the DA license updated to match the correct OS.
Could not display "trash:///". Error: DBus error org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout
Could not display "trash:///".
Error: DBus error org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Please select another viewer and try again.
This happened in Ubuntu but only because I was trying to delete millions of files at once and it was fine once I patiently waited for the operation to complete.
SSH error slow login debug1: An invalid name was supplied Cannot determine realm for numeric host address - Solution
debug1: An invalid name was supplied
Cannot determine realm for numeric host address
debug1: Local version string SSH-2.0-OpenSSH_4.3p2 Debian-9etch3
debug1: An invalid name was supplied
Cannot determine realm for numeric host address
debug1: An invalid name was supplied
A parameter was malformed
Validation error
Solution, disable auth from the ssh client (this is a client side error)
vi /etc/ssh/ssh_config
GSSAPIAuthentication no
Or at the commandline you can add this flag but it's best to permanently make the problem go away like above:
ssh -o "GSSAPIAuthentication no" user@host
After this you should be able to login instantly almost.
How To Install CPanel
wget -N http://httpupdate.cpanel.net/latest;sh latest
That one command above will do it all (and it takes a long time to install/compile). After that you can access CPanel with your root login information by visiting https://yourdomain-or-ip.com:2087
I personally don't like CPanel (bloated, full of bugs, no shared SSL, difficult to use etc..) but I admit it's easier to install than Directadmin (no having to mention your Client and License ID or your Ethernet Device etc... and no worrying about pre-fetching certain binaries).
Here's the link from CPanel's install guide docs.cpanel.net/twiki/bin/view/11_30/InstallationGuide/InstallingCpanel
LOG: MAIN PANIC failed to expand condition "${if eq {$authenticated_id}{}{0}{${if eq {$sender_address}{$local_part@$domain}{0}{${if match{$received_protocol}{N^e?smtps?a$N}{${perl{checkbx_autowhitelist}{$authenticated_id}}}{${if eq{$received_prot
I experienced this with CPanel's Exim after an auto-update (a Google of this error produces lots of complaints with few clear solutions). In this case I'll put the solution at the top.
Run /scripts/buildeximconf to rebuild the Exim config and it should be fine after that.
mail -vs "from test" user@dest.com < .bash_history
LOG: MAIN
cwd=/root 4 args: send-mail -i -v user@dest.com
LOG: MAIN
<= root@box.host U=root P=local S=12289 T="from box.host"
LOG: MAIN
cwd=/var/spool/exim 4 args: /usr/sbin/exim -v -Mc 1SJs73-0007QP-Ai
delivering 1SJs73-0007QP-Ai
LOG: MAIN PANIC
failed to expand condition "${if eq {$authenticated_id}{}{0}{${if eq {$sender_address}{$local_part@$domain}{0}{${if match{$received_protocol}{N^e?smtps?a$N}{${perl{checkbx_autowhitelist}{$authenticated_id}}}{${if eq{$received_protocol}{local}{${perl{checkbx_autowhitelist}{$sender_ident}}}{0}}}}}}}}" for boxtrapper_autowhitelist router: Undefined subroutine &main::checkbx_autowhitelist called.
LOG: MAIN PANIC
failed to expand condition "${perl{check_mail_permissions}}" for check_mail_permissions router: Undefined subroutine &main::check_mail_permissions called.
LOG: MAIN PANIC
failed to expand condition "${perl{enforce_mail_permissions}}" for enforce_mail_permissions router: Undefined subroutine &main::enforce_mail_permissions called.
LOG: MAIN PANIC
failed to expand condition "${perl{increment_max_emails_per_hour_if_needed}}" for increment_max_emails_per_hour_if_needed router: Undefined subroutine &main::increment_max_emails_per_hour_if_needed called.
LOG: MAIN PANIC
== user@dest.com R=lookuphost T=remote_smtp defer (-1): failed to expand "interface" option for remote_smtp transport: Undefined subroutine &main::get_sender_from_uid called.n
Solution:
/scripts/buildeximconf
Firefox 11 closes/quits without saving Open Tabs Prompt Solution/Fix
Type "about:config" in your browser and then search for "Quit"
Set these values to true
browser.showQuitWarning
browser.warnOnQuit
Firefox 11 stop hiding http:// and https:// solution fix
In Firefox type "about:config" in the address bar.
Search for "browser.urlbar.trimURLs;false" and set it to true, then you'll have the http:// and https:// back.
Firefox talks about the greater good but unless they don't care about security why would they hide if the url is secure or not?
The Importance of a High Quality Power Supply/Power Supplies To Prevent Overheating/System Crash/Hardware Damage
For years I've always built cheap systems believing that there is little difference in more expensive components when it comes to reliability and quality, I generally believe this still except for Power Supplies.
I've always bought cheap cases with nice sounding 350-550W stock/cheap/crap power supplies and haven't had any issues for the most part until recently.
One such case is an NGEAR case with a 550W Optimax power supply, I always read that these supplies don't produce the stated wattage in many or most situations but never had any issues, at least years ago with Geforce 64MB add-on cards etc..
My first run-in that I know of with a bad power supply or one without enough wattage was when I had 4 hard drives running off a single rail of another cheap NGEAR case with the 550W Optimax PS, one of the drives would keep resetting constantly and I thought it was a bad drive, but then I realized every drive plugged into that socket had this issue. It turns out it wasn't getting enough power especially with multiple RAID 1 arrays running off it (using another rail solved it and confirmed it was a power issue). In the same case but with a different motherboard I used to run a Geforce 7300GT which kept crashing my computer after a few days, I'm confident it was a case of the power supply crapping out after extended use and being able to supply enough voltage.
Now with my other Desktop, using the same case and 550W Optimax I ran the same 7300GT for a few days but it would keep getting hotter (this is because the fan on it never worked) to the point that it smelled like battery office in the office. It would also easily hang if I tried overclocking it and my system would often lockup with it.
Eventually I decided to upgrade to a Geforce 430 from Asus because it was a great price but this card would crash after a few days but I believed it was a bug with the NVIDIA Linux driver. I also noticed my power supply getting very hot (pushing more hot air out than usual) and eventually a screeching/metallic/whirring/buzzing noise which I just thought was the Asus fan on the GPU. A few days later my computer was powered off on it's own, and it wouldn't stay powered on for more than few seconds. I removed the NVIDIA card and booted with the on-board ATI and it too wouldn't stay on for more than a few minutes. I knew right away it was the power supply for sure.
The solution was to buy a cheap but on-sale Antec 450C 450W 80 Plus certified power supply. This is where I'm happy and wiser because I didn't realize 80 Plus means 80% efficiency, versus the the likely 50-60% efficiency of crap power supplies. This new power supply so far has kept me running stable for over 3 days,no crashes yet and is almost 100% silent and runs much cooler. My GPU even reports at being 57-58 degrees on average verus the 60+ temperatures with the old power supply. This is how much more efficient and cool the Antec supply is running. On top of that my office will be cooler in the summer, I'll save energy and things are much more quiet. It has me tempted to have all the power supplies in the office and at home swapped for high quality units.
I've also read/learned that the cheap no-name units are basically rejects and are known to be of low quality which is why they are priced so low. They may serve an average user fine but if you start adding hard drives or modern video cards, you'll definitely have issues.
I'm also just glad that my dying/bad power supply didn't fry my HDDs or MB as I've heard of it in some cases (even though some including techs claim this isn't possible when it clearly is).
Asus VE247H 23.7" Inch LCD/LED Backlit Monitor Dead/Stuck Pixel Policy Complaint
I've thought for awhile that Asus has been banking on its years old reputation for quality amongst gamers and enthusiasts and I think I'm right. My Asus VE247H Monitor with a supposed 2MS refresh rate has 1 red/stuck/dead pixel but fortunately it can only be seen on a non-true black picture or against a blue screen.
I have several Asus products and find they're all of fairly poor quality. First of all their motherboards have given me the most issues of any brand, they tend to be unstable and some models have crashed during heavy IO. This is off-topic but Gigabyte is my favorite MB manufacturer, they have great features, prices and most of all have been the most dependable for me.
As someone on a forum pointed out, ASUS has decided to tell us what the "ultimate viewing experience" is and that it's 3 to 5 defective pixels. But like most normal humans, the ultimate viewing experience is obviously 0 pixels........wait but when I bought an ASUS I agreed to that it's 3-5 dead pixels :)
ASUS conforms to the acceptance level between 3 to 5 defective bright/dark pixels. In order to deliver ultimate vision experience to ASUS customer, if your panel is less than or equal to the above number of dots, then, it is considered as an acceptable LCD monitor
I bought my monitor from DirectCanada and they won't RMA it because they have to follow the manufacturer's policies which also applies to Newegg and most other discount etailers. I don't blame DirectCanada but rather Asus.
At the end of the day I'm frustrated by this stuck red pixel but at least it's not noticeable in most situations, rather than being completely dead and for the price I paid I couldn't have gotten a bigger screen.
It should be noted that Asus doesn't even make this screen, it's made by Ancor Communications according to NVIDIA's Linux driver. I guess you get what you pay for.
Possible Solution:
You could try using this online tool to identify and fix bad pixels:
http://www.flexcode.org/lcd2.html
It hasn't worked for me but I swear the dead pixel is slightly less noticeable/bright now. Maybe I'll let this program run overnight and check the results. It's worth noting that some users have reported that over time these red pixels sometimes disappear. I also read applying gentle pressure to the area can help but it didn't for me.
Read the Asus Dead Pixel Policy
LCD Panel Bright/Dark Dot Warranty & Regulation
Since LCD panel is made up of millions of micro electronic pixels, if one pixel no longer functions normally, it will become a bright or dark dot. By ISO 13406-2 standards, ASUS conforms to the acceptance level between 3 to 5 defective bright/dark pixels. In order to deliver ultimate vision experience to ASUS customer, if your panel is less than or equal to the above number of dots, then, it is considered as an acceptable LCD monitor.In addition, the Premium Range of ASUS LCDs offers a unique Zero Bright Dot (ZBD) warranty.Please refer to ASUS LCD Monitor Bright/Dark Dot Warranty Table below.
TAKING CARE OF YOUR LCD:
- Turn off the LCD if you will not use it for a long time. Doing this will help you save electric power consumption and prolong your LCD's life.
- Do not touch the LCD with your fingers, sharp, and/or hard object so as not to scratch the LCD.
- Use monitor-cleaning sheet to lightly wipe off dirt from the LCD. Do not use your fingers!
- Do not use any chemicals or detergents to clean the LCD.
- Use screen saver to avoid the damage caused by long-term static (non-moving) images displayed.
ASUS LCD Monitor Bright/Dark Dot Warranty Table:
Applied Models
: General ZBD Models
|
After Purchase |
Bright Dot |
Dark Dot |
|
12 months |
0 |
≦5 |
|
13~36 months |
≦3 |
≦5 |
Applied Models
: PA Series
|
After Purchase |
Bright Dot |
Dark Dot |
|
36 months |
0 |
≦5 |
Applied Models
: Non-ZBD Models
|
After Purchase |
Bright Dot |
Dark Dot |
|
36 months |
≦3 |
≦5 |
- A Pixel consists of sub-pixels: one red, one green and one blue dot. A bright dot is a sub-pixel that is always on under Black pattern. A dark dot is a sub-pixel that is always off under any pattern.
- Micro Dot, less than or equal to 1/2 dot (50μmφ), is excluded in the warranty
- Non-ZBD/ZBD warranty models may vary from different regions.
Firefox Error ./firefox-bin: error while loading shared libraries: libxul.so: cannot open shared object file: No such file or directory
When double clicking nothing happens/it doesn't open and when executing as ./firefox-bin you get this error:
./firefox-bin: error while loading shared libraries: libxul.so: cannot open shared object file: No such file or directory
All the .so files reside within the directory of Firefox that you extract from the binary .tar.gz from Mozilla, it's just that your computer doesn't know/recognize where to look for them.
Solution:
export LD_LIBRARY_PATH=/home/location/firefox
Linux Ubuntu Nvidia GT430 Lockups/Errors/Freezes NVRM: os_schedule: Attempted to yield the CPU while in atomic or interrupt context
I'm running Ubuntu 10.10 with Asus NVIDIA GT430
2.6.35-32-generic-pae #65-Ubuntu SMP Tue Jan 24 14:06:16 UTC 2012 i686 GNU/Linux
Nvidia binary driver: 260.19.06
The screen sometimes completely freezes and locks up or everything starts going very slow:
[1903398.100007] NVRM: os_schedule: Attempted to yield the CPU while in atomic or interrupt context
[1903402.373210] NVRM: Xid (0001:00): 53, CMDre 00000000 00000080 00000000 00000005 00000005
[1903405.374503] NVRM: Xid (0001:00): 53, CMDre 00000001 00000080 00000000 00000005 0000000b
[1903405.374550] NVRM: Xid (0001:00): 53, CMDre 00000000 00000080 00000000 00000005 00000005
[1903405.374564] NVRM: Xid (0001:00): 53, CMDre 00000001 00000080 00000000 00000005 0000000b
[1903416.452881] NVRM: Xid (0001:00): 53, CMDre 00000001 00000080 00000000 00000005 0000000b
[1903427.691501] NVRM: Xid (0001:00): 53, CMDre 00000000 00000080 00000000 00000005 00000005
[1903427.691610] NVRM: Xid (0001:00): 53, CMDre 00000000 00000080 00000000 00000005 00000005
[1903433.457628] NVRM: Xid (0001:00): 53, CMDre 00000000 00000080 00000000 00000005 00000005
[1903433.457679] NVRM: Xid (0001:00): 53, CMDre 00000000 00000080 00000000 00000005 00000005
[1903433.505902] NVRM: Xid (0001:00): 53, CMDre 00000000 00000080 00000000 00000005 00000005
[1903433.505948] NVRM: Xid (0001:00): 53, CMDre 00000000 00000080 00000000 00000005 00000005
[1903433.617132] NVRM: Xid (0001:00): 53, CMDre 00000000 00000080 00000000 00000005 00000005
[1903433.617176] NVRM: Xid (0001:00): 53, CMDre 00000000 00000080 00000000 00000005 00000005
[1903433.762362] NVRM: Xid (0001:00): 53, CMDre 00000000 00000080 00000000 00000005 00000005
[1903433.762408] NVRM: Xid (0001:00): 53, CMDre 00000000 00000080 00000000 00000005 00000005
[1903433.794451] NVRM: Xid (0001:00): 53, CMDre 00000000 00000080 00000000 00000005 00000005
[1909741.186316] NVRM: os_schedule: Attempted to yield the CPU while in atomic or interrupt context
I'm not sure what the cause of this issue is or how to fix it but I'm documenting it for now while trying to find the cause/solution.
2012-04-05 Update
I believe I found the culprit and the solution and you can read more about my experience here: http://realtechtalk.com/The_Importance_of_a_High_Quality_Power_SupplyPower_Supplies_To_Prevent_OverheatingSystem_CrashHardware_Damage-1246-articles
The above mainly happened when the computer had been running longer and longer, basically my already bad/weak power supply couldn't handle the draw of the GT430 even though it requires a 300W PS, my 550W Optimax supply couldn't deliver enough power obviously and eventually died altogether. In the days leading up to this I didn't it was my PS making very loud screeching sounds as it was slowly dying.
I've now upgraded to an Antec 450C 80 Plus power supply and I'm very happy. It's very quiet and runs cooler, it even has the GT430 running cooler than it ever has because it's so efficient. I've learned my lesson and I'm never going to use cheap/no-name PS's again.
2012-04-11 update, more than 9 days later my system is still stable, no freezes, lockups or slowdowns so far and the average temperature of the GPU is just 58-59 degrees. If the system goes another week without any freezes, lockups or slowdowns with the graphics like before I'll be very happy. I'm quite sure I was right about it being the power supply. On that note before switching to this NVIDIA card I was getting similar issues with my ATI on-board card (weird ATI driver errors in the kernel) but I just thought it was the on-board card dying (it was getting slow etc.. and I believe occassionally freezing). The NVIDIA worked good on the stock power supply but eventually had issues because the crap Optimax 550W supply couldn't even support the onboard let alone the PCIe NVIDIA.
2012-04-15 update
The system is still stable and quick and the GPU has been running as low as 56-58 degrees on average and never higher than 60. I'm very happy with this Antec Power Supply and can't believe the difference it's made considering the requirement was 300W and my 550W Optimax PS couldn't even keep up with this low-end graphics card..
2012-04-18 Update
I'm definitely considering this problem solved after this length of time. The power supply was definitely 100% the cause of the issues as I wasn't able to run smoothly without freezing and total lockups for more than a few days before this new Antec PS.
After 16 days of running I haven't had a single lockup or hitch and everything is running fast. One symptom of the bad power supply with this card and even my on-board ATI is that the graphics started to become slower (eg. switching windows or tabs in any program was noticeably slower and laggy). With the new Antec, I'm not having this problem.
18:20:18 up 16 days, 7:25, 27 users, load average: 2.23, 2.12, 2.13
2012-04-27 Final Update
Things are still running perfect and smooth after more than 24 days. No crashing, freezing, lockups or messages like before. I'm still amazed at how bad the original power supply was and how much better this Antec is.
02:42:53 up 24 days, 15:47, 36 users, load average: 0.70, 0.35, 0.27
Xen how to mount disk images off-line and access data
fdisk -lu VPS.img
last_lba(): I don't know how to handle files with mode 81ed
You must set cylinders.
You can do this from the extra functions menu.
Disk VPS.img: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
VPS.img1 * 63 208844 104391 83 Linux
VPS.img2 208845 20964824 10377990 8e Linux LVM
Partition 2 has different physical/logical endings:
phys=(1023, 254, 63) logical=(1304, 254, 63)
Above tells you what to do next, we can see we have an LVM partition so it's more complicated (I recommend a straight ext3 partition for Xen images).
Since I have LVM I need kpartx, and here's how to mount LVM partitions from Xen:
kpartx -av VPS.img
add map loop2p1 : 0 208782 linear /dev/loop2 63
add map loop2p2 : 0 20755980 linear /dev/loop2 208845
vgscan
Reading all physical volumes. This may take a while...
Found volume group "VolGroup00" using metadata type lvm2
vgchange -ay
2 logical volume(s) in volume group "VolGroup00" now active
lvdisplay
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID 1cXWyF-2eO2-t5MD-oSNf-OWOG-cPnK-6Sn3Sg
LV Write Access read/write
LV Status available
# open 0
LV Size 8.84 GB
Current LE 283
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID QvU7in-2TPl-VeT5-mocH-jyuR-YZ02-M4pCGt
LV Write Access read/write
LV Status available
# open 0
LV Size 1.03 GB
Current LE 33
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:3
fsck /dev/VolGroup00/LogVol01
fsck 1.39 (29-May-2006)
fsck: fsck.swap: not found
fsck: Error 2 while executing fsck.swap for /dev/VolGroup00/LogVol01
[root@evotor11 ~]# fsck /dev/VolGroup00/LogVol00
fsck 1.39 (29-May-2006)
e2fsck 1.39 (29-May-2006)
/dev/VolGroup00/LogVol00 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/VolGroup00/LogVol00: 44465/2319712 files (0.8% non-contiguous), 629232/2318336 blocks
Of course instead I could have mounted the image as normal etc...
Xen non-HVM container won't work/boot anymore
One of my test Centos 5 containers was on a partition that filled up and it threw all sorts of errors and stopped responding but now I can't boot it again anymore.
All the console shows is the Linux Penguin on the top left corner and the xm console says "usbcore: registered new driver hub" and has halted there.
Centos 5 Xen container stuck/frozen won't boot on "usbcore: registered new driver hub"
Another great way of troubleshooting is booting from the console, you at least see the GRUB options and manipulate them if need be:
xm create -c nameofyourXenVPS
When booting this way it is now stuck on PCI: setting up Xen PCI frontend stub
After removing the video display/console from Virt-Manager here's what I get now:
xen_mem: Initialising balloon driver.
If you enable APIC it freezes at:
Brought up 1 CPUs
APIC is disabled but now I'm stuck again on this:
It's still stuck on PCI: setting up Xen PCI frontend stub
After updating the xen packages:
It gets stuck on:
Linux Plug and Play Support v0.97 (c) Adam Belay
Now it's stuck here:
checking if image is initramfs... it is
The problem seems random.
Now randomly I'm getting this far (it's as far as I've ever got):
xen_mem: Initialising balloon driver.
Now I get this far:
NET: Registered protocol family 16
how to exit xen console session from xm
It sure is annoying when you connect to the console using xm and it locks your shell session.
It doesn't really, you just need to know it is "Ctrl + ]" to exit it.
Once again to exit an xm console session, press Ctrl + ]
Skype Linux/Ubuntu Sound Echo/Distortion Poor Quality Problem Fix Solution
This was very annoying but has a simple fix, I had an echo and the voice quality was absolutely horrible (it sounded like tin cans under water) if that helps describe it. It was extremely distorted.
The simple Skype sound quality solution
Go to "Options" -> "Sound Devices"
Disable the "Allow Skype to automatically set my mixer levels"
After doing this the sound quality was perfect. Skype really needs to fix this, I know the Linux versions are BETA but these are huge bugs and Skype seems to ironically be notorious in Linux for having the most sound problems of any application.
Ubuntu 10.04 Flash Videos have tearing/lines Solution
This is what I call a ridiculous bug in compiz that causes it.
The solution/To fix it just install "compizconfig-settings-manager"
Open it up and Navigate to General Options -> Display Settings
Set the "Refresh Rate" to the current refresh rate of your monitor.
For ATI cards with slow window dragging/response supposedly disabling "Sync to VBlank" fixes that but otherwise leave it as is.
You may need to restart X to make the settings apply (I can't remember) but I'm glad to have solved this annoying Compiz bug.
File /etc/vz/conf/ve-vps.basic.conf-sample not found: No such file or directory - Openvz Error solution
Stuff like this always happens/breaks after a vzctl update, whether it's new parameters being added or required etc..
File /etc/vz/conf/ve-vps.basic.conf-sample not found: No such file or directory
Fix the value of CONFIGFILE in /etc/vz/vz.conf
Creation of container private area failed
Warning: distribution not specified in CT config, using defaults from /etc/vz/dists/default
WARNING: /etc/vz/conf/4400.conf not found: No such file or directory
Note the CONFIGFILE is set as "vps.basic" in /etc/vz/vz.conf
CONFIGFILE="vps.basic"
The config file used in this case is /etc/vz/conf/ve-vps.basic.conf-sample
ls /etc/vz/conf/
ve-basic.conf-sample
So either change the filename to ve-vps.basic.conf-sample OR change the CONFIGFILE=basic
I changed it to CONFIGFILE=basic
Basically what happened is the vzctl update must have decided to break previous compatibility and create a new config file "ve-basic.conf-sample" and delete the original
Ubuntu 10 Nvidia Drivers Not Updated After Kernel Update Solution/How-To Manually Rebuild nvidia kernel modules for Ubuntu
I dread updating the kernel and rebooting to find the Ubuntu graphics aren't working and you have to manually intervene. This is usually because Ubuntu for whatever reason didn't update the drivers you need (eg. the manually compiled Nvidia Kernel driver that MUST be recompiled for each and every kernel update unfortunately).
The most common reason may be that "linux-source" hasn't been installed automatically on my system. I tried to manually reinstall the nvidia-driver hoping it would update the kernel-module (this is one thing I hate about Linux why can't we have a .dll style module that just works on ALL kernels like Windows without requiring an archaic recompile each time?)
You'll see below that it tells me when I tried to reinstall the nvidia kernel:
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.
sudo apt-get --reinstall install nvidia-current
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
python-tgext.admin uml-utilities python-openid python-ldap python-webob libjs-scriptaculous python-transaction python-beaker python-toscawidgets
python-repoze.what python-decoratortools python-mysqldb python-turbojson python-turbogears2 python-zope.sqlalchemy libhtml-template-perl
python-tg.devtools python-routes mysql-server-5.1 libopenjpeg2 python-sqlalchemy python-peak.util python-dev python-lxml python-nose libmysqlclient-dev
socat python-webflash python-webhelpers python-catwalk python-pybabel python-beautifulsoup python-repoze.what-plugins python-genshi python-formencode
python-scgi python-cheetah expect mysql-server python-repoze.who-plugins python-codespeak-lib python-pysqlite2 python-weberror python2.6-dev
python-repoze.tm2 python-pylons python-turbogears2-doc python-tempita tcl8.5 python-repoze.who python-migrate python-sprox python-setuptools dnsmasq
python-peak.rules python-pastescript libjs-prototype python-pygments python-decorator python-paste python-pastedeploy python-webtest python-xen-3.3
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 23.3MB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ca.archive.ubuntu.com/ubuntu/ lucid-updates/restricted nvidia-current 195.36.24-0ubuntu1~10.04.1 [23.3MB]
Fetched 23.3MB in 24s (942kB/s)
(Reading database ... 476658 files and directories currently installed.)
Preparing to replace nvidia-current 195.36.24-0ubuntu1~10.04.1 (using .../nvidia-current_195.36.24-0ubuntu1~10.04.1_i386.deb) ...
Removing all DKMS Modules
Done.
Unpacking replacement nvidia-current ...
Processing triggers for man-db ...
Setting up nvidia-current (195.36.24-0ubuntu1~10.04.1) ...
update-initramfs: deferring update (trigger activated)
update-initramfs: Generating /boot/initrd.img-2.6.32-38-generic-pae
Loading new nvidia-current-195.36.24 DKMS files...
Building only for 2.6.32-38-generic-pae
Building for architecture i686
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.
Processing triggers for python-gmenu ...
Rebuilding /usr/share/applications/desktop.en_US.utf8.cache...
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-2.6.32-38-generic-pae
Processing triggers for python-support ...
The solution: Install the Linux Kernel Source + headers & Reinstall nvidia-current kernel module
sudo apt-get install linux-source linux-headers-`uname -r`; sudo apt-get --reinstall install nvidia-current
Unpacking replacement nvidia-current ...
Processing triggers for man-db ...
Setting up nvidia-current (195.36.24-0ubuntu1~10.04.1) ...
update-initramfs: deferring update (trigger activated)
update-initramfs: Generating /boot/initrd.img-2.6.32-38-generic-pae
Loading new nvidia-current-195.36.24 DKMS files...
Building only for 2.6.32-38-generic-pae
Building for architecture i686
Building initial module for 2.6.32-38-generic-pae
Done.
nvidia-current.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/2.6.32-38-generic-pae/updates/dkms/
depmod....
DKMS: install Completed.
Processing triggers for python-gmenu ...
Rebuilding /usr/share/applications/desktop.en_US.utf8.cache...
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-2.6.32-38-generic-pae
Processing triggers for python-support ...
What's Needed To Fix Linux
I really am a Linux fan but my comments here may not show it. Although I'm quite familiar with Linux CLI to administer servers, I find Linux GUI OS's like Ubuntu at times very clunky.
This is partially because there's no such thing as a "self-made" Linux from scratch where the UI was designed by a single team. Linux is made up of several different projects that are generally completely separate and this lack of integratiion is a key issue that makes things frustrating.
The other frustration is the archaic way that Linux functions, it still hasn't changed much from it's infancy. It still has a kernel with it's own set of drivers and then userspace tools are loaded on top of that.
The first problem is that everything about Linux is constantly changing, instead of just making things work, there is too much focus on changing/improving for the sake of it. Linux attempts to do too many things at once but it can succeed as evidened by commercial solutions like Google's Android, and Apple's iOS/OSX platforms which are based on Linux and Unix (BSD) respectively.
What those platforms fix is the scattered collection of ideas that don't work well together, this shows what a single team can do. I believe the OpenSource world is too far apart to make the same solutions work.
The architecture the successful commericial platforms use is simply a hack of the OpenSource Nix platforms. All they've done is standardize an API for programming, this allows developers to easily create apps that will simply just "work" and will likely work even in future iterations of those OS's. Wheras Linux has a dynamic set of changing libraries that work fine, really they would probably be perfect if they would just be able to contain all of them in a set and certain/static API like Apple and Google have done.
All that's left after that point is to simply standardize how driver's are written, loaded and used in Linux. Driver's should all be binary or like a Windows .dll, where it's simply written for "Windows XP" or "Linux X" and it will work with all future versions, no need to keep recompiling and breaking things with a kernel upgrade. For that matter, the kernel shouldn't directly include any drivers because it's that close coupling that causes such annoyances and problems.
I only wish I had the time or money to make this all happen, the closest thing we have is probably Ubuntu but they still haven't created any sort of an API. People simply want what works, and Microsoft and Apple have shown the path to create standardized platforms that can evolve (somewhat) without breaking everything (at least sometimes) and at least having a stable and predictable API to write for. This is the other problem with Linux because there's next to no software and why would there be when it's so difficult to write software you know will work?
I realize there is some movement for a standardized Linux API but it looks like it's a long ways from fruition unfortunately.
mdadm/Debian problem
This is one in a series of weird things which I thought was motherboard related (I RMA'd the motherboard), the RAM tests fine with memtest86 and I used badblocks on both RAID 1 members with no errors and smartctl is happy with them.
Basically the array crashes the kernel a lot and has issues when writing.
[112322.723465] md0: rw=0, want=14958668696, limit=1887460480
[112322.731077] attempt to access beyond end of device
[112322.731087] md0: rw=0, want=15317836648, limit=1887460480
[112322.738658] attempt to access beyond end of device
[112322.738665] md0: rw=0, want=14557092656, limit=1887460480
[112322.746240] attempt to access beyond end of device
[112322.746247] md0: rw=0, want=13615825512, limit=1887460480
[112322.753879] attempt to access beyond end of device
[112322.753886] md0: rw=0, want=10243185616, limit=1887460480
[112322.761488] attempt to access beyond end of device
[112322.761495] md0: rw=0, want=16280781608, limit=1887460480
[112322.769040] attempt to access beyond end of device
[112322.769047] md0: rw=0, want=13477045008, limit=1887460480
[112322.776620] attempt to access beyond end of device
[112322.776627] md0: rw=0, want=13081051920, limit=1887460480
[112322.784183] attempt to access beyond end of device
[112322.784190] md0: rw=0, want=13036135296, limit=1887460480
[112322.791755] attempt to access beyond end of device
[112322.791762] md0: rw=0, want=14955905952, limit=1887460480
[112322.799343] attempt to access beyond end of device
[112322.799350] md0: rw=0, want=15490155432, limit=1887460480
[112322.812625] attempt to access beyond end of device
[112322.812635] md0: rw=0, want=15627135856, limit=1887460480
[197982.158091] attempt to access beyond end of device
[197982.158103] md0: rw=0, want=15356076848, limit=1887460480
[197982.158111] attempt to access beyond end of device
[197982.158117] md0: rw=0, want=6235036464, limit=1887460480
[197982.158125] attempt to access beyond end of device
[197982.158130] md0: rw=0, want=4353901448, limit=1887460480
[197982.158137] attempt to access beyond end of device
[197982.158143] md0: rw=0, want=14512518016, limit=1887460480
[197982.158150] attempt to access beyond end of device
[197982.158154] md0: rw=0, want=4348146512, limit=1887460480
[197982.158161] attempt to access beyond end of device
[197982.158166] md0: rw=0, want=12219165136, limit=1887460480
[197982.158173] attempt to access beyond end of device
[197982.158178] md0: rw=0, want=4350251576, limit=1887460480
[197982.158185] attempt to access beyond end of device
[197982.158190] md0: rw=0, want=4354966032, limit=1887460480
[197982.158200] attempt to access beyond end of device
[197982.158205] md0: rw=0, want=6593546632, limit=1887460480
[197982.158211] attempt to access beyond end of device
[197982.158216] md0: rw=0, want=6872486280, limit=1887460480
[197982.158223] attempt to access beyond end of device
[197982.158228] md0: rw=0, want=4323387864, limit=1887460480
[197982.158235] attempt to access beyond end of device
[197982.158240] md0: rw=0, want=6602457496, limit=1887460480
[197982.158247] attempt to access beyond end of device
[197982.158252] md0: rw=0, want=13603767024, limit=1887460480
[197982.158258] attempt to access beyond end of device
[197982.158263] md0: rw=0, want=15359251352, limit=1887460480
[197982.158270] attempt to access beyond end of device
[197982.158275] md0: rw=0, want=13335331568, limit=1887460480
[197982.158282] attempt to access beyond end of device
[197982.158287] md0: rw=0, want=14817119080, limit=1887460480
[197982.158294] attempt to access beyond end of device
[197982.158299] md0: rw=0, want=7276135336, limit=1887460480
[197982.158305] attempt to access beyond end of device
[197982.158310] md0: rw=0, want=7677776248, limit=1887460480
[197982.158317] attempt to access beyond end of device
[197982.158322] md0: rw=0, want=6199818616, limit=1887460480
[197982.158327] attempt to access beyond end of device
[197982.158332] md0: rw=0, want=12509086096, limit=1887460480
[197982.172402] attempt to access beyond end of device
[197982.172410] md0: rw=0, want=10775331080, limit=1887460480
[197982.172418] attempt to access beyond end of device
[197982.172423] md0: rw=0, want=15351855368, limit=1887460480
[197982.172430] attempt to access beyond end of device
[197982.172435] md0: rw=0, want=13882313592, limit=1887460480
[197982.172441] attempt to access beyond end of device
[197982.172446] md0: rw=0, want=14646575576, limit=1887460480
[197982.172452] attempt to access beyond end of device
[197982.172456] md0: rw=0, want=14554995664, limit=1887460480
[197982.172463] attempt to access beyond end of device
[197982.172467] md0: rw=0, want=15622419200, limit=1887460480
[197982.172476] attempt to access beyond end of device
[197982.172481] md0: rw=0, want=13069140768, limit=1887460480
[197982.172487] attempt to access beyond end of device
[197982.172492] md0: rw=0, want=13345987488, limit=1887460480
[197982.172498] attempt to access beyond end of device
[197982.172520] md0: rw=0, want=4325460296, limit=1887460480
[197982.172527] attempt to access beyond end of device
[197982.172532] md0: rw=0, want=15091346336, limit=1887460480
[197982.172539] attempt to access beyond end of device
[197982.172544] md0: rw=0, want=13474941800, limit=1887460480
[197982.172551] attempt to access beyond end of device
[197982.172556] md0: rw=0, want=13884393736, limit=1887460480
[197982.172563] attempt to access beyond end of device
[197982.172568] md0: rw=0, want=14817127344, limit=1887460480
[197982.172575] attempt to access beyond end of device
[197982.172580] md0: rw=0, want=15490155432, limit=1887460480
[197982.172587] attempt to access beyond end of device
[197982.172592] md0: rw=0, want=15627677960, limit=1887460480
[197982.172599] attempt to access beyond end of device
[197982.172604] md0: rw=0, want=15854668040, limit=1887460480
[197982.172611] attempt to access beyond end of device
[197982.172616] md0: rw=0, want=13477045008, limit=1887460480
[197982.172623] attempt to access beyond end of device
[197982.172628] md0: rw=0, want=11203668232, limit=1887460480
[197982.172635] attempt to access beyond end of device
[197982.172640] md0: rw=0, want=15317754512, limit=1887460480
[197982.172647] attempt to access beyond end of device
[197982.172652] md0: rw=0, want=14557092656, limit=1887460480
[197982.172660] attempt to access beyond end of device
[197982.172665] md0: rw=0, want=13615825832, limit=1887460480
[197982.172672] attempt to access beyond end of device
[197982.172677] md0: rw=0, want=15362390944, limit=1887460480
[197982.172683] attempt to access beyond end of device
[197982.172688] md0: rw=0, want=14109846304, limit=1887460480
[197982.172695] attempt to access beyond end of device
[197982.172700] md0: rw=0, want=15996617592, limit=1887460480
[197982.172707] attempt to access beyond end of device
[197982.172712] md0: rw=0, want=15862578112, limit=1887460480
[197982.172718] attempt to access beyond end of device
[197982.172723] md0: rw=0, want=15629777736, limit=1887460480
[197982.172730] attempt to access beyond end of device
[197982.172735] md0: rw=0, want=13477444512, limit=1887460480
[197982.172742] attempt to access beyond end of device
[197982.172747] md0: rw=0, want=15087678320, limit=1887460480
[197982.172754] attempt to access beyond end of device
[197982.172759] md0: rw=0, want=14688131448, limit=1887460480
[197982.172766] attempt to access beyond end of device
[197982.172771] md0: rw=0, want=15359226240, limit=1887460480
[197982.172778] attempt to access beyond end of device
[197982.172783] md0: rw=0, want=6368750512, limit=1887460480
[197982.172788] attempt to access beyond end of device
[197982.172793] md0: rw=0, want=14145498008, limit=1887460480
[197982.172840] attempt to access beyond end of device
[197982.172845] md0: rw=0, want=15356076848, limit=1887460480
[197982.172854] attempt to access beyond end of device
[197982.172859] md0: rw=0, want=15356076848, limit=1887460480
[197982.187795] attempt to access beyond end of device
[197982.187805] md0: rw=0, want=15621368728, limit=1887460480
[197982.187812] attempt to access beyond end of device
[197982.187818] md0: rw=0, want=15087141240, limit=1887460480
[197982.187831] attempt to access beyond end of device
[197982.187836] md0: rw=0, want=4352866568, limit=1887460480
[197982.187841] attempt to access beyond end of device
[197982.187845] md0: rw=0, want=13613878120, limit=1887460480
[197982.187852] attempt to access beyond end of device
[197982.187856] md0: rw=0, want=15621368728, limit=1887460480
[197982.195642] attempt to access beyond end of device
[197982.195650] md0: rw=0, want=4343960448, limit=1887460480
[197982.203466] attempt to access beyond end of device
[197982.203474] md0: rw=0, want=15486090056, limit=1887460480
[197982.211212] attempt to access beyond end of device
[197982.211220] md0: rw=0, want=14557092656, limit=1887460480
[197982.219044] attempt to access beyond end of device
[197982.219053] md0: rw=0, want=13340742480, limit=1887460480
[197982.226286] attempt to access beyond end of device
[197982.226295] md0: rw=0, want=12542245784, limit=1887460480
[197982.233971] attempt to access beyond end of device
[197982.233979] md0: rw=0, want=13069140768, limit=1887460480
[197982.241578] attempt to access beyond end of device
[197982.241586] md0: rw=0, want=15763975064, limit=1887460480
[197982.249192] attempt to access beyond end of device
[197982.249199] md0: rw=0, want=13615975208, limit=1887460480
[197982.256788] attempt to access beyond end of device
[197982.256795] md0: rw=0, want=15359251352, limit=1887460480
[197982.264466] attempt to access beyond end of device
[197982.264475] md0: rw=0, want=12805413800, limit=1887460480
[197982.272066] attempt to access beyond end of device
[197982.272074] md0: rw=0, want=15488225544, limit=1887460480
[197982.279633] attempt to access beyond end of device
[197982.279641] md0: rw=0, want=15356076848, limit=1887460480
[197982.287247] attempt to access beyond end of device
[197982.287254] md0: rw=0, want=14958170928, limit=1887460480
[197982.294859] attempt to access beyond end of device
[197982.294867] md0: rw=0, want=14010786608, limit=1887460480
[197982.302450] attempt to access beyond end of device
[197982.302460] md0: rw=0, want=13615825512, limit=1887460480
[197982.323706] attempt to access beyond end of device
[197982.323716] md0: rw=0, want=15493448632, limit=1887460480
[197982.331681] attempt to access beyond end of device
[197982.331690] md0: rw=0, want=8741145496, limit=1887460480
[197982.339915] attempt to access beyond end of device
[197982.339923] md0: rw=0, want=12509086096, limit=1887460480
[197982.348118] attempt to access beyond end of device
[197982.348126] md0: rw=0, want=13613378368, limit=1887460480
[197982.356326] attempt to access beyond end of device
[197982.356334] md0: rw=0, want=14952935808, limit=1887460480
[197982.364566] attempt to access beyond end of device
[197982.364574] md0: rw=0, want=4350251576, limit=1887460480
[197982.372835] attempt to access beyond end of device
[197982.372846] md0: rw=0, want=6870370680, limit=1887460480
[197982.380859] attempt to access beyond end of device
[197982.380866] md0: rw=0, want=14691285912, limit=1887460480
[197982.388975] attempt to access beyond end of device
[197982.388984] md0: rw=0, want=14020606912, limit=1887460480
[197982.396094] attempt to access beyond end of device
[197982.396103] md0: rw=0, want=14152774368, limit=1887460480
[197982.403752] attempt to access beyond end of device
[197982.403759] md0: rw=0, want=6468235664, limit=1887460480
[197982.411357] attempt to access beyond end of device
[197982.411364] md0: rw=0, want=15757710096, limit=1887460480
[197982.418946] attempt to access beyond end of device
[197982.418953] md0: rw=0, want=15862578112, limit=1887460480
[197982.426554] attempt to access beyond end of device
[197982.426561] md0: rw=0, want=15337707608, limit=1887460480
[197982.434156] attempt to access beyond end of device
[197982.434164] md0: rw=0, want=6600886720, limit=1887460480
[197982.441747] attempt to access beyond end of device
[197982.441754] md0: rw=0, want=13884393736, limit=1887460480
[197982.455447] attempt to access beyond end of device
[197982.455456] md0: rw=0, want=4343830920, limit=1887460480
[197982.459713] attempt to access beyond end of device
[197982.459722] md0: rw=0, want=14817127344, limit=1887460480
[197982.469075] attempt to access beyond end of device
[197982.469084] md0: rw=0, want=15493448632, limit=1887460480
[197982.476918] attempt to access beyond end of device
[197982.476925] md0: rw=0, want=8741145496, limit=1887460480
[197982.485018] attempt to access beyond end of device
[197982.485026] md0: rw=0, want=12509086096, limit=1887460480
[197982.493569] attempt to access beyond end of device
[197982.493579] md0: rw=0, want=13613378368, limit=1887460480
[197982.504898] attempt to access beyond end of device
[197982.504907] md0: rw=0, want=14952935808, limit=1887460480
[197982.512582] attempt to access beyond end of device
[197982.512590] md0: rw=0, want=4350251576, limit=1887460480
[197982.520230] attempt to access beyond end of device
[197982.520237] md0: rw=0, want=6870370680, limit=1887460480
[197982.528200] attempt to access beyond end of device
[197982.528208] md0: rw=0, want=14691285912, limit=1887460480
[197982.535988] attempt to access beyond end of device
[197982.535995] md0: rw=0, want=14020606912, limit=1887460480
[197982.543663] attempt to access beyond end of device
[197982.543670] md0: rw=0, want=14152774368, limit=1887460480
[197982.551292] attempt to access beyond end of device
[197982.551299] md0: rw=0, want=6468235664, limit=1887460480
[197982.558961] attempt to access beyond end of device
[197982.558968] md0: rw=0, want=15757710096, limit=1887460480
[197982.566638] attempt to access beyond end of device
[197982.566645] md0: rw=0, want=15862578112, limit=1887460480
[197982.574332] attempt to access beyond end of device
[197982.574339] md0: rw=0, want=15337707608, limit=1887460480
[197982.596726] attempt to access beyond end of device
[197982.596735] md0: rw=0, want=4320755976, limit=1887460480
[197982.605157] attempt to access beyond end of device
[197982.605166] md0: rw=0, want=13079096184, limit=1887460480
[197982.613394] attempt to access beyond end of device
[197982.613403] md0: rw=0, want=14019152664, limit=1887460480
[197982.621968] attempt to access beyond end of device
[197982.621976] md0: rw=0, want=14251432816, limit=1887460480
[197982.630545] attempt to access beyond end of device
[197982.630553] md0: rw=0, want=15353983792, limit=1887460480
[197982.639296] attempt to access beyond end of device
[197982.639305] md0: rw=0, want=14017459112, limit=1887460480
[197982.655285] attempt to access beyond end of device
[197982.655294] md0: rw=0, want=14688131448, limit=1887460480
[197982.663532] attempt to access beyond end of device
[197982.663542] md0: rw=0, want=16034396424, limit=1887460480
[197982.672160] attempt to access beyond end of device
[197982.672168] md0: rw=0, want=15488225544, limit=1887460480
[197982.680772] attempt to access beyond end of device
[197982.680781] md0: rw=0, want=14955905952, limit=1887460480
[197982.689300] attempt to access beyond end of device
[197982.689309] md0: rw=0, want=15091346336, limit=1887460480
[197982.697675] attempt to access beyond end of device
[197982.697684] md0: rw=0, want=12807539616, limit=1887460480
[197982.705995] attempt to access beyond end of device
[197982.706003] md0: rw=0, want=10754386312, limit=1887460480
[197982.714173] attempt to access beyond end of device
[197982.714182] md0: rw=0, want=13611262752, limit=1887460480
[197982.721903] attempt to access beyond end of device
[197982.721910] md0: rw=0, want=4323383768, limit=1887460480
[197982.729999] attempt to access beyond end of device
[197982.730007] md0: rw=0, want=9442972472, limit=1887460480
[197982.757712] attempt to access beyond end of device
[197982.757721] md0: rw=0, want=16034544000, limit=1887460480
[197982.765003] attempt to access beyond end of device
[197982.765010] md0: rw=0, want=6325236560, limit=1887460480
[197982.772724] attempt to access beyond end of device
[197982.772735] md0: rw=0, want=14109846304, limit=1887460480
[197982.780443] attempt to access beyond end of device
[197982.780451] md0: rw=0, want=13347564416, limit=1887460480
[197982.788213] attempt to access beyond end of device
[197982.788221] md0: rw=0, want=14958668696, limit=1887460480
[197982.795966] attempt to access beyond end of device
[197982.795974] md0: rw=0, want=15317836648, limit=1887460480
[197982.803734] attempt to access beyond end of device
[197982.803745] md0: rw=0, want=14557092656, limit=1887460480
[197982.818946] attempt to access beyond end of device
[197982.818955] md0: rw=0, want=13615825512, limit=1887460480
[197982.826775] attempt to access beyond end of device
[197982.826782] md0: rw=0, want=10243185616, limit=1887460480
[197982.834575] attempt to access beyond end of device
[197982.834582] md0: rw=0, want=16280781608, limit=1887460480
[197982.842295] attempt to access beyond end of device
[197982.842302] md0: rw=0, want=13477045008, limit=1887460480
[197982.850727] attempt to access beyond end of device
[197982.850735] md0: rw=0, want=13081051920, limit=1887460480
[197982.858873] attempt to access beyond end of device
[197982.858881] md0: rw=0, want=13036135296, limit=1887460480
[197982.867006] attempt to access beyond end of device
[197982.867014] md0: rw=0, want=14955905952, limit=1887460480
[197982.875074] attempt to access beyond end of device
[197982.875083] md0: rw=0, want=15490155432, limit=1887460480
[197982.882933] attempt to access beyond end of device
[197982.882943] md0: rw=0, want=15627135856, limit=1887460480
[197992.940493] attempt to access beyond end of device
[197992.940498] md0: rw=0, want=15356076848, limit=1887460480
[197992.940501] attempt to access beyond end of device
[197992.940503] md0: rw=0, want=15356076848, limit=1887460480
[197992.943021] attempt to access beyond end of device
[197992.943024] md0: rw=0, want=15621368728, limit=1887460480
[197992.945220] attempt to access beyond end of device
[197992.945223] md0: rw=0, want=4343960448, limit=1887460480
[197992.947390] attempt to access beyond end of device
[197992.947392] md0: rw=0, want=15486090056, limit=1887460480
[197992.949564] attempt to access beyond end of device
[197992.949566] md0: rw=0, want=14557092656, limit=1887460480
[197992.952267] attempt to access beyond end of device
[197992.952269] md0: rw=0, want=13340742480, limit=1887460480
[197992.954466] attempt to access beyond end of device
[197992.954468] md0: rw=0, want=12542245784, limit=1887460480
[197992.956639] attempt to access beyond end of device
[197992.956641] md0: rw=0, want=13069140768, limit=1887460480
[197992.958810] attempt to access beyond end of device
[197992.958812] md0: rw=0, want=15763975064, limit=1887460480
[197992.961498] attempt to access beyond end of device
[197992.961500] md0: rw=0, want=13615975208, limit=1887460480
[197992.963688] attempt to access beyond end of device
[197992.963691] md0: rw=0, want=15359251352, limit=1887460480
[197992.965852] attempt to access beyond end of device
[197992.965855] md0: rw=0, want=12805413800, limit=1887460480
[197992.968025] attempt to access beyond end of device
[197992.968027] md0: rw=0, want=15488225544, limit=1887460480
[197992.970204] attempt to access beyond end of device
[197992.970206] md0: rw=0, want=15356076848, limit=1887460480
[197992.972997] attempt to access beyond end of device
[197992.973000] md0: rw=0, want=14958170928, limit=1887460480
[197992.975189] attempt to access beyond end of device
[197992.975191] md0: rw=0, want=14010786608, limit=1887460480
[197992.977372] attempt to access beyond end of device
[197992.977374] md0: rw=0, want=13615825512, limit=1887460480
[197992.979545] attempt to access beyond end of device
[197992.979547] md0: rw=0, want=15493448632, limit=1887460480
[197992.982212] attempt to access beyond end of device
[197992.982214] md0: rw=0, want=8741145496, limit=1887460480
[197992.984400] attempt to access beyond end of device
[197992.984402] md0: rw=0, want=12509086096, limit=1887460480
[197992.986567] attempt to access beyond end of device
[197992.986569] md0: rw=0, want=13613378368, limit=1887460480
[197992.988739] attempt to access beyond end of device
[197992.988741] md0: rw=0, want=14952935808, limit=1887460480
[197992.991300] attempt to access beyond end of device
[197992.991302] md0: rw=0, want=4350251576, limit=1887460480
[197992.993514] attempt to access beyond end of device
[197992.993516] md0: rw=0, want=6870370680, limit=1887460480
[197992.995694] attempt to access beyond end of device
[197992.995696] md0: rw=0, want=14691285912, limit=1887460480
[197992.997876] attempt to access beyond end of device
[197992.997878] md0: rw=0, want=14020606912, limit=1887460480
[197994.606944] attempt to access beyond end of device
[197994.606954] md0: rw=0, want=14152774368, limit=1887460480
[197994.614356] attempt to access beyond end of device
[197994.614364] md0: rw=0, want=6468235664, limit=1887460480
[197994.621539] attempt to access beyond end of device
[197994.621547] md0: rw=0, want=15757710096, limit=1887460480
[197994.628686] attempt to access beyond end of device
[197994.628693] md0: rw=0, want=15862578112, limit=1887460480
[197994.635885] attempt to access beyond end of device
[197994.635892] md0: rw=0, want=15337707608, limit=1887460480
[197994.642493] attempt to access beyond end of device
[197994.642502] md0: rw=0, want=6600886720, limit=1887460480
[197994.649742] attempt to access beyond end of device
[197994.649750] md0: rw=0, want=13884393736, limit=1887460480
[197994.657086] attempt to access beyond end of device
[197994.657095] md0: rw=0, want=4343830920, limit=1887460480
[197994.664387] attempt to access beyond end of device
[197994.664395] md0: rw=0, want=14817127344, limit=1887460480
[197994.672337] attempt to access beyond end of device
[197994.672345] md0: rw=0, want=15493448632, limit=1887460480
[197994.679501] attempt to access beyond end of device
[197994.679508] md0: rw=0, want=8741145496, limit=1887460480
[197994.686779] attempt to access beyond end of device
[197994.686786] md0: rw=0, want=12509086096, limit=1887460480
[197994.693957] attempt to access beyond end of device
[197994.693964] md0: rw=0, want=13613378368, limit=1887460480
[197994.700817] attempt to access beyond end of device
[197994.700825] md0: rw=0, want=14952935808, limit=1887460480
[197994.707741] attempt to access beyond end of device
[197994.707750] md0: rw=0, want=4350251576, limit=1887460480
[197994.715420] attempt to access beyond end of device
[197994.715428] md0: rw=0, want=6870370680, limit=1887460480
[197994.723007] attempt to access beyond end of device
[197994.723015] md0: rw=0, want=14691285912, limit=1887460480
[197994.730615] attempt to access beyond end of device
[197994.730623] md0: rw=0, want=14020606912, limit=1887460480
[197994.738204] attempt to access beyond end of device
[197994.738212] md0: rw=0, want=14152774368, limit=1887460480
[197994.745813] attempt to access beyond end of device
[197994.745821] md0: rw=0, want=6468235664, limit=1887460480
[197994.753409] attempt to access beyond end of device
[197994.753417] md0: rw=0, want=15757710096, limit=1887460480
[197994.760978] attempt to access beyond end of device
[197994.760985] md0: rw=0, want=15862578112, limit=1887460480
[197994.768542] attempt to access beyond end of device
[197994.768549] md0: rw=0, want=15337707608, limit=1887460480
[197994.777028] attempt to access beyond end of device
[197994.777037] md0: rw=0, want=4320755976, limit=1887460480
[197994.784729] attempt to access beyond end of device
[197994.784737] md0: rw=0, want=13079096184, limit=1887460480
[197994.792300] attempt to access beyond end of device
[197994.792307] md0: rw=0, want=14019152664, limit=1887460480
[197994.799842] attempt to access beyond end of device
[197994.799849] md0: rw=0, want=14251432816, limit=1887460480
[197994.807437] attempt to access beyond end of device
[197994.807444] md0: rw=0, want=15353983792, limit=1887460480
[197994.815147] attempt to access beyond end of device
[197994.815155] md0: rw=0, want=14017459112, limit=1887460480
[197994.823009] attempt to access beyond end of device
[197994.823017] md0: rw=0, want=14688131448, limit=1887460480
[197994.830639] attempt to access beyond end of device
[197994.830646] md0: rw=0, want=16034396424, limit=1887460480
[197994.838266] attempt to access beyond end of device
[197994.838274] md0: rw=0, want=15488225544, limit=1887460480
[197994.845911] attempt to access beyond end of device
[197994.845918] md0: rw=0, want=14955905952, limit=1887460480
[197994.853544] attempt to access beyond end of device
[197994.853551] md0: rw=0, want=15091346336, limit=1887460480
[197994.861116] attempt to access beyond end of device
[197994.861123] md0: rw=0, want=12807539616, limit=1887460480
[197994.868664] attempt to access beyond end of device
[197994.868671] md0: rw=0, want=10754386312, limit=1887460480
[197994.876246] attempt to access beyond end of device
[197994.876253] md0: rw=0, want=13611262752, limit=1887460480
[197994.883899] attempt to access beyond end of device
[197994.883907] md0: rw=0, want=4323383768, limit=1887460480
[197994.891498] attempt to access beyond end of device
[197994.891506] md0: rw=0, want=9442972472, limit=1887460480
[197994.899077] attempt to access beyond end of device
[197994.899084] md0: rw=0, want=16034544000, limit=1887460480
[197994.906712] attempt to access beyond end of device
[197994.906719] md0: rw=0, want=6325236560, limit=1887460480
[197994.914305] attempt to access beyond end of device
[197994.914312] md0: rw=0, want=14109846304, limit=1887460480
[197994.921879] attempt to access beyond end of device
[197994.921886] md0: rw=0, want=13347564416, limit=1887460480
[197994.929485] attempt to access beyond end of device
[197994.929492] md0: rw=0, want=14958668696, limit=1887460480
[197994.937138] attempt to access beyond end of device
[197994.937146] md0: rw=0, want=15317836648, limit=1887460480
[197994.944774] attempt to access beyond end of device
[197994.944782] md0: rw=0, want=14557092656, limit=1887460480
[197994.952374] attempt to access beyond end of device
[197994.952381] md0: rw=0, want=13615825512, limit=1887460480
[197994.959956] attempt to access beyond end of device
[197994.959963] md0: rw=0, want=10243185616, limit=1887460480
[197994.967555] attempt to access beyond end of device
[197994.967564] md0: rw=0, want=16280781608, limit=1887460480
[197994.975229] attempt to access beyond end of device
[197994.975237] md0: rw=0, want=13477045008, limit=1887460480
[197994.982882] attempt to access beyond end of device
[197994.982889] md0: rw=0, want=13081051920, limit=1887460480
[197994.990520] attempt to access beyond end of device
[197994.990527] md0: rw=0, want=13036135296, limit=1887460480
[197994.998120] attempt to access beyond end of device
[197994.998126] md0: rw=0, want=14955905952, limit=1887460480
[197995.005728] attempt to access beyond end of device
[197995.005735] md0: rw=0, want=15490155432, limit=1887460480
[197995.011240] attempt to access beyond end of device
[197995.011242] md0: rw=0, want=15627135856, limit=1887460480
[211268.793967] attempt to access beyond end of device
[211268.793971] md0: rw=0, want=15356076848, limit=1887460480
[211268.794086] attempt to access beyond end of device
[211268.794087] md0: rw=0, want=15356076848, limit=1887460480
[211268.859806] EXT3-fs error (device md0): ext3_free_blocks_sb: bit already cleared for block 150994365
[211268.859820] Aborting journal on device md0.
[211268.862669] ext3_abort called.
[211268.862676] EXT3-fs error (device md0): ext3_journal_start_sb: Detected aborted journal
[211268.862686] Remounting filesystem read-only
[211268.914458] Remounting filesystem read-only
[211268.915102] EXT3-fs error (device md0) in ext3_reserve_inode_write: Journal has aborted
[211268.915110] EXT3-fs error (device md0) in ext3_truncate: Journal has aborted
[211268.915117] EXT3-fs error (device md0) in ext3_reserve_inode_write: Journal has aborted
[211268.915126] EXT3-fs error (device md0) in ext3_orphan_del: Journal has aborted
[211268.915134] EXT3-fs error (device md0) in ext3_reserve_inode_write: Journal has aborted
[211268.917462] __journal_remove_journal_head: freeing b_committed_data
[211268.917466] __journal_remove_journal_head: freeing b_committed_data
[211268.917468] __journal_remove_journal_head: freeing b_committed_data
[211268.917470] __journal_remove_journal_head: freeing b_committed_data
[211268.917472] __journal_remove_journal_head: freeing b_committed_data
[211268.917474] __journal_remove_journal_head: freeing b_committed_data
[211268.917475] __journal_remove_journal_head: freeing b_committed_data
iptables block torrents/torrenting
This is a very basic method and won't work in all cases but will reduce the chance of torrenting/abuse by your server users.
iptables -A INPUT -p tcp --destination-port 6881:6999 -j REJECT
iptables -A OUTPUT -p tcp --source-port 6881:6999 -j REJECT
vmware Failed to initialize monitor device 95% power on
Failed to initialize monitor device 95% power on
Solution
/etc/init.d/vmware-core start
OpenVPN don't use bridgestart.sh or bridge at all use iptables
I used the suggested script to bridge from OpenVPN and it took my client's server off-line! Don't ever use their "sample" scripts if you don't have another way of accessing the server than SSH.
I actually found it easier to use iptables to tell it to route IPs based on a certain subnet to route through eth0:
iptables -t nat -A POSTROUTING -s 192.168.200.0/24 -o eth0 -j MASQUERADE
Replace "192.168.200.0/24" with your subnet of course.
postfix lopback error solution
This is the mail system at host mail.postmail.com.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to <postmaster>
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<prosupport@problemdomain.com.org>: mail for problemdomain.com.org loops back
to myself
----------------------
This issue was caused because postfix's list of destination domains was not updated with the domain in question. All you have to do is update it so it knows to accept mail to that domain.
Solution:
vi /etc/postfix/main.cf
Edit the "mydestination" and add your domain to this list:
mydestination = domainbla.com,
brokendomain.com
Edit the appropriate MySQL table if you're using MySQL as the backend for Postfix
service postfix reload
Drupal/MySQL database error: PDOException: SQLSTATE[42000] [1044] Access denied for user 'db_user'@'localhost' to database 'dbname' in lock_may_be_available() (line 167 of /home/user/public_html/includes/lock.inc).
PDOException: SQLSTATE[42000] [1044] Access denied for user 'db_user'@'localhost' to database 'dbname' in lock_may_be_available() (line
167 of /home/user/public_html/includes/lock.inc).
The username and password were correct but some reason CPanel added the user with no permissions! Edit the user's permissions to include "All" from Cpanel or MySQL and that is the solution.
How To Burn ISO Image using cdrtools/dvdrtools for Linux/Unix Ubuntu/Debian/RHEL/Centos etc..
It really is as simple as:
cdrecord -v dev=/dev/sr0 pathtoyourisoimage.iso
-v is for verbose, I prefer it but if you don't you won't see as much output like below (I like to know the details and exactly what's happening)
dev=/dev/sr0 specifies the device name of your burner (they say not to use it and to specify some weird annoying device string but using the raw /dev has always worked for me and is how it should have been implemented from the start IMHO)
cdrecord -v dev=/dev/sr0 isoimage.iso
wodim: No write mode specified.
wodim: Asuming -tao mode.
wodim: Future versions of wodim may have different drive dependent defaults.
TOC Type: 1 = CD-ROM
wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.scsidev: '/dev/sr0'
devname: '/dev/sr0'
scsibus: -2 target: -2 lun: -2
Linux sg driver version: 3.5.27
Wodim version: 1.1.9
SCSI buffer size: 64512
Device type : Removable CD-ROM
Version : 5
Response Format: 2
Capabilities :
Vendor_info : 'LITE-ON '
Identification : 'LTR-52327S '
Revision : 'QS0C'
Device seems to be: Generic mmc CD-RW.
Current: 0x0009 (CD-R)
Profile: 0x000A (CD-RW)
Profile: 0x0009 (CD-R) (current)
Profile: 0x0008 (CD-ROM)
Profile: 0x0002 (Removable disk)
Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr).
Driver flags : MMC-3 SWABAUDIO BURNFREE FORCESPEED
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
Drive buf size : 1422080 = 1388 KB
Beginning DMA speed test. Set CDR_NODMATEST environment variable if device
communication breaks or freezes immediately after that.
FIFO size : 12582912 = 12288 KB
Track 01: data 695 MB
Total size: 798 MB (79:06.56) = 355992 sectors
Lout start: 798 MB (79:08/42) = 355992 sectors
Current Secsize: 2048
ATIP info from disk:
Indicated writing power: 4
Is not unrestricted
Is not erasable
Disk sub type: Medium Type A, low Beta category (A-) (2)
ATIP start of lead in: -12508 (97:15/17)
ATIP start of lead out: 359845 (79:59/70)
Disk type: Short strategy type (Phthalocyanine or similar)
Manuf. index: 22
Manufacturer: Ritek Co.
Blocks total: 359845 Blocks current: 359845 Blocks remaining: 3853
Forcespeed is OFF.
Speed set to 9173 KB/s
Starting to write CD/DVD at speed 52.0 in real TAO mode for single session.
Last chance to quit, starting real write in 0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
Performing OPC...
Starting new track at sector: 0
Track 01: 695 of 695 MB written (fifo 100%) [buf 98%] 54.6x.
Track 01: Total bytes read/written: 729067520/729067520 (355990 sectors).
Writing time: 145.315s
Average write speed 35.3x.
Min drive buffer fill was 94%
Fixating...
Fixating time: 10.840s
BURN-Free was never needed.
wodim: fifo had 11484 puts and 11484 gets.
wodim: fifo was 0 times empty and 6227 times full, min fill was 95%.
Ubuntu Suspend Solution Fix blank screen laptop/computer won't come back
Even in new versions of Ubuntu this happens but for me I found out it was because of one feature under "Power Management".
I had "Spindown hard disks when possible" ticked, after disabling that, my computer wakes up from suspension every time now. So if your computer won't unsuspend with any version of Ubuntu/*Nix try disabling the spin down hard disk option as it's obviously the culprit for many situations.
iPhone Restore/Backup Location of Notes and Contact/Address Book
*Make sure that the ownership is 501.501 or mobile.mobile when copying back (especially if using ssh or sftp as root on the iPhone) otherwise things will break. Eg. the contacts will be blank even after trying to update due to incorrect ownership/permissions.
iPhone Notes Location/Restore:
/private/var/mobile/Library/AddressBook
AddressBookImages.sqlitedb AddressBook.sqlitedb
Once you restore the contacts and restart your address book/contacts you'll see that an Apple logo appears and seems to load halfway (progreess bar) and stops, you should be able to view your contacts but you'l have to respring or restart to get of it in the background. If the contacts don't work, you probably uploaded them with your root account, just chown them to 501.501 or mobile.mobile and they'll work.
iPhone Contacts Location/Restore:
/var/mobile/Library/Notes/
notes.db notes.idx
On iOS 4 it's notes.sqlite
Install Android SDK and start testing on Debian/Ubuntu: How To Guide/Tutorial
Visit http://linux.softpedia.com/get/Programming/Interpreters/Android-32340.shtml
Basically copy and paste all of that below and you'll have installed and started the Android SDK before you know it.
wget http://dl.google.com/android/android-sdk_r12-linux_x86.tgz
sudo apt-get install openjdk-6-jre openjdk-6-lib openjdk-6-jre-headless
tar -xvf android-sdk_r12-linux_x86.tgz
cd android-sdk-linux_x86/tools
./android
gocr - free Linux OCR (Optical Character Recognition) conversion tool
gocr works great and it's simple, just invoke it like so:
gocr filename.png
The output will be printed to the screen.
My only complaint/concern is that even with standard terminal output (not scanned) from a printscreen, gocr does make mistakes by inserting extra spaces where they don't belong, mistaking letters for numbers etc.. but it's definitely enough to be readable and figure out what you're looking at.
I haven't tested yet with scanned input from invoices, receipts etc..
Linux Kernel Panic Messages - Symptoms of bad RAM module/stick
These were caused by a bad stick of Corsair RAM
[<c0466769>] free_hot_cold_page+0xfc/0x150
[<c04667d1>] __pagevec_free+0x14/0x1a
[<c0468c6b>] release_pages+0x127/0x12f
[<c04692d1>] __pagevec_release+0x15/0x1d
[<c04697db>] __invalid_mapping_pages+0x120/0x156
[<c0469818>] invalidate_mapping_pages+0x7/0x9
[<c049c22e>] shrink_icache_memory+0xf5/0x295
[<c046aeab>] shrink_slab+0xfb/0x16e
[<c046b271>] kswapd+0x2d7/0x3fb
[<c0436e1f>] autoremove_wake_function+0x0/0x2d
[<c046af9a>] kswapd+0x0/0x3fb
[<c0436d5d>] kthread+0xc0/0xeb
[<c0436c9d>] kthread+0x0/0xeb
[<c062d243>] kernel_thread_helper+0x7/0x10
Code: 43 1c 31 c0 eb 0d 31 d2 89 f1 55 89 f8 e8 74 f0 ff ff 5a 5b 5e 5f 5d c3 55
89 d5 57 89 c7 56 53 8b 70 20 85 f6 0f 84 e9 00 00 00 <8b> 06 3d 75 62 75 62 0f
84 86 00 00 00 50 56 57 68 28 0e 63 c0
EIP: [<c043b5b4>] ub_page_uncharge+0x13/0x101 SS:ESP 0068:f7861df0
Kernel panic - not syncing: Fatal exception
---------
[<c0466769>] free_hot_cold_page+0xfc/0x150
[<c04667d1>] __pagvec_free+0x14/0x1a
[<c0468c37>] release_pages+0xf3/0x12f
[<c0469Zd1>] __pagevec_release+0x15/0x1d
[<c0469b1Z>] truncate_inode_pages_range+0xcc/0x260
[<f916c8d3>] journal_stop+0x208/0x213 [jbd]
[<c0469caf>] truncate_inode_pages+0x9/0xe
[<f91a8a57>] ext3_delete_inode+0x13/0xba [ext3]
[<f91a8a44>] ext3_delete_inode+0x0/0xba [ext3]
[<c049b9ea>] generic_deIete_inode+0x91/0xfe
[<c049b4c1>] input+x67/0x69
[<c0498df5>] d_kill+0x19/0x32
[<c0499f36>] dput+19f/0x1ac
[<c049Z717>] sys_renameat+0x15f/0x1af
[<c047Z410>] remove_vma+0x47/0x4c
[<c047Ze3a>] do_munmap+0x19e/0x1ba
[<c049Z778>] sys_rename+0x11/0x15
[<c06Zc4eb>] syscall_call+0x7/0xb
Code: 43 1c 31 c0 eb 0d 31 dZ 89 f1 55 89 f8 e8 74 f0 ff ff 5a 5b 5e 5f 5d c3 5'
89 d5 57 89 c7 56 53 8b 70 Z0 85 f6 0f 84 e9 00 00 00 <8b> 06 3d 75 6Z 75 6Z 0
84 86 00 00 00 50 56 57 68 Z8 0e 63 c0
EIP: [<c043b5b4>] ub_page_uncharge+0x13/0x101 SS:ESP 0068:f7acbd9c
Kernel panic - not syncing: Fatal exceptionHitachi HDD/Drive RMA Process Experience
The first Hitachi Deskstar 2TB 5K3000 drive I bought arrived DOA for whatever reason (not recognized by the BIOS or OS). Perhaps it was shipping since I bought only 1 hard drive. When I bought 4 through another Vendor, all 4 checked out fine.
I was worried about the RMA process because a lot of people have complained about Hitachi taking weeks to send out their hard drive and almost implied the warranty is useless.
I'm happy to report that my experience was great and quite easy. Hitachi's system e-mailed me and their on-line status shows the progress of the RMA, whether or not they received the drive, and if they've shipped a new one back.
RMA number: 3xxxxxxx
The returned defective hard disk drive was received and the replacement hard disk drive was shipped.
RMA issued on 2011-09-09
Defective hard disk drive received on 2011-09-14
Replacement hard disk drive sent on 2011-09-15
Here's a convenient link to Hitachi's RMA Process
http://www.hitachigst.com/portal/site/en/support/warranty/
Step 2 is handy to lookup your warranty status (shows if the product is under warranty and when it expires).
convert carat ^M/M Windows based text files to Linux
carat M isn't this symbol ^ that you think, it can only be produced by typing "Ctrl-v, Ctrl-m". That you might see in text files saved from Windows.
tofrodos is the package that has dos2unix which is basically the same scripts that replace ^M with /n
tofrodos is the Debian/Buntu package name which has the dos2unix and unix2dos binaries
MySQL Import CSV data tutorial guide
It's actually fairly straight forward:
load data local infile 'billpayments-payments.csv' into table payments
fields terminated by ','
enclosed by '"'
lines terminated by 'n'
The above assumes that your fields are terminated by a comma (some programs like OpenOffice change this to a semi-colon ;) and that they are enclosed with "
The above will insert the data from billpayments-payments.csv into the table payments.
scp not found - solution
Some minimal installs of Centos may be missing the scp command, which is actually part of the "openssh-clients" package.
scp not found
yum install openssh-clients
vino crashed/stopped working, restart vino manually without rebooting
The normal solution would be as follows:
export DISPLAY=:0.0
/usr/lib/vino/vino-server &
But what happens if that doesn't work? I haven't been able to find much documentation about how to find the list of displays and how their numbering works in Xorg.
Sometimes you'll get this error when trying to restart vino:
Cannot open display:
For some reason my display is not on 0.0, maybe it's because I restarted X a few times:
View a list of all X displays:
ls /tmp/.X*-lock
/tmp/.X10-lock /tmp/.X11-lock /tmp/.X12-lock /tmp/.X13-lock /tmp/.X14-lock /tmp/.X15-lock /tmp/.X1-lock /tmp/.X2-lock /tmp/.X3-lock /tmp/.X4-lock
I exported each one manually and restarted vino-server until I found that mine was 4.0 (if you use X2 or X4 lock) then you need to pass it as 2.0 or 4.0 or X10 is 1.0 etc...
export DISPLAY=:4.0
/usr/lib/vino/vino-server&
[1] 3854
$ 04/09/2011 12:14:04 PM Autoprobing TCP port in (all) network interface
04/09/2011 12:14:04 PM Listening IPv{4,6}://*:5900
04/09/2011 12:14:04 PM Autoprobing selected port 5900
04/09/2011 12:14:04 PM Advertising security type: 'TLS' (18)
04/09/2011 12:14:04 PM Advertising authentication type: 'VNC Authentication' (2)
04/09/2011 12:14:04 PM Advertising security type: 'VNC Authentication' (2)
(vino-server:3854): Gtk-WARNING **: Error parsing gtk-icon-sizes string:
'panel-menu=24,24
panel=20,20
gtk-button=18,18
gtk-large-toolbar=24,24'
vi problem in Ubuntu/Debian distros when editing up,down,left,right arrow keys produce A,B,D,C respectively
This is very annoying, the only known fix is to install vim
apt-get install vim
After that everything works as normal.
vi disable color syntax highlighting/can't read syntax highlighting
Within vi if you can't exit /etc/vim/vimrc you can type
:syntax off
And to turn it back on:
:syntax on
Many of us have a dark/black background in our terminal/shell making the default syntax unreadable, the solution is to either turn off syntax highlighting with :syntax off or to enable a special option in /etc/vim/vimrc
Edit /etc/vim/vimrc
The "syntax on" enables the highlighting permanently, and "syntax off" turn it off permanently (but of course it can temporarily be enabled or disabled within vi as shown above).
if has("syntax")
syntax on
endif
" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
set background=dark
If you are using a dark background then also set the "set background=dark" option on, otherwise it makes everything unreadable. I struggled with this until realizing that was an option.
You can also run "set background=dark" from vi itself.
sed print specific line from file using Linux/Bash
It may be hard to find by Googling by it's really quite simple and quicker than reading dozens of man page entries.
sed -n 5p somefile.txt
Just replace the 5 with whatever line you want to be printed.
wget download all files on page/directory automatically recursively
Have you ever found a website/page that has several or perhaps dozens, hundreds or thousands of files that you need downloaded but don't have the time to manually do it?
wget's recursive function called with -r does that, but also with some quirks to be warned about.
If you're doing it from a standard web based directory structure, you will notice there is still a link to .. and wget will follow that.
Eg. let's say you have files in http://serverip/documents/ and you call wget like this:
wget -r http://serverip/documents, it will get everything inside documents but also browse up to .. and basically download every traversable file that can be followed (obviously this is usually not your intention).
Another thing to watch out for is trying to use multiple sessions to traverse the same directory.
By default wget will overwrite all files in place that it finds are duplicates. The -nc option stops it from doing it, but I prefer the -N option which compares the time and size of the local and remote files and resumes if necessary and ignores them if they are the same (it doesn't compare by checksum though). I think -N is what most will find makes sense for them.
Avoid traversing outside of the intended path, by using -L for relative only.
Best Way To Use wget recursively
wget -nH -N -L -r http://serverip/path
-nH means no host directory, otherwise you'll get a structure downloaded that mirrors the remove path which can be annoying.
Eg. it would create serverip/path/file
-N tells us to resume files if they are incomplete but if the remote file is newer or bigger, then resume/overwrite. Otherwise nothing is done, the file is skipped since there's no sense in downloading the same thing again and overwriting.
-L says stay in the relative path and is the behavior that you probably wanted and expected without using -L
-r is obvious, it means recursive and to download from all links in the specified path
But even the above still does some annoying things, it will traverse as many levels as it can find and see.
samba/smbd connection to share problems and solutions
I'll start by showing some problems in the logs:
[2011/08/07 16:22:06, 0] param/loadparm.c:8569(process_usershare_file)
process_usershare_file: stat of /var/lib/samba/usershares/movie failed. Permission denied
[2011/08/07 16:22:06, 1] smbd/service.c:676(make_connection_snum)
create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
That means you don't have permission to access the files as a guest, if you're using Ubuntu make sure you check the "Guest access" box when sharing. I forgot this because I normally share from the config file and use "guest ok = yes".
[2011/08/07 16:26:37, 0] smbd/service.c:988(make_connection_snum)
canonicalize_connect_path failed for service movie, path /home/q/Movie
This is because you don't have permission at the filesystem level to access the share.
This is usually because you're sharing something in your home directory and the permissions for /home/yourdir are always 700 for security.
The only way around it is to do a chmod +x as root/sudo to /home/yourdirectory and then it will be resolved.
The actual user message from the SAMBA client will be "tree connect failed: NT_STATUS_BAD_NETWORK_NAME" and note this has nothing to do with a bad network name. I thought it meant it was because my computer name was very long and was truncated and it didn't recognize the full name but that wasn't the case. These errors all came down to a permissions issue which is mainly unique to sharing something from your home directory.
screen Cannot open your terminal '/dev/pts/2' - please check.
The solution to this screen issue is simple.
This happened to me in Centos 5 as a user, but I also su'd to it and I don't have any password for it.
I've read some people say this is more common when su'ing.
The solution is simple though, just give others rw access to the corresponding pts whether it's 0,1,2 etc..:
As root do
chmod o+rw /dev/pts/2
rpmforge: [#### ] 471/10722Segmentation fault yum[18934]: segfault at 0000000000000000 rip 00002ade62153a30 rsp 00007fff76f9fe58 error 4
A few days ago this happened on multiple Centos 5 servers and apparently anyone using rpmforge was affected by this error and there was no solution other than disabling that repo to fix it.
To some this highlighted a few points, that there is a reason RHEL exists with full paid support, and also that this could be a vulnerability and huge flaw with yum. A yum search or install should not segfault just because the rpmforge repo goes down.
Fortunately it came back up as expected but it was definitely an inconvenience for many and hopefully a lesson learned by everyone including the yum devs
rpmforge: [#### ] 471/10722Segmentation fault
yum[18934]: segfault at 0000000000000000 rip 00002ade62153a30 rsp 00007fff76f9fe58 error 4
IO/delay and high load when a SATA hard drive dies
dd if=/dev/sda of=/dev/null creates ever increasing load every second.
After minutes the load has moved up to 4.79
I've tried with two different discs in my system.
I wonder if it's a delay or problem with the SATA bus because one drive I have connected has recently failed.
I notice when drives fail that you get some IO/blocking issue when they don't respond properly.
Yes I believe it was, because here's the same disc after removing the dead SATA drive from the SATA bus:
03:49:32 up 11 min, 2 users, load average: 1.18, 1.00, 0.52
04:00:27 up 22 min, 2 users, load average: 1.18, 1.15, 0.84
13:22:19 up 44 min, 2 users, load average: 1.01, 1.12, 1.07
It's too bad Linux doesn't have a way I know of to tell the SATA bus to stop probing a dead SATA drive/port.
This feels almost like the blocking IO that you can get between IDE Slave/Master when one drive malfunctions.
ifup eth0 SIOCSIFFLAGS: Cannot allocate memory Failed to bring up eth0 Centos Network won't work after kernel update and reboot
ifup eth0
SIOCSIFFLAGS: Cannot allocate memory
Failed to bring up eth0
This is on a Centos 5.5 machine with OpenVZ kernel 2.6.18-238.12.1.el5.028stab091.1PAE, I updated 3 systems with the same hardware to the same kernel and for some reason the network didn't come back.
This only happened once the first time I booted into the new kernel and hasn't happened again but this is a serious issue for those running systems from remote locations such as a datacenters.
I believe rebooting is what fixed everything or possibly removing and reloading the kernel module for the NIC.
Did Rogers and other wireless block Mobile Twitter on government/police orders during the Canucks Stanely Cup Riot?
I am watching the Canucks riot and a reporter said Twitter is down.
My home connection on Shaw is fine, but when I used my Rogers network over the cell, it says "Rate Limit Exceeded". I wonder if this is a transparent redirect by Rogers under police order?
I noticed that the Telus network loaded Twitter just fine.
Openvz Container IP not working suddenly Solution
This may not apply to everyone but here is what happened to me.
One day my IP connectivity for one container went dead, I could ping the hostnode from it and the hostnode could ping it but there was no external routing. I restarted the network service but it didn't help.
I checked the routing table inside the VPS and the host and everything looked normal. I added another different IP on the same subnet to the container and it worked. Right away I started thinking that that one IP was stolen by another user on the network or that it had been null routed.
Then I decided to do a traceroute to it, I found the last IP it hit was a different hostnode than my server was on. Then I checked the route table on the other hostnode, sure enough it was routing for my containers IP even though it wasn't running there.
How did this happen? Because I had a failed attempt at live-migrating this server days before,and when the othe hostnode was restarted it brought up the other copy of my failed migration and added my IP to the routing table, so the two nodes were fighting and advertising the route for my containers IP.
The solution was just a "route del xx.xx.xx.xx venet0" from the hostnode that wasn't running my container.
How to view UDP and other protocol connections?
netstat is weak and can't show udp connections and most other protocols, use "ss" which is what netstat should have been:
The "-u" switch stands for udp, here's a list of other options:
Usage: ss [ OPTIONS ]
ss [ OPTIONS ] [ FILTER ]
-h, --help this message
-V, --version output version information
-n, --numeric don't resolve service names
-r, --resolve resolve host names
-a, --all display all sockets
-l, --listening display listening sockets
-o, --options show timer information
-e, --extended show detailed socket information
-m, --memory show socket memory usage
-p, --processes show process using socket
-i, --info show internal TCP information
-s, --summary show socket usage summary
-4, --ipv4 display only IP version 4 sockets
-6, --ipv6 display only IP version 6 sockets
-0, --packet display PACKET sockets
-t, --tcp display only TCP sockets
-u, --udp display only UDP sockets
-d, --dccp display only DCCP sockets
-w, --raw display only RAW sockets
-x, --unix display only Unix domain sockets
-f, --family=FAMILY display sockets of type FAMILY
-A, --query=QUERY
QUERY := {all|inet|tcp|udp|raw|unix|packet|netlink}[,QUERY]
-F, --filter=FILE read filter information from FILE
FILTER := [ state TCP-STATE ] [ EXPRESSION ]
ss -u
State Recv-Q Send-Q Local Address:Port Peer Address:Port
ESTAB 0 0 192.168.5.21:44862 156.154.70.1:domain
ESTAB 0 0 192.168.5.21:55120 208.67.222.222:domain
ESTAB 0 0 192.168.5.21:51548 208.67.222.222:domain
ESTAB 0 0 192.168.5.21:37629 156.154.70.1:domain
ESTAB 0 0 192.168.5.21:50728 208.67.222.222:domain
Openvz migration error solution Error: Failed to suspend container CPT ERR: f68cf000,25000 :foreign process 15755/14731(vzctl) inside CT (e.g. vzctl enter or vzctl exec). CPT ERR: f68cf000,25000 :suspend is impossible now.
Starting online migration of CT 25000 to 192.168.5.1
Preparing remote node
Initializing remote quota
Syncing private
Live migrating container...
Error: Failed to suspend container
CPT ERR: f68cf000,25000 :foreign process 15755/14731(vzctl) inside CT (e.g. vzctl enter or vzctl exec).
CPT ERR: f68cf000,25000 :suspend is impossible now.
CPT ERR: f68cf000,25000 :foreign process 15755/14731(vzctl) inside CT (e.g. vzctl enter or vzctl exec).
CPT ERR: f68cf000,25000 :suspend is impossible now.
CPT ERR: f68cf000,25000 :foreign process 15755/14731(vzctl) inside CT (e.g. vzctl enter or vzctl exec).
CPT ERR: f68cf000,25000 :suspend is impossible now.
This is because you've entered the container using vzctl enter and are still inside it. It should really either kick you out or notice this before starting the migration. The solution is to just get otu and logout.
Linux Out of Memory OOM Object Killer Solution "Out of memory: kill process 1955 (sshd) score 81 or a child"
I had a system running a 128MB live CD image with 2.8 gigs of available RAM and the OOM kernel killer went crazy when using dd for more than 8 minutes and kept killing everything. I've read that this is due to a low-memory issue and paging in the kernel and 32-bit systems with lots of RAM.
I even enabled swapspace on my LiveCD and the issue happened 25 minutes into dd rather than 8 minutes, so what gives?
Also no swap space was ever used!
cat /proc/swaps
Filename Type Size Used Priority
/dev/sda2 partition 30716152 2784 -1
Here is a nice thread on the issue: http://www.redhat.com/archives/redhat-list/2007-August/msg00060.html
I believe the option below in the kernel under "Processor Type & Features" should resolve this.
Solution for OOM
[*] Allocate 3rd-level pagetables from highmem
Here is meminfo when the OOM killer is not active
-bash-3.1# cat /proc/meminfo
MemTotal: 2855128 kB
MemFree: 77016 kB
Buffers: 47012 kB
Cached: 2646720 kB
SwapCached: 908 kB
Active: 1411204 kB
Inactive: 1283876 kB
HighTotal: 1963904 kB
HighFree: 428 kB
LowTotal: 891224 kB
LowFree: 76588 kB
SwapTotal: 30716152 kB
SwapFree: 30712628 kB
Dirty: 0 kB
Writeback: 296 kB
AnonPages: 876 kB
Mapped: 1424 kB
Slab: 45668 kB
SReclaimable: 40420 kB
SUnreclaim: 5248 kB
PageTables: 328 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 32143716 kB
Committed_AS: 8416 kB
VmallocTotal: 114680 kB
VmallocUsed: 16336 kB
VmallocChunk: 97976 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 4096 kB
DirectMap4k: 4096 kB
DirectMap4M: 913408 kB
Here is meminfo when OOM killer is active
cat /proc/meminfo
MemTotal: 2855128 kB
MemFree: 76440 kB
Buffers: 0 kB
Cached: 2712884 kB
SwapCached: 520 kB
Active: 1433708 kB
Inactive: 1279804 kB
HighTotal: 1963904 kB
HighFree: 428 kB
LowTotal: 891224 kB
LowFree: 76012 kB
SwapTotal: 30716152 kB
SwapFree: 30713364 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 372 kB
Mapped: 2616 kB
Slab: 28280 kB
SReclaimable: 22952 kB
SUnreclaim: 5328 kB
PageTables: 320 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 32143716 kB
Committed_AS: 6888 kB
VmallocTotal: 114680 kB
VmallocUsed: 16336 kB
VmallocChunk: 97976 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 4096 kB
DirectMap4k: 4096 kB
DirectMap4M: 913408 kB
dmesg
2kB
720352 pages RAM
490976 pages HighMem
6570 pages reserved
1585 pages shared
692675 pages non-shared
Out of memory: kill process 1955 (sshd) score 81 or a child
Killed process 3302 (sshd)
bash invoked oom-killer: gfp_mask=0x1200d2, order=0, oomkilladj=0
Pid: 3311, comm: bash Not tainted 2.6.27.54 #31
[<c014ecd2>] oom_kill_process+0xe6/0x10c
[<c014efd3>] out_of_memory+0xaf/0x100
[<c0150844>] __alloc_pages_internal+0x31c/0x3b0
[<c015a53f>] do_wp_page+0x9f/0x49c
[<c011855e>] ? task_new_fair+0x6e/0xb0
[<c015b757>] handle_mm_fault+0x183/0x1e0
[<c0113e07>] do_page_fault+0x11f/0x43c
[<c0113ce8>] ? do_page_fault+0x0/0x43c
[<c026f572>] error_code+0x72/0x78
=======================
Mem-Info:
DMA per-cpu:
CPU 0: hi: 0, btch: 1 usd: 0
CPU 1: hi: 0, btch: 1 usd: 0
CPU 2: hi: 0, btch: 1 usd: 0
CPU 3: hi: 0, btch: 1 usd: 0
Normal per-cpu:
CPU 0: hi: 186, btch: 31 usd: 150
CPU 1: hi: 186, btch: 31 usd: 171
CPU 2: hi: 186, btch: 31 usd: 145
CPU 3: hi: 186, btch: 31 usd: 153
HighMem per-cpu:
CPU 0: hi: 186, btch: 31 usd: 80
CPU 1: hi: 186, btch: 31 usd: 157
CPU 2: hi: 186, btch: 31 usd: 208
CPU 3: hi: 186, btch: 31 usd: 137
Active:358187 inactive:320084 dirty:0 writeback:0 unstable:0
free:19121 slab:7075 mapped:659 pagetables:82 bounce:0
DMA free:11164kB min:64kB low:80kB high:96kB active:1472kB inactive:1240kB present:15868kB pages_scanned:9835 all_unreclaimable? yes
lowmem_reserve[]: 0 873 2776 2776
Normal free:64892kB min:3744kB low:4680kB high:5616kB active:382712kB inactive:382612kB present:894080kB pages_scanned:372896 all_unreclaimable? no
lowmem_reserve[]: 0 0 15223 15223
HighMem free:428kB min:512kB low:2552kB high:4592kB active:1048564kB inactive:896484kB present:1948560kB pages_scanned:31617081 all_unreclaimable? yes
lowmem_reserve[]: 0 0 0 0
DMA: 1*4kB 7*8kB 40*16kB 75*32kB 36*64kB 9*128kB 4*256kB 3*512kB 2*1024kB 0*2048kB 0*4096kB = 11164kB
Normal: 15423*4kB 18*8kB 9*16kB 2*32kB 6*64kB 0*128kB 0*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 64988kB
HighMem: 1*4kB 1*8kB 0*16kB 1*32kB 0*64kB 1*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 428kB
678222 total pagecache pages
28 pages in swap cache
Swap cache stats: add 9762, delete 9734, find 2155/3264
Free swap = 30713264kB
Total swap = 30716152kB
720352 pages RAM
490976 pages HighMem
6570 pages reserved
1911 pages shared
692514 pages non-shared
Out of memory: kill process 1955 (sshd) score 81 or a child
Killed process 3310 (sshd)
cronscript.sh invoked oom-killer: gfp_mask=0x1200d2, order=0, oomkilladj=0
Pid: 3322, comm: cronscript.sh Not tainted 2.6.27.54 #31
[<c014ecd2>] oom_kill_process+0xe6/0x10c
[<c014efd3>] out_of_memory+0xaf/0x100
[<c0150844>] __alloc_pages_internal+0x31c/0x3b0
[<c015a53f>] do_wp_page+0x9f/0x49c
[<c0132948>] ? __wake_up_bit+0xc/0x40
[<c015b757>] handle_mm_fault+0x183/0x1e0
[<c0113e07>] do_page_fault+0x11f/0x43c
[<c0113ce8>] ? do_page_fault+0x0/0x43c
[<c026f572>] error_code+0x72/0x78
=======================
Mem-Info:
DMA per-cpu:
CPU 0: hi: 0, btch: 1 usd: 0
CPU 1: hi: 0, btch: 1 usd: 0
CPU 2: hi: 0, btch: 1 usd: 0
CPU 3: hi: 0, btch: 1 usd: 0
Normal per-cpu:
CPU 0: hi: 186, btch: 31 usd: 143
CPU 1: hi: 186, btch: 31 usd: 161
CPU 2: hi: 186, btch: 31 usd: 142
CPU 3: hi: 186, btch: 31 usd: 171
HighMem per-cpu:
CPU 0: hi: 186, btch: 31 usd: 80
CPU 1: hi: 186, btch: 31 usd: 157
CPU 2: hi: 186, btch: 31 usd: 208
CPU 3: hi: 186, btch: 31 usd: 137
Active:358354 inactive:319939 dirty:0 writeback:0 unstable:0
free:19071 slab:7075 mapped:689 pagetables:111 bounce:0
DMA free:11164kB min:64kB low:80kB high:96kB active:1472kB inactive:1240kB present:15868kB pages_scanned:10539 all_unreclaimable? yes
lowmem_reserve[]: 0 873 2776 2776
Normal free:64692kB min:3744kB low:4680kB high:5616kB active:383072kB inactive:382340kB present:894080kB pages_scanned:1310990 all_unreclaimable? yes
lowmem_reserve[]: 0 0 15223 15223
HighMem free:428kB min:512kB low:2552kB high:4592kB active:1048872kB inactive:896176kB present:1948560kB pages_scanned:31666018 all_unreclaimable? yes
lowmem_reserve[]: 0 0 0 0
DMA: 1*4kB 7*8kB 40*16kB 75*32kB 36*64kB 9*128kB 4*256kB 3*512kB 2*1024kB 0*2048kB 0*4096kB = 11164kB
Normal: 15343*4kB 21*8kB 9*16kB 2*32kB 6*64kB 0*128kB 0*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 64692kB
HighMem: 1*4kB 1*8kB 0*16kB 1*32kB 0*64kB 1*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 428kB
678265 total pagecache pages
61 pages in swap cache
Swap cache stats: add 11379, delete 11318, find 2543/3850
Free swap = 30712744kB
Total swap = 30716152kB
720352 pages RAM
490976 pages HighMem
6570 pages reserved
2492 pages shared
692547 pages non-shared
Out of memory: kill process 3318 (cronscript.sh) score 107 or a child
Killed process 3319 (cronscript.sh)
bash invoked oom-killer: gfp_mask=0x1200d2, order=0, oomkilladj=0
Pid: 3323, comm: bash Not tainted 2.6.27.54 #31
[<c014ecd2>] oom_kill_process+0xe6/0x10c
[<c014efd3>] out_of_memory+0xaf/0x100
[<c0150844>] __alloc_pages_internal+0x31c/0x3b0
[<c015a53f>] do_wp_page+0x9f/0x49c
[<c015b757>] handle_mm_fault+0x183/0x1e0
[<c0113e07>] do_page_fault+0x11f/0x43c
[<c0113ce8>] ? do_page_fault+0x0/0x43c
[<c026f572>] error_code+0x72/0x78
=======================
Mem-Info:
DMA per-cpu:
CPU 0: hi: 0, btch: 1 usd: 0
CPU 1: hi: 0, btch: 1 usd: 0
CPU 2: hi: 0, btch: 1 usd: 0
CPU 3: hi: 0, btch: 1 usd: 0
Normal per-cpu:
CPU 0: hi: 186, btch: 31 usd: 178
CPU 1: hi: 186, btch: 31 usd: 180
CPU 2: hi: 186, btch: 31 usd: 171
CPU 3: hi: 186, btch: 31 usd: 179
HighMem per-cpu:
CPU 0: hi: 186, btch: 31 usd: 80
CPU 1: hi: 186, btch: 31 usd: 157
CPU 2: hi: 186, btch: 31 usd: 208
CPU 3: hi: 186, btch: 31 usd: 137
Active:358137 inactive:320124 dirty:0 writeback:0 unstable:0
free:19044 slab:7075 mapped:659 pagetables:100 bounce:0
DMA free:11164kB min:64kB low:80kB high:96kB active:1464kB inactive:1240kB present:15868kB pages_scanned:10731 all_unreclaimable? yes
lowmem_reserve[]: 0 873 2776 2776
Normal free:64584kB min:3744kB low:4680kB high:5616kB active:382404kB inactive:382720kB present:894080kB pages_scanned:1952385 all_unreclaimable? no
lowmem_reserve[]: 0 0 15223 15223
HighMem free:428kB min:512kB low:2552kB high:4592kB active:1048680kB inactive:896424kB present:1948560kB pages_scanned:31674398 all_unreclaimable? yes
lowmem_reserve[]: 0 0 0 0
DMA: 1*4kB 7*8kB 40*16kB 75*32kB 36*64kB 9*128kB 4*256kB 3*512kB 2*1024kB 0*2048kB 0*4096kB = 11164kB
Normal: 15332*4kB 13*8kB 9*16kB 2*32kB 6*64kB 0*128kB 0*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 64584kB
HighMem: 1*4kB 1*8kB 0*16kB 1*32kB 0*64kB 1*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 428kB
678229 total pagecache pages
14 pages in swap cache
Swap cache stats: add 11572, delete 11558, find 2617/3965
Free swap = 30712912kB
Total swap = 30716152kB
720352 pages RAM
490976 pages HighMem
6570 pages reserved
2337 pages shared
692510 pages non-shared
Out of memory: kill process 1955 (sshd) score 81 or a child
Killed process 3313 (sshd)
sshd invoked oom-killer: gfp_mask=0x1200d2, order=0, oomkilladj=0
Pid: 1955, comm: sshd Not tainted 2.6.27.54 #31
[<c014ecd2>] oom_kill_process+0xe6/0x10c
[<c014efd3>] out_of_memory+0xaf/0x100
[<c0150844>] __alloc_pages_internal+0x31c/0x3b0
[<c0162251>] read_swap_cache_async+0x81/0xb4
[<c01622d0>] swapin_readahead+0x4c/0x84
[<c015afc9>] do_swap_page+0x16d/0x254
[<c015b73c>] handle_mm_fault+0x168/0x1e0
[<c0113e07>] do_page_fault+0x11f/0x43c
[<c0113ce8>] ? do_page_fault+0x0/0x43c
[<c026f572>] error_code+0x72/0x78
[<c01cb286>] ? __copy_to_user_ll+0x46/0x178
[<c0102a9f>] setup_frame+0x10b/0x324
[<c0129e7d>] ? dequeue_signal+0x29/0x114
[<c012b4a6>] ? ptrace_signal+0xa/0xbc
[<c0103266>] handle_signal+0x116/0x15c
[<c0103322>] do_signal+0x76/0x128
[<c015af66>] ? do_swap_page+0x10a/0x254
[<c017d4f6>] ? sys_select+0x9e/0x15c
[<c01033f5>] do_notify_resume+0x21/0x24
[<c01035b6>] work_notifysig+0x13/0x19
=======================
Mem-Info:
DMA per-cpu:
CPU 0: hi: 0, btch: 1 usd: 0
CPU 1: hi: 0, btch: 1 usd: 0
CPU 2: hi: 0, btch: 1 usd: 0
CPU 3: hi: 0, btch: 1 usd: 0
Normal per-cpu:
CPU 0: hi: 186, btch: 31 usd: 183
CPU 1: hi: 186, btch: 31 usd: 180
CPU 2: hi: 186, btch: 31 usd: 171
CPU 3: hi: 186, btch: 31 usd: 179
HighMem per-cpu:
CPU 0: hi: 186, btch: 31 usd: 80
CPU 1: hi: 186, btch: 31 usd: 157
CPU 2: hi: 186, btch: 31 usd: 208
CPU 3: hi: 186, btch: 31 usd: 137
Active:358256 inactive:320033 dirty:0 writeback:0 unstable:0
free:19044 slab:7075 mapped:613 pagetables:100 bounce:0
DMA free:11164kB min:64kB low:80kB high:96kB active:1464kB inactive:1240kB present:15868kB pages_scanned:10731 all_unreclaimable? yes
lowmem_reserve[]: 0 873 2776 2776
Normal free:64584kB min:3744kB low:4680kB high:5616kB active:382836kB inactive:382456kB present:894080kB pages_scanned:1975428 all_unreclaimable? yes
lowmem_reserve[]: 0 0 15223 15223
HighMem free:428kB min:512kB low:2552kB high:4592kB active:1048724kB inactive:896436kB present:1948560kB pages_scanned:31675298 all_unreclaimable? yes
lowmem_reserve[]: 0 0 0 0
DMA: 1*4kB 7*8kB 40*16kB 75*32kB 36*64kB 9*128kB 4*256kB 3*512kB 2*1024kB 0*2048kB 0*4096kB = 11164kB
Normal: 15332*4kB 13*8kB 9*16kB 2*32kB 6*64kB 0*128kB 0*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 64584kB
HighMem: 1*4kB 1*8kB 0*16kB 1*32kB 0*64kB 1*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 428kB
678229 total pagecache pages
14 pages in swap cache
Swap cache stats: add 11572, delete 11558, find 2617/3967
Free swap = 30713236kB
Total swap = 30716152kB
720352 pages RAM
490976 pages HighMem
6570 pages reserved
1948 pages shared
692583 pages non-shared
Out of memory: kill process 3273 (sshconnect.sh) score 64 or a child
Killed process 3280 (ssh)
ssh invoked oom-killer: gfp_mask=0x1280d2, order=0, oomkilladj=0
Pid: 3327, comm: ssh Not tainted 2.6.27.54 #31
[<c014ecd2>] oom_kill_process+0xe6/0x10c
[<c014efd3>] out_of_memory+0xaf/0x100
[<c0150844>] __alloc_pages_internal+0x31c/0x3b0
[<c015b0ff>] do_anonymous_page+0x4f/0x128
[<c015b773>] handle_mm_fault+0x19f/0x1e0
[<c0113e07>] do_page_fault+0x11f/0x43c
[<c0113ce8>] ? do_page_fault+0x0/0x43c
[<c026f572>] error_code+0x72/0x78
[<c01cb286>] ? __copy_to_user_ll+0x46/0x178
[<c01780af>] ? __follow_mount+0xb/0x70
[<c014c1cf>] file_read_actor+0x47/0x148
[<c0153a3f>] ? activate_page+0x97/0xac
[<c014bf2d>] do_generic_file_read+0x1a5/0x400
[<c014c3fe>] generic_file_aio_read+0x9e/0x1b0
[<c014c188>] ? file_read_actor+0x0/0x148
[<c0170e38>] do_sync_read+0xc8/0x118
[<c015d6b2>] ? mmap_region+0x30e/0x424
[<c01328bc>] ? autoremove_wake_function+0x0/0x38
[<c015da16>] ? arch_get_unmapped_area_topdown+0x136/0x158
[<c0170ca2>] ? rw_verify_area+0xe/0xa0
[<c0170f10>] vfs_read+0x88/0x124
[<c0170d70>] ? do_sync_read+0x0/0x118
[<c01720ac>] ? fget_light+0xc/0xa4
[<c0171228>] sys_read+0x40/0x68
[<c0103526>] syscall_call+0x7/0xb
=======================
Mem-Info:
DMA per-cpu:
CPU 0: hi: 0, btch: 1 usd: 0
CPU 1: hi: 0, btch: 1 usd: 0
CPU 2: hi: 0, btch: 1 usd: 0
CPU 3: hi: 0, btch: 1 usd: 0
Normal per-cpu:
CPU 0: hi: 186, btch: 31 usd: 172
CPU 1: hi: 186, btch: 31 usd: 153
CPU 2: hi: 186, btch: 31 usd: 162
CPU 3: hi: 186, btch: 31 usd: 178
HighMem per-cpu:
CPU 0: hi: 186, btch: 31 usd: 80
CPU 1: hi: 186, btch: 31 usd: 157
CPU 2: hi: 186, btch: 31 usd: 208
CPU 3: hi: 186, btch: 31 usd: 137
Active:358103 inactive:320166 dirty:0 writeback:0 unstable:0
free:19054 slab:7073 mapped:537 pagetables:77 bounce:0
DMA free:11164kB min:64kB low:80kB high:96kB active:1472kB inactive:1240kB present:15868kB pages_scanned:11371 all_unreclaimable? yes
lowmem_reserve[]: 0 873 2776 2776
Normal free:64624kB min:3744kB low:4680kB high:5616kB active:382440kB inactive:383044kB present:894080kB pages_scanned:903678 all_unreclaimable? no
lowmem_reserve[]: 0 0 15223 15223
HighMem free:428kB min:512kB low:2552kB high:4592kB active:1048500kB inactive:896492kB present:1948560kB pages_scanned:31715649 all_unreclaimable? yes
lowmem_reserve[]: 0 0 0 0
DMA: 1*4kB 7*8kB 40*16kB 75*32kB 36*64kB 9*128kB 4*256kB 3*512kB 2*1024kB 0*2048kB 0*4096kB = 11164kB
Normal: 15316*4kB 22*8kB 11*16kB 2*32kB 6*64kB 0*128kB 0*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 64624kB
HighMem: 1*4kB 1*8kB 0*16kB 1*32kB 0*64kB 1*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 428kB
678265 total pagecache pages
61 pages in swap cache
Swap cache stats: add 12299, delete 12238, find 2815/4300
Free swap = 30713708kB
Total swap = 30716152kB
720352 pages RAM
490976 pages HighMem
6570 pages reserved
1505 pages shared
692612 pages non-shared
Out of memory: kill process 3325 (sshconnect.sh) score 64 or a child
Killed process 3327 (ssh)
sshconnect.sh invoked oom-killer: gfp_mask=0x1200d2, order=0, oomkilladj=0
Pid: 3325, comm: sshconnect.sh Not tainted 2.6.27.54 #31
[<c014ecd2>] oom_kill_process+0xe6/0x10c
[<c014efd3>] out_of_memory+0xaf/0x100
[<c0150844>] __alloc_pages_internal+0x31c/0x3b0
[<c0162251>] read_swap_cache_async+0x81/0xb4
[<c01622d0>] swapin_readahead+0x4c/0x84
[<c015afc9>] do_swap_page+0x16d/0x254
[<c015b73c>] handle_mm_fault+0x168/0x1e0
[<c0113e07>] do_page_fault+0x11f/0x43c
[<c0113ce8>] ? do_page_fault+0x0/0x43c
[<c026f572>] error_code+0x72/0x78
=======================
Mem-Info:
DMA per-cpu:
CPU 0: hi: 0, btch: 1 usd: 0
CPU 1: hi: 0, btch: 1 usd: 0
CPU 2: hi: 0, btch: 1 usd: 0
CPU 3: hi: 0, btch: 1 usd: 0
Normal per-cpu:
CPU 0: hi: 186, btch: 31 usd: 170
CPU 1: hi: 186, btch: 31 usd: 160
CPU 2: hi: 186, btch: 31 usd: 162
CPU 3: hi: 186, btch: 31 usd: 178
HighMem per-cpu:
CPU 0: hi: 186, btch: 31 usd: 80
CPU 1: hi: 186, btch: 31 usd: 157
CPU 2: hi: 186, btch: 31 usd: 208
CPU 3: hi: 186, btch: 31 usd: 137
Active:358117 inactive:320156 dirty:0 writeback:0 unstable:0
free:19108 slab:7072 mapped:336 pagetables:69 bounce:0
DMA free:11164kB min:64kB low:80kB high:96kB active:1472kB inactive:1240kB present:15868kB pages_scanned:11371 all_unreclaimable? yes
lowmem_reserve[]: 0 873 2776 2776
Normal free:64840kB min:3744kB low:4680kB high:5616kB active:382444kB inactive:382888kB present:894080kB pages_scanned:191395 all_unreclaimable? no
lowmem_reserve[]: 0 0 15223 15223
HighMem free:428kB min:512kB low:2552kB high:4592kB active:1048552kB inactive:896496kB present:1948560kB pages_scanned:31719106 all_unreclaimable? yes
lowmem_reserve[]: 0 0 0 0
DMA: 1*4kB 7*8kB 40*16kB 75*32kB 36*64kB 9*128kB 4*256kB 3*512kB 2*1024kB 0*2048kB 0*4096kB = 11164kB
Normal: 15370*4kB 27*8kB 12*16kB 2*32kB 6*64kB 0*128kB 0*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 64896kB
HighMem: 1*4kB 1*8kB 0*16kB 1*32kB 0*64kB 1*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 428kB
678251 total pagecache pages
38 pages in swap cache
Swap cache stats: add 12434, delete 12396, find 2851/4356
Free swap = 30714276kB
Total swap = 30716152kB
720352 pages RAM
490976 pages HighMem
6570 pages reserved
849 pages shared
692792 pages non-shared
Out of memory: kill process 3317 (cronscript.sh) score 56 or a child
Killed process 3325 (sshconnect.sh)
-bash-3.1# exit
logout
============
Solution use "Allocate 3rd-level pagetables from highmem enabled in kernel"
===============
Note that LowFree is almost 845MB compared to about 74MB without this option enabled.
I believe I am correct about this kernel option, it should be enabled by default or strongly advised not to be disabled.
MemTotal: 2855128 kB
MemFree: 2402716 kB
Buffers: 496 kB
Cached: 129748 kB
SwapCached: 0 kB
Active: 295048 kB
Inactive: 108476 kB
HighTotal: 1963904 kB
HighFree: 1557316 kB
LowTotal: 891224 kB
LowFree: 845400 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 273288 kB
Mapped: 3380 kB
Slab: 26836 kB
SReclaimable: 21348 kB
SUnreclaim: 5488 kB
PageTables: 692 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 1427564 kB
Committed_AS: 284300 kB
VmallocTotal: 114680 kB
VmallocUsed: 1592 kB
VmallocChunk: 112784 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 4096 kB
DirectMap4k: 4096 kB
DirectMap4M: 913408 kB
It's not all about the numbers either, this kernel option stopped my kernel from triggering the OOM killer.
How To Test If Your Hard Drive Is Good/Signs of dying hard drive
I like dd, although it only reads it, usually a read test of the entire disk will uncover if your hard drive is bad in some parts. This is a good thing to do at least once a month, a lot of times bizarre program behavior, laginess and crashing/unnmounting problems etc.. are due to a failing disc and SMART won't know it or indicate a problem:
We must also remember there's never a guarantee, I've found that ever since we moved to larger and more platters per drive with 1TB drives and up, that hard drives in general have become more prone to errors, problems and failures that I've never seen with smaller drives after years of use. It's scary how cheap and poor quality most hard drives are today, they're still the most unreliable component and are actually getting less reliable.
My way to test a drive:
It takes a long time but this should uncover a dying drive that may not be noticeable since dd reads every sector on the whole drive.
dd if=/dev/sdb of=/dev/null
3907029168+0 records in
3907029168+0 records out
2000398934016 bytes (2.0 TB) copied, 28390.9 seconds, 70.5 MB/s
Here is my Hitachi 2TB drive (new) tested and I checked dmesg and smartctl without any errors:
3907029168+0 records in
3907029168+0 records out
2000398934016 bytes (2.0 TB) copied, 21359.7 seconds, 93.7 MB/s
smartctl -a /dev/sdb
smartctl version 5.38 [i686-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF INFORMATION SECTION ===
Device Model: Hitachi HDS5C3020ALA632
Serial Number: ML4220F318DZ2K
Firmware Version: ML6OA580
User Capacity: 2,000,398,934,016 bytes
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 8
ATA Standard is: ATA-8-ACS revision 4
Local Time is: Wed Jun 8 19:14:06 2011 PDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x80) Offline data collection activity
was never started.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (23306) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 255) minutes.
SCT capabilities: (0x003d) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000b 100 100 016 Pre-fail Always - 0
2 Throughput_Performance 0x0005 100 100 054 Pre-fail Offline - 0
3 Spin_Up_Time 0x0007 100 100 024 Pre-fail Always - 0
4 Start_Stop_Count 0x0012 100 100 000 Old_age Always - 3
5 Reallocated_Sector_Ct 0x0033 100 100 005 Pre-fail Always - 0
7 Seek_Error_Rate 0x000b 100 100 067 Pre-fail Always - 0
8 Seek_Time_Performance 0x0005 100 100 020 Pre-fail Offline - 0
9 Power_On_Hours 0x0012 100 100 000 Old_age Always - 6
10 Spin_Retry_Count 0x0013 100 100 060 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 3
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 3
193 Load_Cycle_Count 0x0012 100 100 000 Old_age Always - 3
194 Temperature_Celsius 0x0002 176 176 000 Old_age Always - 34 (Lifetime Min/Max 25/35)
196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 0
197 Current_Pending_Sector 0x0022 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0008 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x000a 200 200 000 Old_age Always - 0
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
If there's a problem/Signs of a dying hard drive
You'll get errors like this (your drive is about to die and will be taken offline):
Jun 5 11:56:10 box11 kernel: end_request: I/O error, dev sdb, sector 0
Jun 5 11:56:10 box11 kernel: Buffer I/O error on device sdb, logical block 0
Jun 5 11:56:10 box11 kernel: Buffer I/O error on device sdb, logical block 1
Jun 5 11:56:10 box11 kernel: Buffer I/O error on device sdb, logical block 2
Jun 5 11:56:10 box11 kernel: Buffer I/O error on device sdb, logical block 3
Jun 5 11:56:10 box11 kernel: end_request: I/O error, dev sdb, sector 0
May 31 22:02:50 box11 kernel: sd 3:0:0:0: SCSI error: return code = 0x00040000
May 31 22:02:50 box11 kernel: end_request: I/O error, dev sdb, sector 0
May 31 22:02:50 box11 kernel: Buffer I/O error on device sdb, logical block 0
May 31 22:02:50 box11 kernel: sd 3:0:0:0: SCSI error: return code = 0x00040000
May 31 22:02:50 box11 kernel: end_request: I/O error, dev sdb, sector 3907029160
Here's an example of how mdadm reacts to the failed disc (I was experiencing bizarre database issues, crashes, freezes etc.. too)
May 31 12:45:54 box11 kernel: ata4.00: exception Emask 0x40 SAct 0x0 SErr 0x800 action 0x6 frozen
May 31 12:45:54 box11 kernel: ata4: SError: { HostInt }
May 31 12:45:54 box11 kernel: ata4.00: cmd ea/00:00:00:00:00/00:00:00:00:00/a0 tag 0
May 31 12:45:54 box11 kernel: res 40/00:04:b8:21:7e/cd:00:0a:00:00/40 Emask 0x44 (timeout)
May 31 12:45:54 box11 kernel: ata4.00: status: { DRDY }
May 31 12:45:54 box11 kernel: ata4: hard resetting link
May 31 12:46:00 box11 kernel: ata4: link is slow to respond, please be patient (ready=0)
May 31 12:46:04 box11 kernel: ata4: softreset failed (device not ready)
May 31 12:46:04 box11 kernel: ata4: hard resetting link
May 31 12:46:10 box11 kernel: ata4: link is slow to respond, please be patient (ready=0)
May 31 12:46:14 box11 kernel: ata4: softreset failed (device not ready)
May 31 12:46:14 box11 kernel: ata4: hard resetting link
May 31 12:46:20 box11 kernel: ata4: link is slow to respond, please be patient (ready=0)
May 31 12:46:54 box11 kernel: ata4: softreset failed (device not ready)
May 31 12:46:54 box11 kernel: ata4: limiting SATA link speed to 1.5 Gbps
May 31 12:46:54 box11 kernel: ata4: hard resetting link
May 31 12:47:01 box11 kernel: ata4: softreset failed (device not ready)
May 31 12:47:03 box11 kernel: ata4: reset failed, giving up
May 31 12:47:03 box11 kernel: ata4.00: disabled
May 31 12:47:03 box11 kernel: sd 3:0:0:0: timing out command, waited 30s
May 31 12:47:03 box11 kernel: ata4: EH complete
May 31 12:47:03 box11 kernel: sd 3:0:0:0: SCSI error: return code = 0x00040000
May 31 12:47:03 box11 kernel: end_request: I/O error, dev sdb, sector 117210047
May 31 12:47:03 box11 kernel: raid1: Disk failure on sdb1, disabling device.
May 31 12:47:03 box11 kernel: Operation continuing on 1 devices
May 31 12:47:03 box11 kernel: sd 3:0:0:0: SCSI error: return code = 0x00040000
May 31 12:47:04 box11 kernel: end_request: I/O error, dev sdb, sector 1152390464
May 31 12:47:04 box11 kernel: raid1: Disk failure on sdb3, disabling device.
May 31 12:47:04 box11 kernel: Operation continuing on 1 devices
May 31 12:47:04 box11 kernel: sd 3:0:0:0: SCSI error: return code = 0x00040000
May 31 12:47:04 box11 kernel: end_request: I/O error, dev sdb, sector 749321600
May 31 12:47:04 box11 kernel: raid1: sdb3: rescheduling sector 573506240
May 31 12:47:04 box11 kernel: sd 3:0:0:0: SCSI error: return code = 0x00040000
May 31 12:47:04 box11 kernel: end_request: I/O error, dev sdb, sector 750128368
May 31 12:47:04 box11 kernel: raid1: sdb3: rescheduling sector 574313008
The first sign of my dying drive were there's errors infrequently while doing heavy reads:
May 15 04:46:59 box11 kernel: ata2.00: exception Emask 0x0 SAct 0x7fffffff SErr 0x0 action 0x0
May 15 04:46:59 box11 kernel: ata2.00: irq_stat 0x40000008
May 15 04:46:59 box11 kernel: ata2.00: cmd 60/80:a0:c0:ad:76/00:00:16:00:00/40 tag 20 ncq 65536 in
May 15 04:46:59 box11 kernel: res 41/40:00:28:ae:76/cd:00:16:00:00/40 Emask 0x409 (media error) <F>
May 15 04:46:59 box11 kernel: ata2.00: status: { DRDY ERR }
May 15 04:46:59 box11 kernel: ata2.00: error: { UNC }
May 15 04:46:59 box11 kernel: ata2.00: configured for UDMA/133
May 15 04:46:59 box11 kernel: ata2: EH complete
May 15 04:46:59 box11 kernel: SCSI device sda: 3907029168 512-byte hdwr sectors (2000399 MB)
May 15 04:46:59 box11 kernel: sda: Write Protect is off
May 15 04:46:59 box11 kernel: SCSI device sda: drive cache: write back
May 15 04:47:01 box11 kernel: ata2.00: exception Emask 0x0 SAct 0x7fcfffdf SErr 0x0 action 0x0
May 15 04:47:13 box11 kernel: ata2.00: irq_stat 0x40000008
May 15 04:47:13 box11 kernel: ata2.00: cmd 60/80:50:c0:ad:76/00:00:16:00:00/40 tag 10 ncq 65536 in
May 15 04:47:13 box11 kernel: res 41/40:00:28:ae:76/cd:00:16:00:00/40 Emask 0x409 (media error) <F>
May 15 04:47:13 box11 kernel: ata2.00: status: { DRDY ERR }
May 15 04:47:13 box11 kernel: ata2.00: error: { UNC }
May 15 04:47:13 box11 kernel: ata2.00: configured for UDMA/133
What if the problem occurs only when writing data?
With Linux or whatever OS you, you'll find that you begin to have random crashes, and if you look at your console in Linux it might offer clues but this can be hard to track down. I'm about 99% positive one of my WD EARS drives has been causing a crash on my computers for months and have realized it can be identified by a high "Multi-Zone Error Rate" and also if the Load Cycle is high (mine is over 1 million) thenyou can expect the drive is on the way out.
The problem is that you can't do a full badblocks or dd write test on an existing partition without destroying data. There's no good way of testing write issues except by taking the drive off-line and/or willfully destroying your data.
=== START OF INFORMATION SECTION ===
Device Model: WDC WD20EARS-00MVWB0
Serial Number: WD-WMAZ20148885
Firmware Version: 50.0AB50
User Capacity: 2,000,398,934,016 bytes
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 8
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Sat Sep 17 08:57:20 2011 PDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x84) Offline data collection activity
was suspended by an interrupting command from host.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (36600) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 255) minutes.
Conveyance self-test routine
recommended polling time: ( 5) minutes.
SCT capabilities: (0x3035) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0
3 Spin_Up_Time 0x0027 179 174 021 Pre-fail Always - 6041
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 19
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0
9 Power_On_Hours 0x0032 088 088 000 Old_age Always - 9360
10 Spin_Retry_Count 0x0032 100 253 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 253 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 18
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 13
193 Load_Cycle_Count 0x0032 001 001 000 Old_age Always - 1080578 194 Temperature_Celsius 0x0022 120 109 000 Old_age Always - 30
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 200 200 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x0008 200 200 000 Old_age Offline - 10
I'd also say that if you begin to see a Multi_Zone_Error_Rate high than 0 then consider these serious write errors that will get worse and ultimately start crashing your system and affecting stability (this is what I found as any of my drives that are WD EARS 2TB started to have issues as that number crept up). In the above example it started at just 1,2 and then got higher and the crashes got progressively worse.
Some of the errors/crashes showed the following which I believe are due to this dying EARS drive (I'll know in a few weeks since I'm replacing this drive today):
[<c0466769>] free_hot_cold_page+0xfc/0x150
[<c04667d1>] __pagevec_free+0x14/0x1a
[<c0468c6b>] release_pages+0x127/0x12f
[<c04692d1>] __pagevec_release+0x15/0x1d
[<c04697db>] __invalid_mapping_pages+0x120/0x156
[<c0469818>] invalidate_mapping_pages+0x7/0x9
[<c049c22e>] shrink_icache_memory+0xf5/0x295
[<c046aeab>] shrink_slab+0xfb/0x16e
[<c046b271>] kswapd+0x2d7/0x3fb
[<c0436e1f>] autoremove_wake_function+0x0/0x2d
[<c046af9a>] kswapd+0x0/0x3fb
[<c0436d5d>] kthread+0xc0/0xeb
[<c0436c9d>] kthread+0x0/0xeb
[<c062d243>] kernel_thread_helper+0x7/0x10
Code: 43 1c 31 c0 eb 0d 31 d2 89 f1 55 89 f8 e8 74 f0 ff ff 5a 5b 5e 5f 5d c3 55
89 d5 57 89 c7 56 53 8b 70 20 85 f6 0f 84 e9 00 00 00 <8b> 06 3d 75 62 75 62 0f
84 86 00 00 00 50 56 57 68 28 0e 63 c0
EIP: [<c043b5b4>] ub_page_uncharge+0x13/0x101 SS:ESP 0068:f7861df0
Kernel panic - not syncing: Fatal exception
---------
[<c0466769>] free_hot_cold_page+0xfc/0x150
[<c04667d1>] __pagvec_free+0x14/0x1a
[<c0468c37>] release_pages+0xf3/0x12f
[<c0469Zd1>] __pagevec_release+0x15/0x1d
[<c0469b1Z>] truncate_inode_pages_range+0xcc/0x260
[<f916c8d3>] journal_stop+0x208/0x213 [jbd]
[<c0469caf>] truncate_inode_pages+0x9/0xe
[<f91a8a57>] ext3_delete_inode+0x13/0xba [ext3]
[<f91a8a44>] ext3_delete_inode+0x0/0xba [ext3]
[<c049b9ea>] generic_deIete_inode+0x91/0xfe
[<c049b4c1>] input+x67/0x69
[<c0498df5>] d_kill+0x19/0x32
[<c0499f36>] dput+19f/0x1ac
[<c049Z717>] sys_renameat+0x15f/0x1af
[<c047Z410>] remove_vma+0x47/0x4c
[<c047Ze3a>] do_munmap+0x19e/0x1ba
[<c049Z778>] sys_rename+0x11/0x15
[<c06Zc4eb>] syscall_call+0x7/0xb
Code: 43 1c 31 c0 eb 0d 31 dZ 89 f1 55 89 f8 e8 74 f0 ff ff 5a 5b 5e 5f 5d c3 5'
89 d5 57 89 c7 56 53 8b 70 Z0 85 f6 0f 84 e9 00 00 00 <8b> 06 3d 75 6Z 75 6Z 0
84 86 00 00 00 50 56 57 68 Z8 0e 63 c0
EIP: [<c043b5b4>] ub_page_uncharge+0x13/0x101 SS:ESP 0068:f7acbd9c
Kernel panic - not syncing: Fatal exception
smart is not smart, it thinks a dead drive is still good
I had a dying drive that smart thought until it totally disappeared was a good drive, and actually all parameters did look fine but this system was causing my system to lockup and other bad behavior:
=== START OF INFORMATION SECTION ===
Device Model: WDC WD20EARS-00MVWB0
Serial Number: WD-WMAZ20139
Firmware Version: 50.0AB50
User Capacity: 2,000,398,934,016 bytes
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 8
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Fri Jun 3 09:53:36 2011 PDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x84) Offline data collection activity
was suspended by an interrupting command from host.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (35400) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 255) minutes.
Conveyance self-test routine
recommended polling time: ( 5) minutes.
SCT capabilities: (0x3035) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0
3 Spin_Up_Time 0x0027 191 170 021 Pre-fail Always - 5416
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 12
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0
9 Power_On_Hours 0x0032 091 091 000 Old_age Always - 6833
10 Spin_Retry_Count 0x0032 100 253 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 253 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 11
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 6
193 Load_Cycle_Count 0x0032 042 042 000 Old_age Always - 475936
194 Temperature_Celsius 0x0022 117 099 000 Old_age Always - 33
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 1
198 Offline_Uncorrectable 0x0030 200 200 000 Old_age Offline - 1
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x0008 200 200 000 Old_age Offline - 2
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
At the end smart did catch it, but just before it died:
un 1 17:47:52 box10 smartd[8529]: Device: /dev/sda, opened
Jun 1 17:47:52 box10 smartd[8529]: Device /dev/sda: using '-d sat' for ATA disk behind SAT layer.
Jun 1 17:47:52 box10 smartd[8529]: Device: /dev/sda, opened
Jun 1 17:47:52 box10 smartd[8529]: Device: /dev/sda, not found in smartd database.
Jun 1 17:47:52 box10 smartd[8529]: Device: /dev/sda, is SMART capable. Adding to "monitor" list.
Jun 1 17:47:53 box10 smartd[8529]: Device: /dev/sda, 1 Currently unreadable (pending) sectors
Jun 1 17:47:53 box10 smartd[8529]: Device: /dev/sda, 1 Offline uncorrectable sectors
Jun 1 18:17:54 box10 smartd[8546]: Device: /dev/sda, 1 Currently unreadable (pending) sectors
Jun 1 18:17:54 box10 smartd[8546]: Device: /dev/sda, 1 Offline uncorrectable sectors
Jun 1 18:47:53 box10 smartd[8546]: Device: /dev/sda, 1 Currently unreadable (pending) sectors
Jun 1 18:47:53 box10 smartd[8546]: Device: /dev/sda, 1 Offline uncorrectable sectors
Jun 1 19:17:54 box10 smartd[8546]: Device: /dev/sda, 1 Currently unreadable (pending) sectors
Jun 1 19:17:54 box10 smartd[8546]: Device: /dev/sda, 1 Offline uncorrectable sectors
Jun 1 19:47:54 box10 smartd[8546]: Device: /dev/sda, 1 Currently unreadable (pending) sectors
Jun 1 19:47:54 box10 smartd[8546]: Device: /dev/sda, 1 Offline uncorrectable sectors
Jun 1 20:17:54 box10 smartd[8546]: Device: /dev/sda, 1 Currently unreadable (pending) sectors
Jun 1 20:17:54 box10 smartd[8546]: Device: /dev/sda, 1 Offline uncorrectable sectors
Jun 1 20:47:54 box10 smartd[8546]: Device: /dev/sda, 1 Currently unreadable (pending) sectors
Jun 1 20:47:54 box10 smartd[8546]: Device: /dev/sda, 1 Offline uncorrectable sectors
Jun 1 21:17:54 box10 smartd[8546]: Device: /dev/sda, 1 Currently unreadable (pending) sectors
Jun 1 21:17:54 box10 smartd[8546]: Device: /dev/sda, 1 Offline uncorrectable sectors
Jun 1 21:47:54 box10 smartd[8546]: Device: /dev/sda, 1 Currently unreadable (pending) sectors
Jun 1 21:47:54 box10 smartd[8546]: Device: /dev/sda, 1 Offline uncorrectable sectors
Jun 1 22:17:54 box10 smartd[8546]: Device: /dev/sda, 1 Currently unreadable (pending) sectors
Jun 1 22:17:54 box10 smartd[8546]: Device: /dev/sda, 1 Offline uncorrectable sectors
Jun 1 22:47:53 box10 smartd[8546]: Device: /dev/sda, 1 Currently unreadable (pending) sectors
Jun 1 22:47:53 box10 smartd[8546]: Device: /dev/sda, 1 Offline uncorrectable sectors
Jun 1 23:17:54 box10 smartd[8546]: Device: /dev/sda, 1 Currently unreadable (pending) sectors
Jun 1 23:17:54 box10 smartd[8546]: Device: /dev/sda, 1 Offline uncorrectable sectors
Jun 1 23:47:53 box10 smartd[8546]: Device: /dev/sda, 1 Currently unreadable (pending) sectors
Openvz CPT ERR: cc4c0800,28000 :Unknown image version: 304. Can't restore.
CPT ERR: cc4c0800,28000 :Unknown image version: 304. Can't restore.
This happens when you live migrate between OpenVZ servers with different kernels running, at least significantly different by date.
There is no solution except to make sure you're running the same kernels on all machines, or at least not kernels that are much older or different (this is just a guess though, you should ensure all kernels are the same).
Centos Solution to "Warning: Unable to open /dev/fd0 read-write (Read-only file system). /dev/fd0 has been opened read-only."
Warning: Unable to open /dev/fd0 read-write (Read-only file system). /dev/fd0 has been opened read-only.
That's a very annoying error, it's simply because Centos for some reason thinks it's wise to load the "floppy" kernel module, who has a floppy drive? I haven't seen or used a floppy for over 12 years!
It's more than just annoying, if you probe the drives attached to your system, eg. with grub or partprobe, it keeps trying to locate a floppy dirve that doesn't exist and literally takes a few minutes to let you complete the task of grub or partprobe or related commands.
The solution, remove the "floppy" kernel module
rmmod floppy
That takes effect right away,now grub will load right away and partprobe will take a few seconds at most.
You'll also want to prevent it from loading again in the future at boot time:
For Centos/RHEL
echo "alias floppy off" >> /etc/modprobe.conf
For Debian based Distros
echo "blacklist floppy" >> /etc/modprobe.d/blacklist
The command above tells the kernel not to load the "floppy" module ever again by adding "blacklist floppy" to the blacklist list.
Openvz YUM Error Solution to "[Errno -1] Metadata file does not match checksum Trying other mirror."
It's weird because I have a nearly identical box and setup and I can update the ovzkernel-PAE* just fine but on this box it doesn't work.
I only get this error with the openvz.repo and not others such as Centos-Base.repo
With my other server it works normally:
================
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package ovzkernel-PAE.i686 0:2.6.18-238.12.1.el5.028stab091.1 set to be installed
---> Package ovzkernel-PAE-devel.i686 0:2.6.18-238.12.1.el5.028stab091.1 set to be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================
Installing:
ovzkernel-PAE i686 2.6.18-238.12.1.el5.028stab091.1 openvz-kernel-rhel5 21 M
ovzkernel-PAE-devel i686 2.6.18-238.12.1.el5.028stab091.1 openvz-kernel-rhel5 5.4 M
Transaction Summary
=============================================================================================================================================================
Install 2 Package(s)
Upgrade 0 Package(s)
Total download size: 26 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): ovzkernel-PAE-devel-2.6.18-238.12.1.el5.028stab091.1.i686.rpm | 5.4 MB 00:00
(2/2): ovzkernel-PAE-2.6.18-238.12.1.el5.028stab091.1.i686.rpm | 21 MB 00:02
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 9.2 MB/s | 26 MB 00:02
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : ovzkernel-PAE-devel 1/2
Installing : ovzkernel-PAE 2/2
Installed:
ovzkernel-PAE.i686 0:2.6.18-238.12.1.el5.028stab091.1 ovzkernel-PAE-devel.i686 0:2.6.18-238.12.1.el5.028stab091.1
===================================
Openvz kernel cannot update yum error:
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package ovzkernel-PAE.i686 0:2.6.18-238.5.1.el5.028stab085.5 set to be installed
---> Package ovzkernel-PAE-devel.i686 0:2.6.18-238.5.1.el5.028stab085.5 set to be installed
--> Finished Dependency Resolution
--> Running transaction check
---> Package ovzkernel-PAE-devel.i686 0:2.6.18-194.8.1.el5.028stab070.2 set to be erased
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================
Installing:
ovzkernel-PAE i686 2.6.18-238.5.1.el5.028stab085.5 openvz-kernel-rhel5 21 M
ovzkernel-PAE-devel i686 2.6.18-238.5.1.el5.028stab085.5 openvz-kernel-rhel5 5.4 M
Removing:
ovzkernel-PAE-devel i686 2.6.18-194.8.1.el5.028stab070.2 installed 16 M
Transaction Summary
=============================================================================================================================================================
Install 2 Package(s)
Upgrade 0 Package(s)
Remove 1 Package(s)
Reinstall 0 Package(s)
Downgrade 0 Package(s)
Total download size: 26 M
Is this ok [y/N]: y
Downloading Packages:
http://mirror.ubiquityservers.com/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.steadfast.net/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.trouble-free.net/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://download.openvz.org/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://openvz-mirror1.rapidvps.com/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://openvz.mirror.netriplex.com/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirrors.igsobe.com/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://lnx.apollo-hw.ro/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.duomenucentras.lt/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://openvz.copahost.com/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://openvz.proserve.nl/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.yandex.ru/mirrors/download.openvz.org/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirrors.adnettelecom.ro/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.ihc.ru/download.openvz.org/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.yourconnect.com/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirrors.xservers.ro/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirrors.ircam.fr/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://ftp.iij.ad.jp/pub/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.ellogroup.com/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.europhase.net/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.as24220.net/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://ftp.wicks.co.nz/pub/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.datacenter.by/pub/download.openvz.org/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirrors.thzhost.com/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://ftp.yz.yamagata-u.ac.jp/pub/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://openvz.tsukuba.wide.ad.jp/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.ubiquityservers.com/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.steadfast.net/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.trouble-free.net/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://download.openvz.org/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://openvz-mirror1.rapidvps.com/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://openvz.mirror.netriplex.com/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirrors.igsobe.com/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://lnx.apollo-hw.ro/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.duomenucentras.lt/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://openvz.copahost.com/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://openvz.proserve.nl/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.yandex.ru/mirrors/download.openvz.org/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirrors.adnettelecom.ro/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.ihc.ru/download.openvz.org/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.yourconnect.com/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirrors.xservers.ro/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirrors.ircam.fr/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://ftp.iij.ad.jp/pub/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.ellogroup.com/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.europhase.net/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.as24220.net/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://ftp.wicks.co.nz/pub/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.datacenter.by/pub/download.openvz.org/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirrors.thzhost.com/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://ftp.yz.yamagata-u.ac.jp/pub/openvz/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://openvz.tsukuba.wide.ad.jp/kernel/branches/rhel5-2.6.18/current/ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Error Downloading Packages:
ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686: failure: ovzkernel-PAE-2.6.18-238.5.1.el5.028stab085.5.i686.rpm from openvz-kernel-rhel5: [Errno 256] No more mirrors to try.
ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686: failure: ovzkernel-PAE-devel-2.6.18-238.5.1.el5.028stab085.5.i686.rpm from openvz-kernel-rhel5: [Errno 256] No more mirrors to try.
======
Here's the problem, yum is looking for an old version of the openvz kernel that isn't on the mirrors, it doesn't know the newest one.
The current one that my other server found was "2.6.18-238.12.1.el5.028stab091.1" but the broken one is looking for "2.6.18-238.5.1.el5.028stab085.5"
I can't update the openvz repo for some reason, I get these errors:
openvz-kernel-rhel5/filelists | 471 kB 00:00
http://mirror.ubiquityservers.com/openvz/kernel/branches/rhel5-2.6.18/current/repodata/filelists.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
openvz-kernel-rhel5/filelists | 472 kB 00:00
http://mirror.steadfast.net/openvz/kernel/branches/rhel5-2.6.18/current/repodata/filelists.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
openvz-kernel-rhel5/filelists | 472 kB 00:00
http://mirror.trouble-free.net/openvz/kernel/branches/rhel5-2.6.18/current/repodata/filelists.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
openvz-kernel-rhel5/filelists | 472 kB 00:00
http://download.openvz.org/kernel/branches/rhel5-2.6.18/current/repodata/filelists.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
openvz-kernel-rhel5/filelists | 471 kB 00:00
http://openvz-mirror1.rapidvps.com/kernel/branches/rhel5-2.6.18/current/repodata/filelists.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
openvz-kernel-rhel5/filelists | 472 kB 00:00
http://openvz.mirror.netriplex.com/kernel/branches/rhel5-2.6.18/current/repodata/filelists.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
openvz-kernel-rhel5/filelists | 471 kB 00:01
http://mirrors.igsobe.com/openvz/kernel/branches/rhel5-2.6.18/current/repodata/filelists.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
openvz-kernel-rhel5/filelists | 472 kB 00:01
http://mirror.duomenucentras.lt/openvz/kernel/branches/rhel5-2.6.18/current/repodata/filelists.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
***Solution***
Basically yum has cached some garbage info relating to the OpenVZ repository and the only way to fix it is to rebuild this "metadata" cache.
yum clean metadata
Loaded plugins: fastestmirror
37 metadata files removed
15 sqlite files removed
0 metadata files removed
I did a yum install ovzkernel-PAE* and it got a newer version downloaded succesfully but it's still out of date!
And yum/openvz still don't think it is out of date for some reason.
Even doing a yum update/upgrade didn't work but I tried hours later and it found the latest version. Maybe I hit an old mirror or the old cache of some sort for the latest openvz package was still someone on my system.
GRUB Solution to error "Error 6: Mismatched or corrupt version of stage1/stage2"
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
grub> root (hd1,0)
Filesystem type is ext2fs, partition type 0xfd
grub> setup (hd1)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd1)"... 15 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd1) (hd1)1+15 p (hd1,0)/boot/grub/stage2 /boot/grub/grub.conf"... failed
Error 6: Mismatched or corrupt version of stage1/stage2
In my case this problem happened because hd1 is a newly added drive in a mdadm RAID 1 array and was still syncing at the time. I imagine you could also run into this error with a partition/filesystem that is still being formatted.
This is the only way/scenario that I've ever received that error and the solution is to wait for the RAID array to finish syncing.
Purolator Tracking "PLEASE CALL 1 888 SHIP-123 OR 1-888-744-7123 FOR INFORMATION ON THIS SHIPMENT."
TRACKING DETAILS
PIN xxxxxxxxxxx
Status PLEASE CALL 1 888 SHIP-123 OR 1-888-744-7123 FOR INFORMATION ON THIS SHIPMENT.
I know this is not really tech related but I order a lot of hardware on-line these days and once I had a delivery by Purolator.
I didn't get anyone on the phone at Purolator after a few minutes so I gave up, but it turns out that the person on the phone or the system will tell you to check the website, so you can disregard that message.
It should really explain the following that I do:
I received my tracking number first thing in the morning but it wasn't until the evening that this message above disappeared. Basically it turns out that if you get this message the package has not entered the Purolator system, AKA the package was not picked up by Purolator.
Hitachi 2TB HDS5C3020ALA632 drive DOA
I had one of these shipped and it was not recognized when plugged in, here's what a dead drive looks like (I assume it's teh circuit board which is dead):
ata1: link is slow to respond, please be patient (ready=0)
ata1: softreset failed (device not ready)
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata1: link online but device misclassified, retrying
ata1: link is slow to respond, please be patient (ready=0)
ata1: softreset failed (device not ready)
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata1: link online but device misclassified, retrying
ata1: link is slow to respond, please be patient (ready=0)
ata1: softreset failed (device not ready)
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata1: link online but device misclassified, retrying
ata1: limiting SATA link speed to 1.5 Gbps
ata1: softreset failed (device not ready)
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
ata1: link online but device misclassified, device detection might fail
ata2: SATA link down (SStatus 0 SControl 300)
Here is a working one, they're actually great drives as long as they work:
smartctl -a /dev/sdb
smartctl version 5.38 [i686-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF INFORMATION SECTION ===
Device Model: Hitachi HDS5C3020ALA632
Serial Number: ML4220F318DZ2K
Firmware Version: ML6OA580
User Capacity: 2,000,398,934,016 bytes
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 8
ATA Standard is: ATA-8-ACS revision 4
Local Time is: Thu Jun 9 16:37:16 2011 PDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x84) Offline data collection activity
was suspended by an interrupting command from host.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (23306) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 255) minutes.
SCT capabilities: (0x003d) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000b 100 100 016 Pre-fail Always - 0
2 Throughput_Performance 0x0005 134 134 054 Pre-fail Offline - 100
3 Spin_Up_Time 0x0007 100 100 024 Pre-fail Always - 0
4 Start_Stop_Count 0x0012 100 100 000 Old_age Always - 3
5 Reallocated_Sector_Ct 0x0033 100 100 005 Pre-fail Always - 0
7 Seek_Error_Rate 0x000b 100 100 067 Pre-fail Always - 0
8 Seek_Time_Performance 0x0005 150 150 020 Pre-fail Offline - 27
9 Power_On_Hours 0x0012 100 100 000 Old_age Always - 27
10 Spin_Retry_Count 0x0013 100 100 060 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 3
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 3
193 Load_Cycle_Count 0x0012 100 100 000 Old_age Always - 3
194 Temperature_Celsius 0x0002 187 187 000 Old_age Always - 32 (Lifetime Min/Max 25/35)
196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 0
197 Current_Pending_Sector 0x0022 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0008 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x000a 200 200 000 Old_age Always - 0
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
How to recover from dead DRBD partition/hard drive in two simple commands
This assumes that you've at least created the correct partition for your DRBD already.
Notice that I am "diskless", that's because either your DRBD partition doesn't exist/has been renamed (eg. sdb becomes sda when sdb dies and you reboot) or because that drive is really actually dead/gone.
*If you need to permanently change the partition/device for your resource be sure to edit /etc/drbd.conf on both hosts and reload the config.
(replace r0 with the name of the resource you're recovering from):
drbdadm create-md r0
DRBD module version: 8.3.4
userland version: 8.3.8
preferably kernel and userland versions should match.
Writing meta data...
initializing activity log
NOT initialized bitmap
New drbd meta data block successfully created.
drbdadm attach r0
That's all there is to it, you're recovered and just need to wait for the sync to complete.
Check /proc/drbd and you'll see it is rsyncing to your newly added disk.
cat /proc/drbd
version: 8.3.4 (api:88/proto:86-91)
GIT-hash: 70a645ae080411c87b4482a135847d69dc90a6a2 build by xemul@ovzcore.sw.ru, 2009-10-12 19:29:01
0: cs:SyncTarget ro:Secondary/Primary ds:Inconsistent/UpToDate A r----
ns:0 nr:378692 dw:378340 dr:0 al:0 bm:22 lo:13 pe:1478 ua:11 ap:0 ep:1 wo:b oos:487894364
[>....................] sync'ed: 0.1% (476456/476828)M
finish: 2:08:56 speed: 63,056 (63,056) K/sec
Kernel/make compilation time and how to improve compile times/compile the Linux kernel faster without hardware upgrades
I thought only a faster CPU and SSD would help but I already have a Quad-Core CPU and it wasn't being maxed out. The actual tests were performed on an AMD-V enabled 128MB dual core VMWare container though.
There is a flag that can be passed to make in order to start multiple threads, by specifying 4 threads I was able to reduce the whole kernel compilation time from scratch by about 50%! (65minutes vs 31minutes!). *Yes I did do a make clean before each compilation too!
*Part of the slow kernel time is that I use the slow method of making my own initramfs (not pre-compressed and the kernel compile takes like 10x longer for the same thing I could do with a script which I normally do).
Normal Make (single thread by default):
make
real 65m18.956s
Threaded Make (4 threads):
make -j 4
real 31m57.877s
second run:
real 27m28.745s
Threaded Make (8 threads):
*I believe the worse result is likely due to swapping since I only had 128MB of RAM. Perhaps a lot more RAM could improve things too.
real 58m29.142s
user 33m3.616s
sys 19m13.064s
By increasing RAM to 512MB here are the results (when compiling RAM is more important than CPU and disk speed):
real 18m46.933s
user 20m11.776s
sys 6m51.334s
With 1GB of RAM
real 18m38.608s
user 20m31.857s
sys 7m46.141s
I believe the time was disappointing because of the initramfs creation.
With pre-created initramfs linked into kernel:
real 10m47.362s
user 18m24.837s
sys 1m48.095s
With 12 threads:
real 10m34.550s
Clearly the threads no longer help once the CPU is maxed out, I didn't check but considering with 8 threads that I was often at 80-90% CPU, now the CPU is the bottleneck. I'm going to increase my cores to 4 and try again.
It only shaved off 13 seconds, but the crazy thing is that initramfs takes 8 minutes to create alone! That's how inefficient the routine from the kernel is. The same initramfs is created through a script in about 1 minute or less!
Snapshot of top with 8 threads showing high iowait:
You can really see iowait is starting to become a factor (40-60% on both cores on average). I'm already running a RAID 1 with 7200 RPM 1TB drives. I believe SSD would make a huge improvement with the iowait. The CPU io often hits 70-80% but I believe the main culprit is the high iowait. The system with 8 threads is quite unresponsive to even shell commands and typing.
11:24:56 up 54 days, 1:29, 5 users, load average: 11.80, 10.36, 6.08
top - 11:22:12 up 54 days, 1:27, 5 users, load average: 11.79, 9.53, 5.04
Tasks: 121 total, 6 running, 97 sleeping, 18 stopped, 0 zombie
Cpu0 : 18.1% us, 13.3% sy, 0.0% ni, 0.0% id, 67.7% wa, 0.0% hi, 0.9% si
Cpu1 : 13.3% us, 19.5% sy, 0.0% ni, 0.0% id, 53.6% wa, 1.1% hi, 12.4% si
Mem: 126980k total, 116308k used, 10672k free, 788k buffers
Swap: 377488k total, 107036k used, 270452k free, 5180k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
7970 root 18 0 17596 14m 2976 D 18.2 11.5 0:00.75 cc1
7932 root 18 0 19220 13m 1612 D 17.8 10.9 0:00.94 cc1
7923 root 18 0 24152 13m 3140 R 13.4 11.0 0:01.37 cc1
7938 root 18 0 19448 12m 1612 R 10.8 10.4 0:00.83 cc1
14 root 10 -5 0 0 0 S 8.0 0.0 5:17.26 kblockd/1
7687 root 18 0 36760 13m 3036 R 7.6 10.7 0:05.45 cc1
7905 root 18 0 21188 14m 3064 D 7.0 11.5 0:00.64 cc1
118 root 10 -5 0 0 0 D 3.5 0.0 15:23.71 kswapd0
7915 root 18 0 27164 17m 1616 D 2.9 14.1 0:00.69 cc1
With 512MB of RAM instead of 128MB
real 18m46.933s
user 20m11.776s
sys 6m51.334s
Things don't fee lagged at all on the system unlike last time when it had 128MB of RAM.
The load is lower and iowait is virtually non-existent.
03:52:52 up 4 min, 2 users, load average: 10.55, 5.14, 2.02
04:02:46 up 14 min, 2 users, load average: 1.85, 5.12, 4.13
top - 03:53:11 up 5 min, 2 users, load average: 10.30, 5.43, 2.18
Tasks: 93 total, 12 running, 81 sleeping, 0 stopped, 0 zombie
Cpu0 : 90.0% us, 9.7% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.3% hi, 0.0% si
Cpu1 : 89.3% us, 10.0% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi, 0.7% si
Mem: 516820k total, 431108k used, 85712k free, 176120k buffers
Swap: 377488k total, 0k used, 377488k free, 111164k cached
top - 04:02:42 up 14 min, 2 users, load average: 1.84, 5.18, 4.14
Tasks: 55 total, 2 running, 53 sleeping, 0 stopped, 0 zombie
Cpu0 : 10.0% us, 40.2% sy, 0.0% ni, 49.8% id, 0.0% wa, 0.0% hi, 0.0% si
Cpu1 : 11.6% us, 37.9% sy, 0.0% ni, 49.5% id, 1.0% wa, 0.0% hi, 0.0% si
Free Memory gets low sometimes:
total used free shared buffers cached
Mem: 504 486 18 0 4 427
With 1GB
Clearly 1GB is the sweet spot, I'm tempted to turn the threads up from 8 to at least 12 or 16.
We can also see that CPU usage gets higher, so it is a factor and that iowait when compiling is usually caused by swapping because of too little RAM.
Cpu0 : 92.0% us, 8.0% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi, 0.0% si
Cpu1 : 93.4% us, 6.6% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi, 0.0% si
total used free shared buffers cached
Mem: 1012 408 603 0 37 291
04:24:24 up 13 min, 2 users, load average: 2.43, 6.33, 4.47
04:33:13 up 21 min, 2 users, load average: 10.58, 7.00, 5.06
Even with the high load the system is very responsive, unlike at 128MB of RAM
Free Mem does get low still:
total used free shared buffers cached
Mem: 1012 986 26 0 7 900
-/+ buffers/cache: 77 934
Swap: 368 0 368
*Note that if you specify -j with no number it opens unlimited threads, it basically causes gcc to crash/fail in my experience. Perhaps with more memory this wouldn't have happened, I'm not sure what caused it for sure other than my system being unable to handle unlimited threads.
You'll get errors like this if specifying unlimited threads:
CC kernel/time/timekeeping.o
gcc: gcc: Internal error: Killed (program cc1)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions, see
<URL:file:///usr/share/doc/gcc-3.4/README.Bugs>.
Internal error: Killed (program cc1)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions, see
<URL:file:///usr/share/doc/gcc-3.4/README.Bugs>.
make[2]: make[1]: *** [arch/x86/kernel/setup.o] Killed
*** [fs/file_table.o] Killed
gcc: gcc: make[2]: *** [arch/x86/kernel/x86_init.o] Killed
make[1]: *** [fs/super.o] Killed
gcc: gcc: Internal error: Killed (program cc1)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions, see
<URL:file:///usr/share/doc/gcc-3.4/README.Bugs>.
Internal error: Killed (program cc1)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions, see
<URL:file:///usr/share/doc/gcc-3.4/README.Bugs>.
Internal error: Killed (program cc1)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions, see
<URL:file:///usr/share/doc/gcc-3.4/README.Bugs>.
Internal error: Killed (program cc1)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions, see
<URL:file:///usr/share/doc/gcc-3.4/README.Bugs>.
make[2]:
Conclusion/What I Learned
The single most important factor for faster compiling is RAM and 1GB+ is preferable. The first wall I hit was high iowait due to insufficient RAM and swapping. With more RAM the iowait virtually disappears and you can see the CPU's getting loaded to 80-90%.
Basically using make with more threads, decreases the compile time exponentially, but only so long as you have enough RAM to support those threads, and the next bottleneck will become CPU processing power. The key is to add more cores at that point. Having a Quad Core or even 6 core with lots of RAM would give you the best performance and faster compliing. I feel disk speed is of little impact when compiling so SSD wouldn't make much of a difference.
List of Free Public DNS Servers IP Addresses
One thing to note about DNS servers and providers is that they aren't always trustworthy, not even if they're Google or your favorite ISP. Any DNS server can compromise your privacy, and they are likely tracking your browsing habits and keeping logs of it. Sometimes it's for Marketing/Research purposes such as Google's GMail service which they admit is scraped/datamined. I would expect nothing less from their DNS service.
The other danger with such widely used and publicly advertised DNS services in general is that if they are ever attacked and poisoned it could result in ID theft for many people. Eg. if Google's DNS cache is poisoned or servers hacked, and someone sets paypal.com to resolve to a hacked server, those people will unwittingly give their details away to the phishing site, or worse yet, if they login to their bank account and the cache is poisoned to a hacked server for a major bank.
As for ISPs, I would not trust them more either, of course your own ISP probably does the same but do keep this in mind that many DNS providers don't have good intentions. At the very least, remember that your browsing habits and websites and visited are can always be tracked and monitored by whoever your ISP is and whoever your DNS server operator is.
The one benefit of using these servers is that sometimes they can help you can.
It can make tracking and logging by your own ISP more difficult, they at least can't do it at the DNS level of their own servers unless they are actively logging all traffic outgoing to udp port 53 (DNS).
In countries where content is banned, sometimes you can get around filtering and blocks by simply using a foreign DNS server (assuming those servers aren't blocked and assuming the block is at the DNS level only and actively filtered by port filtering and content inspection, or based on IP etc..).
With the warning/disclaimer above here are some free DNS server providers.
- 67.138.54.100
- 207.225.209.66
- 208.67.222.222
- 208.67.220.220
Verizon Free DNS Server (used by many VPS server providers)
- 4.2.2.1
- 4.2.2.2
- 4.2.2.3
- 4.2.2.4
- 4.2.2.5
- 4.2.2.6
Google's Free Public DNS Servers:
- 8.8.8.8
- 8.8.4.4
Linux how to use find recursively to find certain types of files/extensions
Normally if you're in a certain directory you could do:
find *.txt and it will work as expected, but it won't work recursively through child directories, here's the correct way to do it:
find . -type f -name *.txt
The "-type f" is optional because that means only files, but we could have specified d for directory etc...
The above command will work recursively as you'd expect. In that way I find "find" to be unintuitive but this is basically what all find functions on all computers are implemented AFAIK (eg. front end search GUI's for different OS's).
VBox/Virtualbox how to shrink VDI image and recover/reclaim unused disk space
VBoxManage modifyvdi /path/to/your.vdi compact
I believe this should be done only when your VM is powered off, but I decided to try it with the system powered on. i wouldn't recommend it because it's dangerous even if it does work but this is a test system. For anything important/production I would always take a backup first and make sure the system is powered off.
VBoxManage modifyvdi XP-clone.vdi compact
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Virtualbox How To Clone VM/Container VDI file
You can't just do a straight copy of the VDI image of your virtual machine because there is a unique UUID, well I believe you can and then you can create a new UUID manually (at least you could with VMWARE) but to keep it clean just use this method:
VBoxManage clonevdi /path/to/your.vdi outputname.vdi
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
That's all there is to it, just wait for it copy and you can then create a new VM with your cloned VDI. This is nice if you want to create templates etc... or if you want to make a copy of a testing machine for more testing.
Directadmin Solution "This is e-mail notification to warn you that your hostname is setup improperly on your system."
This is e-mail notification to warn you that your hostname is setup improperly on your system.
This is an annoying message and bug with Directadmin, my hostname is set correctly, why does it complain?
To get of this message just run this command:
/usr/local/directadmin/scripts/hostname.sh yourhostname.com
Kernel linux-2.6.39 In file included from drivers/block/cciss.c:1015: include/asm-generic/pci-dma-compat.h: In function `cmd_special_free': drivers/block/cciss.c:196: sorry, unimplemented: inlining failed in call to 'cciss_tag_discard_error_bits': fu
In file included from drivers/block/cciss.c:1015:
include/asm-generic/pci-dma-compat.h: In function `cmd_special_free':
drivers/block/cciss.c:196: sorry, unimplemented: inlining failed in call to 'cciss_tag_discard_error_bits': function body not available
include/asm-generic/pci-dma-compat.h:25: sorry, unimplemented: called from here
make[2]: *** [drivers/block/cciss.o] Error 1
make[1]: *** [drivers/block] Error 2
make: *** [drivers] Error 2
Once again with a new kernel "linux-2.6.39" another huge bug.
Mysql Solution - Timeout error occurred trying to stop MySQL Daemon. Stopping MySQL: [FAILED]
Timeout error occurred trying to stop MySQL Daemon.
Stopping MySQL: [FAILED]
[root@devbox stats]#
Solution (force kill mysqld - warning you do risk table corruption here but there's no choice if you want your DB up right away)
[root@devbox stats]# killall -9 mysqld
[root@devbox stats]# service mysqld restart
Stopping MySQL: [ OK ]
Starting MySQL: [ OK ]
SPAMASSASSIN/spamcd solution - spamc[16225]: connect to spamd on 127.0.0.1 failed, retrying (#2 of 3): Connection timed out
May 6 08:16:57 devbox spamc[16225]: connect to spamd on 127.0.0.1 failed, retrying (#2 of 3): Connection timed out
May 6 08:17:02 devbox spamc[20214]: connect to spamd on 127.0.0.1 failed, retrying (#1 of 3): Connection timed out
spamc[16225]: connect to spamd on 127.0.0.1 failed, retrying (#3 of 3): Connection timed out
First make sure that the spamd service is actually running, this is your spamd (spamassassin server) cannot be reached. In my case it was, so what happened, why can't I connect? I even restarted the service.
Then I realized that I setup a quick iptables script, one which didn't explicitly allow the spamd port to be contacted which is port 783. Make sure the port is open otherwise you'll see these errors and you'll wonder where your e-mail went!
Apache Crash Solution Can't Restart Due to Socket In use - (98)Address already in use: make_sock: could not bind to address [::]:80 (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting d
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
This will even trip you up if you have a service like monit to save you if httpd crashes. The only way to fix this is to either wait (it's not an option for production situations) or to kill the ghost httpd processes that wouldn't gracefully close:
Solution:
killall -9 httpd
Virtualbox Guest Hang/Freeze Ghost Zombie VM Machine Problem/Solution
Virtualbox hang problem
A VM just froze and wouldn't close so I had to force it, but the VBox GUI thinks it's running even when I close it.
I manually killed the related process by doing ps aux|grep VirtualBox and found the PID 6191
I killed it with "kill -kill 6191" but it remains open and as "defunct" so I can't restart it because the GUI freezes when I click on it because it thinks it is running still
6191 5.2 0.0 0 0 ? Zl 09:31 0:53 [VirtualBox] <defunct>
After several minutes the process disappeared but there's no way that I know to instantly solve this issue. Even killing the GUI doesn't fix it, the only way would probably be to restart the entire service, thus killing your other VMs at the same time.
mysql enable slow query logging/Query Cache Solution - find/track cause of slow mysqld/high IO/CPU usage
If you have a webserver and find you have high IO/lagginess MySQL is one of the first things to check. It turns out MySQL was my problem and it was creating a high load on my server, especially for IO.
How to Enable MySQL Slow Query Logging To Find Slow Performance/Queries
vi /etc/my.cnf
Add this anywhere under [mysqld]
#slow queries
log-slow-queries = /var/log/mysql/mysqlslowqueries.log
long_query_time = 1
You can change the log path to whatever you like. You can also chanege the threshold for slow queries, I have it sent on 1 second. Once you do this and restart mysqld you'll start seeing the user, database and exact query that is slowing things down.
I was finding queries that were taking as long as 42 seconds long! That was 42 seconds of slow IO performance that was wreaking havoc on my webserver.
The Quick Fix for slow MySQL performance Queries?
I thought about creating a MySQL cluster but it requires several servers and takes some time to setup and test. I also thought about a hardware upgrade, getting faster RPM HDD's and maybe going SSD, but this takes time and money even if I wanted to do it now.
What can be done immediately? The answer for me and a lot of people will be MySQL Query Caching.
Enable MySQL Query Caching To Improve MySQL performance
vi /etc/my.cnf
Under [mysqld] add:
#increase performance with caching
#128MB of memory cache in KB
query_cache_size=131072
query_cache_type=1
#maximum size of individual query that can be cached in KB (about 1 gig although note the cache total size is restricted to 128MB now)
query_cache_limit=1048576
After doing this my performance issues were solved. A quick note about Query Caching is that it only works for the EXACT same SELECT statements when data has not changed, if data changes the cache becomes irrelevant until the next request. Also note that if the SELECT statement expliclity specifies NOCACHE (can't remember the syntax) then the cache will not be used.
For many database driven sites this is still good and at least it can only improve performance. I've found it to make a huge difference.
Apache High CPU Usage Enable Mod_Status Guide Solution - Find Cause of High CPU Usage Script/Domain
mod_status is a great way to track down the source of high CPU usage and to find what vhost/script is the cause of it.
It gives you a live view of bandwith usage, CPU usage, and memory usage broken down by domain/vhost and script/URI.
Enable mod_status
vi /etc/httpd/conf/httpd.conf
ExtendedStatus On
<Location /server-status>
SetHandler server-status
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Location>
Add your IP after 127.0.0.1. I believe you could also require an htaccess pasword if you want.
After that reload Apache and browse to your webserver to http://yourhost.com/server-status and you'll see something like below:
Apache Server Status for localhost
- Server Version: Apache/2.2.3 (CentOS)
- Server Built: Aug 30 2010 12:32:08
Current Time: Saturday, 30-Apr-2011 15:55:46 PDT
- Restart Time: Thursday, 28-Apr-2011 23:03:58 PDT
- Parent Server Generation: 3
- Server uptime: 1 day 16 hours 51 minutes 48 seconds
- Total accesses: 243995 - Total Traffic: 1.7 GB
- CPU Usage: u18.36 s1.75 cu2.88 cs0 - .0156% CPU load
- 1.66 requests/sec - 12.1 kB/second - 7.3 kB/request
- 1 requests currently being processed, 3 idle workers
W_..__....
Scoreboard Key:
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"C" Closing connection, "L" Logging, "G" Gracefully finishing,
"I" Idle cleanup of worker, "." Open slot with no current process
| Srv | PID | Acc | M | CPU | SS | Req | Conn | Child | Slot | Client | VHost | Request |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0-3 | 22481 | 0/29/36628 | W | 0.42 | 0 | 0 | 0.0 | 0.04 | 307.98 | 9 | testdomain.com | GET /server-status?refresh=10 HTTP/1.1 |
| 1-3 | 18115 | 0/271/37239 | _ | 6.33 | 4 | 236 | 0.0 | 1.20 | 255.47 | forums.testdomain.com | POST /mgc_cb_evo_ajax.php HTTP/1.1 | |
| 2-3 | - | 0/0/35305 | . | 0.61 | 54 | 0 | 0.0 | 0.00 | 235.80 | forums.testdomain.com | GET /forumdisplay.php?s=e5pr | |
| 3-3 | - | 0/0/34526 | . | 9.19 | 69 | 0 | 0.0 | 0.00 | 235.66 | ::1 | 00-defaultsite.com | OPTIONS * HTTP/1.0 |
| 4-3 | 22258 | 0/49/28952 | _ | 1.12 | 4 | 0 | 0.0 | 0.21 | 194.55 | forums.testdomain.com | GET /cpstyles/kartel/kartel/misc/down9x9.gif HTTP/1.1 | |
| 5-3 | 19843 | 0/232/27942 | _ | 3.10 | 1 | 137 | 0.0 | 0.77 | 181.58 | unitetest.com | GET //index.php?action=profile;u=174 HTTP/1.1 | |
| 6-3 | - | 0/0/19301 | . | 2.31 | 569 | 0 | 0.0 | 0.00 | 130.28 | ::1 | 00-defaultsite.com | OPTIONS * HTTP/1.0 |
| 7-3 | - | 0/0/16325 | . | 0.26 | 2102 | 0 | 0.0 | 0.00 | 141.16 | ::1 | 00-defaultsite.com | OPTIONS * HTTP/1.0 |
| 8-3 | - | 0/0/5534 | . | 0.01 | 2103 | 0 | 0.0 | 0.00 | 36.51 | ::1 | 00-defaultsite.com | OPTIONS * HTTP/1.0 |
| 9-3 | - | 0/0/2243 | . | 0.09 | 2100 | 0 | 0.0 | 0.00 | 15.39 | ::1 | 00-defaultsite.com | OPTIONS * HTTP/1.0 |
| Srv | Child Server number - generation |
|---|---|
| PID | OS process ID |
| Acc | Number of accesses this connection / this child / this slot |
| M | Mode of operation |
| CPU | CPU usage, number of seconds |
| SS | Seconds since beginning of most recent request |
| Req | Milliseconds required to process most recent request |
| Conn | Kilobytes transferred this connection |
| Child | Megabytes transferred this child |
| Slot | Total megabytes transferred this slot |
| SSL/TLS Session Cache Status: |
| cache type: SHMCB, shared memory: 512000 bytes, current sessions: 3 sub-caches: 32, indexes per sub-cache: 133 time left on oldest entries' SSL sessions: avg: 6 seconds, (range: 6...7) index usage: 0%, cache usage: 0% total sessions stored since starting: 571 total sessions expired since starting: 568 total (pre-expiry) sessions scrolled out of the cache: 0 total retrieves since starting: 15093 hit, 512 miss total removes since starting: 0 hit, 0 miss |
vnstat setup guide/tutorial
[root@monitor]# yum install vnstat
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: centos.mirror.netelligent.ca
* base: centos.mirror.netelligent.ca
* centosplus: centos.mirror.iweb.ca
* contrib: centos.mirror.netelligent.ca
* extras: centos.mirror.netelligent.ca
* rpmforge: apt.sw.be
* updates: centos.mirror.netelligent.ca
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package vnstat.i386 0:1.10-1.el5.rf set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================
Installing:
vnstat i386 1.10-1.el5.rf rpmforge 65 k
Transaction Summary
=============================================================================================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)
Total download size: 65 k
Is this ok [y/N]: y
Downloading Packages:
vnstat-1.10-1.el5.rf.i386.rpm | 65 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : vnstat 1/1
Installed:
vnstat.i386 0:1.10-1.el5.rf
Complete!
[root@monitor]# vnstat
vnstat vnstat.cron
[root@monitor]# vnstat
No database found, nothing to do. Use --help for help.
A new database can be created with the following command:
vnstat -u -i eth0
Replace 'eth0' with the interface that should be monitored.
The following interfaces are currently available:
lo venet0
[root@monitor]# vnstat -u -i venet0
Error: Unable to read database "/var/lib/vnstat/venet0".
Info: -> A new database has been created.
[root@monitor]#
-----------
vnstat
rx / tx / total / estimated
ppp0: Not enough data available yet.
Let's check the cron log:
cat /var/log/cron
OK so it is executing the vnstat.cron:
crond[10880]: (nobody) CMD (/usr/sbin/vnstat.cron)
Let's execute the cron script as nobody:
sudo -u nobody /usr/sbin/vnstat.cron
Error: Unable to write database "/var/lib/vnstat/eth0".
Let's check the permissions on that path:
# ls -al /var/lib/vnstat
total 20
drwxr-xr-x 2 nobody nobody 4096 Apr 5 10:40 .
drwxr-xr-x 24 root root 4096 Apr 5 10:38 ..
-rw-r--r-- 1 root root 2272 Apr 5 10:38 eth0
-rw-r--r-- 1 nobody nobody 2272 Apr 5 10:53 .eth0
-rw-r--r-- 1 root root 2272 Apr 5 10:38 venet0
Fix:
chown nobody.nobody -R /var/lib/vnstat/.*
sudo -u nobody /usr/sbin/vnstat.cron
[root@ vnstat]# vnstat
rx / tx / total / estimated
eth0:
Apr '11 19.70 MiB / 424.90 MiB / 444.60 MiB / 2.91 GiB
today 19.70 MiB / 424.90 MiB / 444.60 MiB / 967 MiB
The problem is that whenever you add an interface with vnstat as root is that it creates it as root in /var/lib/vnstat
The other solution (not preferable I admit) is to edit the cron script to run as root:
change:
*/5 * * * * nobody /usr/sbin/vnstat.cron
to
*/5 * * * * /usr/sbin/vnstat.cron
htaccess modrewrite problem with rewriting url with- dashes solution
I was getting frustrated with trying to write a simple URL like this:
/example-withdash
I used the htaccess code like this:
Rewriterule ^example-withdash$ / [R=301]
I also tried escaping the dash which I thought should have treated it as a literal but that didn't work either:
Rewriterule ^example-withdash$ / [R=301]
But it wouldn't work, apparently the "-" dash means don't substitute, so this means in plain Engilsh that my rule is not treated as intended or expected.
- (dash)A dash indicates that no substitution should be performed (the existing path is passed through untouched). This is used when a flag (see below) needs to be applied without changing the path.
The Solution:
Put brackets around the rewrite rule ()
Rewriterule ^(example-withdash)$ / [R=301]
Now it works, it's very simple but quite frustrating when you don't know this. I actually think Apache should have a debug mode or some switch to run an .htaccess file and verbosely output the interpretation of each rule.
PayPal Solution - Error Detected Error Message We were unable to decrypt the certificate id. We were unable to decrypt the certificate id.
|
||||
Solution for "unable to decrypt the certificate id".
Let me start by saying there are many reasons this can happen, it's best to start with a good and known to work template.
Here are some common things that cause this message:
- Having extra spaces/formatting in the variables you are making part of your encrypted payment.
- Having duplicate fields
Here is what happened to my client and may be happening to others:
Mixing up your public key and PayPal's public key, it sounds funny but I've seen this enough times.
So make sure you check the contents of all the keys, see if they match. It's easy when transferring the keys around to different machines to mix them up.
Solution was to make sure your public key and paypal's public key don't get mixed up. I saw a case where both keys were the same (either both were PayPal or both were the client's public key).
iPhone 3G/3GS/4 Undelete Photos/Videos Datarecovery
I found this technique listed in many places which shows you how to use a common Linux tool "dd" to dump the raw partition of your iPhone.
I give credit to this site for showing me the correct way to dd from the iPhone, I never thought to try it in the other direction: http://log.ijulien.com/post/182804914/iphone-3gs-data-recovery
Requirements
1.) Jailbreak your phone
2.) Install OpenSSH on your phone
Steps
*WARNING - make sure that you don't mix up the if= and of= commands, if you make that mistake your iphone will either be bricked and you will lose data for sure.
1.) From your computer (from the shell/terminal) run this command (*Note you must run it from your computer and not your iPhone, otherwise it won't work):
Correct Command: ssh root@youriphoneipaddress dd if=/dev/rdisk0s2s1 bs=1M | dd of=iphonebackup.img
This command is posted all over but doesn't work: dd bs=4096 if=/dev/disk0s2s1 | ssh user@192.168.1.125 ‘dd of=iphonebackup.img'
/bin/dd: opening `/dev/disk0s2s1’: Resource busy
2.) Recover with testdisk/photorec
Just point photorec to the image, and it will ask you a few questions and do the rest.
I was able to recover a lot of things but some .mov files don't play, I believe they may be alright but I need to find a way to fix the header (the header seems to be missing so they won't work).
Upgade VBOX/Virtualbox 3.2 to 4.0 in Linux
I was afraid to remove the virtualbox 3.2 package in Ubuntu because I didn't know if it might remove the .virtualbox folder which contains all of my VM data.
I have a backup so I did remove the package and found everything was intact, so I installed and upgrade to VBOX 4.0 which seems to be a huge improvement, especially in UI performance.
Linux OCR Comparison
http://www.splitbrain.org/blog/2010-06/15-linux_ocr_software_comparison
They did a great writeup and comparison on the different OCR options available for Linux.
encrypt bash scripts to hide source code
http://www.datsi.fi.upm.es/~frosal/
SHC is a program written by the author above that does just that, it's a great little tool to have.
Some have said it isn't exactly encrypting the code but just making it hard to read by obfuscating the code.
There was also a good discussion about that here: http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1302465567943+28353475&threadId=1192978
http://nixcraft.com/shell-scripting/12097-binary-conversion-shell-script-shell-script-compiler.html
phpMyAdmin - Error Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.
The fix for this was setting the correct permissions in /var/lib/php, it needs to be "root.root"
And /var/lib/php/session needs to be "root.apache" to work properly.
After that I was able to login to phpMyAdmin as normal. This whole thing happened because I accidentally changed all of /var/lib to root.root.
SMARTCTL additional SMART command testing using short and long tests
smartctl -t long /dev/sda (note you can specify short, but it's not as thorough as long of course).
smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Extended self-test routine immediately in off-line mode".
Drive command "Execute SMART Extended self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 161 minutes for test to complete.
Test will complete after Fri Apr 8 14:59:25 2011
Use smartctl -X to abort test.
Then just check the smartctl status again with smartctl -a /dev/sda once the test should have completed:
GREP how to ignore blank lines
grep -v '^$'
telnet force escape/quite with Ctrl + ]
telnet localhost 80
Trying localhost...
Connected to localhost).
Escape character is '^]'.
^]
telnet>
A lot of people don't know that "^" means the Control Key, so many times you can't force quite telnet without knowing that (Ctrl + C won't always work).
*Just use Ctrl + ]
I hope this saves some time and frustration from some people.
Are my WDEARS20 Drives dying already?
This happened during a RAID array check:
SMART says both drives pass the test, but I'm doing a long test on them and hopefully this is not a hardware error.
Apr 3 04:22:01 remote kernel: md: syncing RAID array md2
Apr 3 04:22:01 remote kernel: md: minimum _guaranteed_ reconstruction speed: 1000 KB/sec/disc.
Apr 3 04:22:01 remote kernel: md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for reconstruction.
Apr 3 04:22:01 remote kernel: md: using 128k window, over a total of 488287552 blocks.
Apr 3 04:22:01 remote kernel: md: delaying resync of md1 until md2 has finished resync (they share one or more physical units)
Apr 3 04:29:28 remote ntpd[7131]: synchronized to 24.215.0.24, stratum 2
Apr 3 05:25:01 remote auditd[6570]: Audit daemon rotating log files
Apr 3 08:35:07 remote kernel: ata4.00: exception Emask 0x0 SAct 0x7fffffff SErr 0x0 action 0x0
Apr 3 08:35:07 remote kernel: ata4.00: irq_stat 0x40000008
Apr 3 08:35:07 remote kernel: ata4.00: cmd 60/80:80:c0:41:69/00:00:42:00:00/40 tag 16 ncq 65536 in
Apr 3 08:35:07 remote kernel: res 41/40:00:38:42:69/cd:00:42:00:00/40 Emask 0x409 (media error) <F>
Apr 3 08:35:07 remote kernel: ata4.00: status: { DRDY ERR }
Apr 3 08:35:07 remote kernel: ata4.00: error: { UNC }
Apr 3 08:35:07 remote kernel: ata4.00: configured for UDMA/133
Apr 3 08:35:07 remote kernel: ata4: EH complete
Apr 3 08:35:07 remote kernel: SCSI device sdb: 3907029168 512-byte hdwr sectors (2000399 MB)
Apr 3 08:35:07 remote kernel: sdb: Write Protect is off
Apr 3 08:35:07 remote kernel: SCSI device sdb: drive cache: write back
Apr 3 08:35:09 remote kernel: ata4.00: exception Emask 0x0 SAct 0x5f8079ff SErr 0x0 action 0x0
Apr 3 08:35:21 remote kernel: ata4.00: irq_stat 0x40000008
Apr 3 08:35:21 remote kernel: ata4.00: cmd 60/80:70:c0:41:69/00:00:42:00:00/40 tag 14 ncq 65536 in
Apr 3 08:35:21 remote kernel: res 41/40:00:38:42:69/cd:00:42:00:00/40 Emask 0x409 (media error) <F>
Apr 3 08:35:21 remote kernel: ata4.00: status: { DRDY ERR }
Apr 3 08:35:21 remote kernel: ata4.00: error: { UNC }
Apr 3 08:35:21 remote kernel: ata4.00: configured for UDMA/133
Apr 3 08:35:21 remote kernel: ata4: EH complete
Apr 3 08:35:21 remote kernel: SCSI device sdb: 3907029168 512-byte hdwr sectors (2000399 MB)
Apr 3 08:35:21 remote kernel: sdb: Write Protect is off
Apr 3 08:35:21 remote kernel: SCSI device sdb: drive cache: write back
Apr 3 08:35:21 remote kernel: ata4.00: exception Emask 0x0 SAct 0xfffff SErr 0x0 action 0x0
Apr 3 08:35:21 remote kernel: ata4.00: irq_stat 0x40000008
Apr 3 08:35:21 remote kernel: ata4.00: cmd 60/80:38:c0:41:69/00:00:42:00:00/40 tag 7 ncq 65536 in
Apr 3 08:35:21 remote kernel: res 41/40:00:38:42:69/cd:00:42:00:00/40 Emask 0x409 (media error) <F>
Apr 3 08:35:21 remote kernel: ata4.00: status: { DRDY ERR }
Apr 3 08:35:21 remote kernel: ata4.00: error: { UNC }
Apr 3 08:35:21 remote kernel: ata4.00: configured for UDMA/133
Apr 3 08:35:21 remote kernel: ata4: EH complete
Apr 3 08:35:21 remote kernel: SCSI device sdb: 3907029168 512-byte hdwr sectors (2000399 MB)
Apr 3 08:35:21 remote kernel: sdb: Write Protect is off
Apr 3 08:35:21 remote kernel: SCSI device sdb: drive cache: write back
Apr 3 08:35:21 remote kernel: ata4.00: exception Emask 0x0 SAct 0xb9800 SErr 0x0 action 0x0
Apr 3 08:35:21 remote kernel: ata4.00: irq_stat 0x40000008
Apr 3 08:35:21 remote kernel: ata4.00: cmd 60/80:60:c0:41:69/00:00:42:00:00/40 tag 12 ncq 65536 in
Apr 3 08:35:22 remote kernel: res 41/40:00:38:42:69/cd:00:42:00:00/40 Emask 0x409 (media error) <F>
Apr 3 08:35:22 remote kernel: ata4.00: status: { DRDY ERR }
Apr 3 08:35:22 remote kernel: ata4.00: error: { UNC }
Apr 3 08:35:22 remote kernel: ata4.00: configured for UDMA/133
Apr 3 08:35:22 remote kernel: ata4: EH complete
Apr 3 08:35:22 remote kernel: SCSI device sdb: 3907029168 512-byte hdwr sectors (2000399 MB)
Apr 3 08:35:22 remote kernel: sdb: Write Protect is off
Apr 3 08:35:22 remote kernel: SCSI device sdb: drive cache: write back
Apr 3 08:35:22 remote kernel: ata4.00: exception Emask 0x0 SAct 0x3f SErr 0x0 action 0x0
Apr 3 08:35:22 remote kernel: ata4.00: irq_stat 0x40000008
Apr 3 08:35:22 remote kernel: ata4.00: cmd 60/80:20:c0:41:69/00:00:42:00:00/40 tag 4 ncq 65536 in
Apr 3 08:35:22 remote kernel: res 41/40:00:38:42:69/cd:00:42:00:00/40 Emask 0x409 (media error) <F>
Apr 3 08:35:22 remote kernel: ata4.00: status: { DRDY ERR }
Apr 3 08:35:22 remote kernel: ata4.00: error: { UNC }
Apr 3 08:35:22 remote kernel: ata4.00: configured for UDMA/133
Apr 3 08:35:22 remote kernel: ata4: EH complete
Apr 3 08:35:22 remote kernel: SCSI device sdb: 3907029168 512-byte hdwr sectors (2000399 MB)
Apr 3 08:35:22 remote kernel: sdb: Write Protect is off
Apr 3 08:35:22 remote kernel: SCSI device sdb: drive cache: write back
Apr 3 08:35:22 remote kernel: ata4.00: exception Emask 0x0 SAct 0x32 SErr 0x0 action 0x0
Apr 3 08:35:22 remote kernel: ata4.00: irq_stat 0x40000008
Apr 3 08:35:22 remote kernel: ata4.00: cmd 60/80:08:c0:41:69/00:00:42:00:00/40 tag 1 ncq 65536 in
Apr 3 08:35:22 remote kernel: res 41/40:00:38:42:69/cd:00:42:00:00/40 Emask 0x409 (media error) <F>
Apr 3 08:35:22 remote kernel: ata4.00: status: { DRDY ERR }
Apr 3 08:35:22 remote kernel: ata4.00: error: { UNC }
Apr 3 08:35:22 remote kernel: ata4.00: configured for UDMA/133
Apr 3 08:35:22 remote kernel: sd 3:0:0:0: SCSI error: return code = 0x08000002
Apr 3 08:35:22 remote kernel: sdb: Current [descriptor]: sense key: Medium Error
Apr 3 08:35:22 remote kernel: Add. Sense: Unrecovered read error - auto reallocate failed
Apr 3 08:35:22 remote kernel:
Apr 3 08:35:22 remote kernel: Descriptor sense data with sense descriptors (in hex):
Apr 3 08:35:22 remote kernel: 72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00
Apr 3 08:35:22 remote kernel: 42 69 42 38
Apr 3 08:35:22 remote kernel: end_request: I/O error, dev sdb, sector 1114194488
Apr 3 08:35:22 remote kernel: ata4: EH complete
Apr 3 08:35:22 remote kernel: SCSI device sdb: 3907029168 512-byte hdwr sectors (2000399 MB)
Apr 3 08:35:22 remote kernel: sdb: Write Protect is off
Apr 3 08:35:22 remote kernel: SCSI device sdb: drive cache: write back
Apr 3 08:46:45 remote kernel: md: md2: sync done.
Apr 3 08:46:45 remote kernel: md: syncing RAID array md1
Apr 3 08:46:45 remote kernel: md: minimum _guaranteed_ reconstruction speed: 1000 KB/sec/disc.
Apr 3 08:46:45 remote kernel: md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for reconstruction.
Apr 3 08:46:45 remote kernel: md: using 128k window, over a total of 29302464 blocks.
Apr 3 08:46:45 remote kernel: RAID1 conf printout:
Apr 3 08:46:45 remote kernel: --- wd:2 rd:2
Apr 3 08:46:45 remote kernel: disk 0, wo:0, o:1, dev:sda3
Apr 3 08:46:45 remote kernel: disk 1, wo:0, o:1, dev:sdb3
Apr 3 08:51:54 remote kernel: md: md1: sync done.
Apr 3 08:51:54 remote kernel: RAID1 conf printout:
Apr 3 08:51:54 remote kernel: --- wd:2 rd:2
Apr 3 08:51:54 remote kernel: disk 0, wo:0, o:1, dev:sda2
Apr 3 08:51:54 remote kernel: disk 1, wo:0, o:1, dev:sdb2
MYSQL Error Can't find file: './wf/Sessions.frm' (errno: 13) Solution
mysql errors even though these files do exist:
110405 13:21:37 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
110405 13:26:15 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
110405 13:28:50 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
110405 13:26:15 InnoDB: Operating system error number 13 in a file operation.
I accidentally set all ownership on everything in /var/lib to root.root
This meant that the normal mysql directory now had root ownership, so MySQL could no longer read its own files.
I was getting worried because one by one my databases couldn't be read, I feared the worse (a RAID array corruption), but fortunately it was just an idiotic and simple mistake to fix.
So the "error 13" is correct, that basically the DB lacks permissions to access the relevant files.
Dying Samsung DVDRW Drive
My Samsung drive failed on me, at first I thought it was the enclosure but a direct SATA connection causes the same problems for discs that are inserted. It will work fine for a few minutes but then starts spewing the errors below.
I've never been a fan of Korean made optical drives and have always had trouble with them. The problem is that I don't believe NEC and Lite-ON make drives anymore, and I considered them the leaders.
Apr 7 11:58:48 box kernel: [71534.740594] sr 1:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 04 00 00 00 02 00
Apr 7 11:58:48 box kernel: [71534.763443] sr 1:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Apr 7 11:58:48 box kernel: [71534.763454] sr 1:0:0:0: [sr0] Sense Key : Illegal Request [current]
Apr 7 11:58:48 box kernel: [71534.763464] sr 1:0:0:0: [sr0] Add. Sense: Logical block address out of range
Apr 7 11:58:48 box kernel: [71534.763474] sr 1:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 00 00 00 02 00
Apr 7 11:58:48 box kernel: [71534.765714] sr 1:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Apr 7 11:58:48 box kernel: [71534.765725] sr 1:0:0:0: [sr0] Sense Key : Illegal Request [current]
Apr 7 11:58:48 box kernel: [71534.765734] sr 1:0:0:0: [sr0] Add. Sense: Logical block address out of range
Apr 7 11:58:48 box kernel: [71534.765745] sr 1:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 00 00 00 02 00
Apr 7 11:58:48 box kernel: [71534.785779] sr 1:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Apr 7 11:58:48 box kernel: [71534.785790] sr 1:0:0:0: [sr0] Sense Key : Illegal Request [current]
Apr 7 11:58:48 box kernel: [71534.785800] sr 1:0:0:0: [sr0] Add. Sense: Logical block address out of range
Apr 7 11:58:48 box kernel: [71534.785811] sr 1:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 00 00 00 01 00
Apr 7 11:58:48 box kernel: [71534.787761] sr 1:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Apr 7 11:58:48 box kernel: [71534.787772] sr 1:0:0:0: [sr0] Sense Key : Illegal Request [current]
Apr 7 11:58:48 box kernel: [71534.787782] sr 1:0:0:0: [sr0] Add. Sense: Logical block address out of range
Apr 7 11:58:48 box kernel: [71534.787792] sr 1:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 01 00 00 01 00
Apr 7 11:58:48 box kernel: [71534.789910] sr 1:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Apr 7 11:58:48 box kernel: [71534.789921] sr 1:0:0:0: [sr0] Sense Key : Illegal Request [current]
Apr 7 11:58:48 box kernel: [71534.789931] sr 1:0:0:0: [sr0] Add. Sense: Logical block address out of range
Apr 7 11:58:48 box kernel: [71534.789942] sr 1:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 00 00 00 02 00
Apr 7 12:10:38 box kernel: [72245.143338] sr 1:0:0:0: [sr0] Unhandled sense code
Apr 7 12:10:38 box kernel: [72245.143347] sr 1:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Apr 7 12:10:38 box kernel: [72245.143356] sr 1:0:0:0: [sr0] Sense Key : Medium Error [current]
Apr 7 12:10:38 box kernel: [72245.143367] sr 1:0:0:0: [sr0] Add. Sense: L-EC uncorrectable error
Apr 7 12:10:38 box kernel: [72245.143378] sr 1:0:0:0: [sr0] CDB: Read(10): 28 00 00 05 6a 50 00 00 02 00
Apr 7 12:10:38 box kernel: [72245.144761] __ratelimit: 506 callbacks suppressed
Apr 7 12:10:43 box kernel: [72249.989290] sr 1:0:0:0: [sr0] Unhandled sense code
Apr 7 12:10:43 box kernel: [72249.989299] sr 1:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Apr 7 12:10:43 box kernel: [72249.989308] sr 1:0:0:0: [sr0] Sense Key : Medium Error [current]
Apr 7 12:10:43 box kernel: [72249.989319] sr 1:0:0:0: [sr0] Add. Sense: L-EC uncorrectable error
Apr 7 12:10:43 box kernel: [72249.989329] sr 1:0:0:0: [sr0] CDB: Read(10): 28 00 00 05 6a 50 00 00 02 00
Apr 7 12:10:48 box kernel: [72254.834402] sr 1:0:0:0: [sr0] Unhandled sense code
Apr 7 12:10:48 box kernel: [72254.834412] sr 1:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Apr 7 12:10:48 box kernel: [72254.834421] sr 1:0:0:0: [sr0] Sense Key : Medium Error [current]
Apr 7 12:10:48 box kernel: [72254.834432] sr 1:0:0:0: [sr0] Add. Sense: L-EC uncorrectable error
Apr 7 12:10:48 box kernel: [72254.834442] sr 1:0:0:0: [sr0] CDB: Read(10): 28 00 00 05 6a 50 00 00 02 00
Apr 7 12:10:53 box kernel: [72259.755456] sr 1:0:0:0: [sr0] Unhandled sense code
Apr 7 12:10:53 box kernel: [72259.755465] sr 1:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Apr 7 12:10:53 box kernel: [72259.755475] sr 1:0:0:0: [sr0] Sense Key : Medium Error [current]
Apr 7 12:10:53 box kernel: [72259.755485] sr 1:0:0:0: [sr0] Add. Sense: L-EC uncorrectable error
Apr 7 12:10:53 box kernel: [72259.755496] sr 1:0:0:0: [sr0] CDB: Read(10): 28 00 00 05 6a 50 00 00 02 00
monit example tutorial how to enable status checking and manipulation
You need to enable the httpd daemon with monit to actually view the status and control, it's not only for the web interface since the httpd is the ONLY way of controlling monit and viewing the status.
monit monitor all will also reinstate disabled services if they've timed out too much. Just restarting the service will do nothing to re-monitor a service that monit has stopped monitoring due to too many failures.
*Also note that /etc/monit.conf is what is used for configuring all parameters, the monitrc file seems to be deprecated, this includes setting the daemon time:
monit -c /etc/monitrc status
monit: The control file '/etc/monitrc' must have permissions no more than -rwx------ (0700); right now permissions are -rw-r--r-- (0644).
[root@boxhost vhosts]# chmod 700 /etc/monitrc
[root@boxhost vhosts]# monit -c /etc/monitrc status
monit: generated unique Monit id f9a36510746eba21b0ec9418de8850d5 and stored to '/root/.monit.id'
monit: error connecting to the monit daemon
[root@boxhost vhosts]# monit -c /etc/monitrc status
monit: error connecting to the monit daemon
edit /etc/monit.conf:
set httpd port 2812
allow localhost
service monit restart
diff: memory exhausted
I don't have a solution other than to use rsync, I used diff on about 1.7TB of data which includes hundreds of thousands if not millions of small files to ensure nothing was missing or corrupt.
diff didn't even get past the first large directory without spitting that error out.
Keep in mind I used "diff -r" because that means recursive, otherwise it wouldn't compare all files and subdirectories and would be a false way of doing it.
2011 Best Laptop - HP 15.6" Laptop featuring AMD Athlon II P340 Processor (G62-420CA)
My mother needed a new laptop and I recommended her the same one I would have bought myself or my wife, that means the cheapest possible laptop with the most features for the money.
This HP shines at this price point and one thing that made me stay away from buying more and recommending HP/Compaq was the poor battery life. Not anymore, this model has an industry leading up to 4 hours of battery life.
Key Factors for Choosing It:
- HDMI Out
- Radeon 4250 HD Graphics (no Intel, I hate Intel graphics)
- Price
- Card Reader
- Webcam Mic
- 4 Hour Battery Life
- Best Value Overall Performance vs Features
- AMD-V Hardware Virtualization
- Dual Core/High Performance AMD CPU
- 4Gigs of RAM
- 500GB HDD
You can get a great deal like this and anyone who knows the specs properly can too. For $399.99 CAD on sale you can't beat these features, typically they make you pay for more expensive laptops that offer little more for the high price just to get that builti-in cardreader and HDMI out you can pay hundreds more.
This is a budget/value laptop but I don't see why you'd need to spend more, this laptop is powerful and can handle decent gaming with the ATI 4250 Graphics card. It's not worth spending 2-3x more when this does the job well.
My philosophy with computer hardware is to spend the least amount of money but get the most for it (shop smart). A dollar saved today is worth $2-3 down the road because of how far technology progresses. That and I keep in mind that laptops don't often last long and weren't designed to (there's no way they couldn't find a better way to cool laptops and prevent a single vent from causing a motherboard meltdown).
Processor |
|||
pgina can't login after installing
After Installing pgina I couldn't login to Windows anymore with my blank password Administrator account!
An unknown error has prevented your account from being created.nrThis may be due to policy or security settings as well as other machine configuration.nrPlease consult your administrator.
Hit F8 to start Windows in Safe Mode and you can login normally and then remove PGina, it shouldn't cause this problem or behavior out of the box.
Convert PDF to JPG/JPEG without low resolution/small picture size
convert -density 400 somepdf.pdf -scale 2000x1000 output.jpg
The key is the "-density 400" switch and also -scale 2000x1000
To give credit I found the solution here: http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=10928
That was the perfect solution when I was frustrated with how small the resulting JPG's resulted. I'm sure this will help a lot of people when it comes time to converting a PDF to JPG which I'm amazed ImageMagick can do. It has got to be one of the best utilies of all time in my opinion.
Drupal 6.2 Install and how to move install to root/non-subdirectory
drup 6.2 install
$cd drupgoodinst3883/
[ drupgoodinst3883]$ ls
CHANGELOG.txt cron.php index.php INSTALL.pgsql.txt INSTALL.txt MAINTAINERS.txt modules robots.txt sites update.php xmlrpc.php
COPYRIGHT.txt includes INSTALL.mysql.txt install.php LICENSE.txt misc profiles scripts themes UPGRADE.txt
[ drupgoodinst3883]$ ls sites/default/default.settings.php
[ drupgoodinst3883]$ cd sites/default/
#The Drupal installer requires write permissions to ./sites/default/settings.php during the installation process. If you are unsure how to grant file
#permissions, please consult the on-line handbook.
[ default]$ cp default.settings.php settings.php
mkdir files; chmod 777 files
chmod 777 settings.php
Move Drupal Install to Root and not a Subdirectory
- Copy the contents of the directory where you installed drupal to the main root of your site eg. /var/www/vhosts/yoursite.com/
- Manually copy the .htaccess file from your Drupal install (this is the only real requirement for moving your Drupal installation -or you'll get lots of weird errors/things won't work right).
Yahoo Mail (email) DNS Server Out Of Date Problems
I don't expect this to be solved soon but some of Yahoo's DNS servers are out of whack. I changed the IPs of some nameservers of some domains and now most Yahoo users can't e-mail to those domains!
As you can see below by the "No MX or A records for mychangedomain.com", now Yahoo's DNS/mailserver DNS cache is wrong. You would think they would at least have cached the old incorrect records, but instead for some reason their DNS cache has no entry and doesn't seem to want to update itself. Hotmail and Gmail all work fine, and some Yahoo users (probably on different nodes with different DNS) are able to e-mail me. These DNS changes were now done over 2 months ago so it's not simply a matter of slow propagation time to Yahoo DNS Servers.
I'm sure that I'm not the only one, other sysadmins who have changed nameservers IPs may have noticed this. Basically when you send an e-mail to the affected domains you'll get a bounceback like below (it may take minutes, hours or days to get the bounceback).
This is a real annoyance since many people use Yahoo mail.
I actually contacted them about it and nothing was done but I did receive some sort of template/automated response that the issue was forwarded and escalated. I never heard anything further for days and then I sent followup e-mails and not only were they ignored but suddenly my Yahoo mail account was inaccessible.
Failure Notice
...
From:
"MAILER-DAEMON@nm19.bullet.mail.ne1.yahoo.com" <MAILER-DAEMON@nm19.bullet.mail.ne1.yahoo.com> [Chat now]
...
Add to Contacts
Sorry, we were unable to deliver your message to the following address.
<user@mychangedomain.com>:
No MX or A records for mychangedomain.com
--- Below this line is a copy of the message.
Received: from [98.138.90.55] by nm19.bullet.mail.ne1.yahoo.com with NNFMP; 28 Mar 2011 08:41:39 -0000
Received: from [98.138.87.2] by tm8.bullet.mail.ne1.yahoo.com with NNFMP; 28 Mar 2011 08:41:36 -0000
Received: from [127.0.0.1] by omp1002.mail.ne1.yahoo.com with NNFMP; 28 Mar 2011 08:41:36 -0000
X-Yahoo-Newman-Property: ymail-3
X-Yahoo-Newman-Id: 85723.72865.bm@omp1002.mail.ne1.yahoo.com
Received: (qmail 42791 invoked by uid 60001); 28 Mar 2011 08:41:35 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1301301695; bh=wx4RiKYlHcoyZoYUjZHx8K6MF8wQ1K/sbLsQjPLE5fI=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=duaEA/s3E70zLsLXgcHeILphV9fGNuHEIqV48rEIBzGFNd8gPyAxOXO5tKI2zO1EM8OBzd1Ou8VzfqF3vvrhYSGzt75O77/8flKR4IRmaUXwlzNHtp4oAKiDumZ879lHl7VOraxI13IM6CdKeATCEYM06Msfb5aosC4mHa1c6Is=
DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws;
s=s1024; d=yahoo.com;
h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type;
b=2qG7JakvDlcjFHS9vFXNmqab4QgyFrOkMe0eLUoXPssnnBG02sjzLMHFi1GRGs98cp79leYqHO6yYDXUBvgtiZSrrRYrXFuqfizKsLny9zJ5bQMMq4T4U9vtmNFXvL9Xk7tMtY0DZtegjinomTOVpKua18hS4XgiWYjT9gEFTvI=;
Message-ID: <879745.46782.qm@web121610.mail.ne1.yahoo.com>
X-YMail-OSG: PTsb7J4VM1n3oxK5NWarlmnFuvB5Y7RUEpEwGcKVbkB04D1
PBHJG_VPG.LWruo8SSbcUFN4vLR6Af1WLJTBZdqcBDyPejFfqYX13wqZwMHq
OIdgxtoApIixpHmBBaBunDAcEX.HVVGgI4amFS6ZQK4BAx0xzyP0bmBFPOvO
3K6k23pTJkWD_25X113W2r0j2ryNTE9JwIVWxEepLdiEImFt0DAsnxbnE2zX
oKsVh4hYsVrv7ciLPBPDUhtbuZPPBiV0B_izYKV0IUJnlSJ066ny4Ipm9cd1
MRhoYVDkwWIJo9T_GUP7KDirCnY9vbBLgyuXJ3u7fkA--
Received: from [] by web121610.mail.ne1.yahoo.com via HTTP; Mon, 28 Mar 2011 01:41:35 PDT
X-Mailer: YahooMailRC/559 YahooMailWebService/0.8.109.295617
Linux High IOWAIT updatedb can't be killed and crash with mdadm
high IO wait
424 root 39 19 1900 848 552 D 0.0 0.0 0:00.91 updatedb
root 424 0.0 0.0 1900 848 ? DN Mar11 0:00 /usr/bin/updatedb -f sysfs?rootfs?bdev?proc?cpuset?binfmt_misc?debugfs?sockfs?usbfs?pipefs?anon_inodefs?futexfs?tmpfs?inotifyfs?eventpollfs?devpts?ramfs?hugetlbfs?mqueue?rpc_pipefs?autofs
root 2907 0.0 0.0 1768 492 ? DN Mar15 0:00 /usr/bin/updatedb -f sysfs?rootfs?bdev?proc?cpuset?binfmt_misc?debugfs?sockfs?usbfs?pipefs?anon_inodefs?futexfs?tmpfs?inotifyfs?eventpollfs?devpts?ramfs?hugetlbfs?mqueue?rpc_pipefs?autofs
root 8691 0.0 0.0 1768 492 ? DN Mar12 0:00 /usr/bin/updatedb -f sysfs?rootfs?bdev?proc?cpuset?binfmt_misc?debugfs?sockfs?usbfs?pipefs?anon_inodefs?futexfs?tmpfs?inotifyfs?eventpollfs?devpts?ramfs?hugetlbfs?mqueue?rpc_pipefs?autofs
root 10642 0.0 0.0 4004 696 pts/0 S+ 00:38 0:00 grep updatedb
root 14937 0.0 0.0 1768 492 ? DN Mar16 0:00 /usr/bin/updatedb -f sysfs?rootfs?bdev?proc?cpuset?binfmt_misc?debugfs?sockfs?usbfs?pipefs?anon_inodefs?futexfs?tmpfs?inotifyfs?eventpollfs?devpts?ramfs?hugetlbfs?mqueue?rpc_pipefs?autofs
root 16697 0.0 0.0 1768 488 ? DN Mar13 0:00 /usr/bin/updatedb -f sysfs?rootfs?bdev?proc?cpuset?binfmt_misc?debugfs?sockfs?usbfs?pipefs?anon_inodefs?futexfs?tmpfs?inotifyfs?eventpollfs?devpts?ramfs?hugetlbfs?mqueue?rpc_pipefs?autofs
root 18790 0.0 0.0 1768 496 ? DN Mar18 0:00 /usr/bin/updatedb -f sysfs?rootfs?bdev?proc?cpuset?binfmt_misc?debugfs?sockfs?usbfs?pipefs?anon_inodefs?futexfs?tmpfs?inotifyfs?eventpollfs?devpts?ramfs?hugetlbfs?mqueue?rpc_pipefs?autofs
root 24783 0.0 0.0 1768 500 ? DN Mar14 0:00 /usr/bin/updatedb -f sysfs?rootfs?bdev?proc?cpuset?binfmt_misc?debugfs?sockfs?usbfs?pipefs?anon_inodefs?futexfs?tmpfs?inotifyfs?eventpollfs?devpts?ramfs?hugetlbfs?mqueue?rpc_pipefs?autofs
root 24922 0.0 0.0 1768 492 ? DN Mar17 0:00 /usr/bin/updatedb -f sysfs?rootfs?bdev?proc?cpuset?binfmt_misc?debugfs?sockfs?usbfs?pipefs?anon_inodefs?futexfs?tmpfs?inotifyfs?eventpollfs?devpts?ramfs?hugetlbfs?mqueue?rpc_pipefs?autofs
root 29655 0.0 0.0 1768 496 ? DN Mar19 0:00 /usr/bin/updatedb -f sysfs?rootfs?bdev?proc?cpuset?binfmt_misc?debugfs?sockfs?usbfs?pipefs?anon_inodefs?futexfs?tmpfs?inotifyfs?eventpollfs?devpts?ramfs?hugetlbfs?mqueue?rpc_pipefs?autofs
I noticed that updatedb was running for days and then this dmesg message:
(manually killing the process and also killall updatedb does not stop it or kill it)
INFO: task updatedb:424 blocked for more than 300 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
updatedb D F79C8CF0 6476 424 419 (NOTLB)
e740bdd4 00000086 c30045c0 000e2832 f7acea4c 00000001 f79c8cf0 c30f8800
000e2832 000f4240 556bd125 0024f991 f79c8e14 f7d14000 556bf321 0024f991
00000002 00000000 00000001 00000000 c0419058 f7d14000 c06ecd80 f7a0cdec
Call Trace:
[<c0419058>] __wake_up+0x2a/0x3d
[<c0625676>] io_schedule+0x3b/0x64
[<c0460ead>] sync_page+0x0/0x3b
[<c0460ee5>] sync_page+0x38/0x3b
[<c062578e>] __wait_on_bit_lock+0x2a/0x52
[<c0460e28>] __lock_page+0x52/0x59
[<c0436000>] wake_bit_function+0x0/0x3c
[<c04686c9>] truncate_inode_pages_range+0x20b/0x260
[<f8c698d3>] journal_stop+0x208/0x213 [jbd]
[<c0468727>] truncate_inode_pages+0x9/0xe
[<f8ca5a1e>] ext3_delete_inode+0x13/0xba [ext3]
[<f8ca5a0b>] ext3_delete_inode+0x0/0xba [ext3]
[<c0499c51>] generic_delete_inode+0x91/0xfe
[<c0499728>] iput+0x67/0x69
[<c04970dd>] d_kill+0x19/0x32
[<c049821d>] dput+0x19f/0x1ac
[<c04909c3>] sys_renameat+0x15f/0x1af
[<c04ebb8e>] _atomic_dec_and_lock+0x2a/0x44
[<c0453cf8>] audit_syscall_entry+0x160/0x192
[<c0490a24>] sys_rename+0x11/0x15
[<c06289e7>] syscall_call+0x7/0xb
=======================
kill -9 424
strace -p 424
Process 424 attached - interrupt to quit
attach: ptrace(PTRACE_ATTACH, ...): Operation not permitted
==========================
Eventually the system crashed with references to ext3 and inodes etc..
After a reboot it did the following:
md: md0: raid array is not clean -- starting background reconstruction
raid1: raid set md0 active with 2 out of 2 mirrors
md: ... autorun DONE.
md: syncing RAID array md0
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
md: minimum _guaranteed_ reconstruction speed: 1000 KB/sec/disc.
md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for reconstruction.
md: using 128k window, over a total of 511999424 blocks.
EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access will be enabled during recovery.
kjournald starting. Commit interval 5 seconds
EXT3-fs: md0: orphan cleanup on readonly fs
ext3_orphan_cleanup: deleting unreferenced inode 97467990
ext3_orphan_cleanup: deleting unreferenced inode 76153118
EXT3-fs: md0: 2 orphan inodes deleted
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
Santrex Review Scam Complaint - Stole My Money Fraud
Santrex Review/Scam/Complaint
- Santrex never provided any working server, I believe it was just a dummy management Solus server because the server said it was booted but never connected to the console. I complained to them and eventually the support admitted the server was not working and to wait for 24 hours. I waited for 4-days, after which they sent an e-mail saying my service was being disabled for SPAM ...(when SolusVM shows 0kb of traffic). They aren't fazed by threats since their reputation couldn't get any worse. They escalated the PayPal dispute after we provided our evidence and screenshots, along with proof that this case is not unique.
Santrex is widely known as not only a company that does not provide what the customer asks, but when they do provide something it is often out of spec or an extremely poor and unreliable service with fees being stolen due to phony TOS violations.
I thought I'd add it's ironic that they make up phony TOS SPAM notices to steal money and yet they are actually SPAMMERS themselves (if you use RBL's you'll probably find their e-mails blocked):
* 2.5 URIBL_SBL Contains an URL listed in the SBL blocklist * [URIs: santrex.net]
Here are links to Santrex complaints/reviews/scams that tell a similar story about Santrex:
www.thedave.ca/geek/santrex-net-worst-hosting-company-on-the-planet/comment-page-1/#comment-2350
www.web-hosting-top.com/web-hosting/web-hosting-top.santrex.net/
www.freeindex.co.uk/profile%28santrex-internet-services%29_77491.htm
forums.digitalpoint.com/showthread.php
Report Santrex to the local UK government by filling out this simple form (eventually they will be shut down if we all complain):
http://www.tradingstandards.gov.uk/towerhamlets/complain.htm
Santrex Scam Proof

Firefox Download Error - /tmp/J_5JHKXU.bin.part could not be saved, because the source file could not be read. Try again later, or contact the server administrator.
/tmp/J_5JHKXU.bin.part could not be saved, because the source file could not be read.
Try again later, or contact the server administrator.
This is actually not a download problem related to the server/site you're using but actually some weird bug with Firefox. I know because no matter what site I tried to download from this error kept happening.
Simpy restarting Firefox was enough to get things working again.
Virpus Review/Scam/Complaint
Virpus Review/Scam/Complaint
- Virpus is advertised on LEB (lowendbox.com). My initial payment was refunded after days of not receiving the VPS, but two subscrption payments went through and I only received notification after the second one. They ignored the requests in the ticket and by e-mail for a refund and even escalated the PayPal dispute that "we're assuming this is for a service that was provided" (when they obviously know otherwise by their own system).
Virpus is known to take money from customers by also falsely claiming TOS violations, and aside from that is known to lose customer data and be extremely unreliable.
You can see my account status in the screen below, it clearly shows a credit balance yet Virpus ignored my requests for a refund and even lied to PayPal and said the service was provided.
Virpus Networks Scam Proof

Links to Virpus complaints/reviews/scams:
www.blackhatworld.com/blackhat-seo/shit-list/257359-virpus-scammed-me-proof-scam-method-inside.html
95th Percentile Billing vs Usage Billing, what's better?
There are all kinds of threads and links on the internet, and this seems to be a contentious issue but I don't know why.
95th percentile is either a good deal for some or a big rip off for others, I just said it there :)
But the reality is that for MOST people who transfer low amounts of data but burst to higher speeds such as 40mbit+ even for short periods of time, then you'll pay a lot of money to do that.
Basically 95th percentile is an-old archaic method of billing and valuing data. Why wouldn't it always be according to usage? Well because most providers pay by 95th percentile so they like to pass on the same model to the customer.
It makes far more sense to charge per mbit in the sense that 1mbit = 322GB of data bursting at whatever port speed you have or just the equivalent rate in GB, but of course that wouldn't be profitable. With 95th percentile it's easy to pay for several times more data than you actually transferred and used. Imagine if you payed more for power or water just because you used a lot of power for short periods of time even though your overall usage is miniscule?
If you can find a co-lo provider that gives you 1-2TB of flat data, that's a great deal compared to 95th percentile. I'm so annoyed by 95th percentile that I'm considering on switching to another provider that works this way. You'll find 9/10 people who arrogantly and rudely broadcast their thoughts about 95th percentile are people that stand to benefit by billing that way and don't want people to think otherwise.
Real Life Example of Colo Client
This is why I don't see how 95th benefits anyone but the ISP.
Look at the exampe below.
| Interface | Current Rate | Max Rate | 95th % | |||||
|---|---|---|---|---|---|---|---|---|
| Name | Description | Router | In (Mbps) | Out (Mbps) | In | Out | In | Out |
| 0.63 | 0.21 | 20.81 | 8.28 | 1.66 | 1.11 | |||
Only .63 mbit was transferred out and only .21 mbit was transferred in.
This is a total transfer of .84mbit which is about 270 GB of actual data transfer.
But you don't get billed for the .84mbit. You get billed for the 95th percentile (1.66mbit) which ends up being more than twice the cost of actual data usage and transfer.
The 95th percentile in essence ends up double charging you based on how much data you transfer and how fast you transfer it (burst rate). I can't see any possible situation where it would save you money, nor do is it fair or beneficial to the customer to pay for bursting, it should be based on usage. If a 100mbit port speed is provided, you shouldn't be penalized for using it too quickly, but only for how much
Here's some articles on 95th percentile:
http://webdesign.about.com/od/colocation/a/aa012405.htm
http://www.antonolsen.com/2007/07/18/95th-percentile-bandwidth-tracking/
http://www.ocmodshop.com/ocmodshop.aspx?a=363&p=987
Virtualbox - Failed to open a session for the virtual machine XP. AMD-V is being used by another hypervisor. (VERR_SVM_IN_USE). - Solution
Failed to open a session for the virtual machine XP.
AMD-V is being used by another hypervisor. (VERR_SVM_IN_USE).
VirtualBox can't enable the AMD-V extension. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_SVM_IN_USE)
Solution - Unload KVM module (you can't use two hardware virtualization suites at once)
sudo rmmod kvm_amd kvm