Techie
Rebuild FreePBX (CentOS 5) Software RAID after hard drive failure
by Logan Rogers-Follis on Feb.02, 2014, under Techie
I was testing how well FreePBX 5.211.65-5 (Asterisk 11) would deal with loosing a drive. After unplugging the drive and finding that it boots fine, I reconnected the drive an assumed it would re-sync the Software RAID. Sadly that did not happen and when looking at System Admin -> Storage I saw sdb green, then another sdb in red. After some hunting online I found the following solution:
Via Console/SSH:
See the status of the RAID by:
cat /proc/mdstat
I noticed that md0 and md2 were only 2/1 drives and that sda1 and sda3 (respectively) were missing, but md1 had sda2 and sdb2 listed fine.
I then ran the following two commands and waited for the Software RAID to resync/recover:
mdadm /dev/md0 --add /dev/sda1
mdadm /dev/md2 --add /dev/sda3
Now if I run
cat /proc/mdstat
It shows they are waiting to resync and one is currently in recovery state.
NOTE: Remember lsblk
is your friend when you are unsure of what drives are part of which RAID.
Windows XP Autologon (and Vista)
by Logan Rogers-Follis on Jan.18, 2014, under Techie
- Click Start, and then click Run.
- Type “control userpasswords2”, and then click OK.
- Uncheck the “Users must enter a user name and password to use this computer” check box, and then click Apply.
- You will then be prompted to type int he Administrator password. Type it in twice and click OK
- Click OK to close the User Accounts window.
WordPress site loading slow / high server load
by Logan Rogers-Follis on Jan.13, 2014, under Techie
Recently noticed a in-dev WordPress sites I work on calling “POST /wp-cron.php?doing_wp_cron” a lot and in turn the server load jumps up (15.0 at times!). After a lot of digging around I decided it wasn’t something like WP Super Cache glitching since they don’t use that Plug-in.
After a lot of Google searching I found out how to just disable the wp-cron.php from running every time a page is called. As I understand this is NOT something you want to do if the WordPress is updated a lot as a blog site, but since this one isn’t I figured setting it to manually run wp-cron.php every 6 hours might be best.
A quick synapse of what the link above will show:
edit the wp-config.php and add “define(‘DISABLE_WP_CRON’, ‘true’);” under the following line:
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
Then setup a cronjob via cPanel (or whatever Control Panel you use; even crontab if need be) to run the following (every 6 hours should be good):
php -q /home/username/public_html/wp-cron.php
NOTE: Of course adjust the path accordingly.
As a side note. I noted that at time the page would load slow for the first time (since the site is in DEV not a lot of traffic – well aside from BOTS which create a lot of HTTP lately) and sometimes would be so slow it would create a “lfd on server.domain.ext: Suspicious process running under user username” e-mail telling me that different .php files (index.php, admin-ajax.php, etc.) were running for too long.
Network drives going offline, but showing online – Windows 7 (64-bit, SP1)
by Logan Rogers-Follis on Dec.30, 2013, under Techie
I ran into a problem after reloading my new SSD and directly mapping my Documents, Videos, Music, etc. to my unRAID network shares. The share where these folders are is listed as “Always available offline” so I can ensure I have a local cache in case of a network or unRAID failure. The They would show online everywhere EXCEPT when I was playing a game (Bioshock 2 in this case) that put it’s save files in Documents\…\… it would error as it had trouble creating the save or reading current saves. I would also see issues with GameSave Manager when it would try to backup my saves, but if I would click on “Open Archives” and then scroll down to where my Computer listed all my network drives I would see the red X next to them and simply clicking on them would make it all work again.
So far most articles I fine relate to Windows 7 using a DFS network share, but in my case it’s a stand-alone network. I am testing the below Solutions (#2) that I found at http://www.syswow64.co.uk/2012/09/windows-7-offline-files-will-not-go.html
Option 2 Configure Forced silent auto reconnection
1. Click Start, type REGEDIT in search bar, and then click OK.
2. Locate and click the following registry subkey:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\NetCache3. Click Edit, point to New, and then click DWORD Value.
4. Type SilentForcedAutoReconnect, and then press ENTER to name the value.
5. Double-click SilentForcedAutoReconnect.
6. In the Value data box, type 1, and then click OK.
Will see if this helps or not.
NOTE: In my Network Adapter settings I have all options that are default enable. I also removed IPv6 support though since my LAN doesn’t need IPv6.
Non-UAC friendly apps annoying you in Windows 7/8? ElevatedShortcut!
by Logan Rogers-Follis on Dec.20, 2013, under Techie
(Search) Everything! and RealTemp were annoying me since they aren’t UAC friendly. A bit of search and I found ElevatedShortcut which works great for Windows 7 (at least) and is suppose to be just as good on Windows 8. Perfect way to keep from being annoyed by commonly used (non-UAC friendly) apps while keeping the notification level set at defaults.