Skip to content

Linux: Aligning partitions to a (hardware) RAID stripe

August 23, 2011

Note: This article isn’t finished. It got really long so I was going to split it and do a separate part on optimized formatting; that hasn’t happened yet ;). For now it is just a brain-dump on the topic, so if you’re short on time just do some searching and see if what you need is here!–

Simply put, aligning your partitions to your hardware RAID stripe cannot be over-emphasized. Granted, the idea that this tweak will make your storage twice as fast is ridiculous. However the idea that a failure to implement this tweak will rob you of 10% to 40% of performance in many disk metrics, is more or less irrefutable. This is true under most environments, but this article will deal with how to achieve this feat using hardware RAID under Linux. Once that is done we’ll look at optimized formatting with the ext filesystem in a later article. Read more…

Advertisements

Linux: (MySQL) “Access denied for user ‘debian-sys-maint’@’localhost’”

July 21, 2011

So I got this error; looks like a lot of people get it, actually. Apparently it can be caused by moving tables from one server to another. I didn’t get too in depth on this one but ‘debian-sys-maint’ is a user in your mysql privileges that makes /etc/init.d/mysql work right. The current password can be found if you `sudo cat /etc/mysql/debian.cnf`. Then take what it gives you and `mysql -u root -p` (and give it the root password), and then run these with the password you found:

GRANT SHUTDOWN ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'The password you find';

GRANT SELECT ON `mysql`.`user` TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'The password you find';

Note that the passwords in the two commands will be the same since it is for the same user. This is the lowest impact solution I’ve found, and might even just update the permissions to be exactly as they were. Many goofballs try to GRANT ALL. Not good. Let me know in the comments if you know of a better fix.

Don’t forget to flush privs or restart MySQL before seeing if it worked!

Windows Server: ADModify rocks

June 25, 2011

Some months ago I was working on getting OTRS to link up to our Active Directory data and I never did post anything about a great tool I found in the process that can modify AD object attributes really easily. So I’m here to do it now…

Back when I first set up our AD a few years ago the method I was using to create new accounts caused the CN in AD to be the same as the sAMAccountName, or the user’s plain Windows username (i.e.: not DOMAIN\bob or bob@domain, just plain bob). Later on I got more consistent and was setting many more of the fields and this caused those users to have a CN such as ‘Firstname Lastname’.

I decided I was tired of looking at two versions of CN syntax and set out to correct it. Read more…

Linux: /etc/init.d/networking restart warning message

June 8, 2011

Today I was doing some legwork on a new Ubuntu 11.04 container and got a warning when I restarted networking. We’re still using 8.04LTS so I’m looking at the path forward. I think I’m going to go to 10.04LTS instead of 11.04, but based on when the move to Upstart was done it probably gives this message too. Anyway…

When I ran “/etc/init.d/networking restart” I got this error:

 * Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces

Read more…

Linux: How openvz templates all have unique ssh host keys (more info on last post)

June 8, 2011

In my last post I was having to regenerate some ssh host keys because I edited an openvz template and then accidentally copied its keys to all of the resulting hosts. Somehow the initial template didn’t have this issue. My interim fix was to delete the keys from my version of the template and that broke SSH until I entered the container and regenerated them manually on each new host. Read more…

Linux: Generate (or regenerate) host keys for sshd

May 24, 2011

A few weeks back I realized that all of my openvz containers were using the same host keys for ssh. Fail.

I got tipped off to check on this issue while doing some related reading on the openvz wiki… about what not to do when making openvz containers; lest your keys all be the same. 😉

The fix I found was to run two commands to regenerate the RSA and DSA host keys. Read more…

MS Office: Excel 2010 crashes when trying to use data sorting feature

April 19, 2011

Today I got a support ticket from our one and only (so far) Office 2010 user. Her Excel was crashing when she tried to sort data. This was what I found in the Event Viewer:

Faulting application excel.exe, version 14.0.5130.5003, stamp 4d3061c8, faulting module mso.dll, version 14.0.5128.5000, stamp 4caf84cd, debug? 0, fault address 0x006a46e2.

A bit of googling suggested she wasn’t alone, and that a lot of people with the issue were editing .xls files (97-2003) in Compatibility Mode when the crash occurred (sometimes repeatedly). There was some suggestion that saving in .xlsx would stop the crashes, and it did. Read more…