Reputation
5,116
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
1 10 28
Newest
 Enlightened
Impact
~331k people reached

Dec
23
comment Can you restore Windows from a file system backup?
Ah, fair point, @Bob. Yes, I was basing my answer on an unfounded assumption—that he had a proper backup (one that does things like preserving permissions and whatever-the-hell-Windows-calls-inodes) and was restoring just the \Windows directory off of that. Indeed, the OP has now clarified that that is not the case. So, yeah, if he's just copying in bare files? It might boot, but I doubt it.
Dec
23
comment Can you restore Windows from a file system backup?
Reserved blocks are for filesystem metadata. The only thing that might (ab)use them to store relevant data would be copy-protection, and you can always fix that once the machine's up. I mentioned the partition table, but even for a GPT, that's hilariously small and can be resurrected by a bit of simple disk inspection. That leaves only the MBR, which is 512 bytes of bog-standard code that hasn't changed in a very long time, or a few more bytes for a GPT. Copying the files and then repairing atop them is a smart course of action, though. That'll solve any FS issues directly.
Dec
23
comment Can you restore Windows from a file system backup?
@Wesley: Even given my rephrasing of the question? If the only thing gone sideways is the contents of \Windows, why wouldn't it work to restore just that one directory?
Sep
19
comment “ssh root@server” hangs forever
This is the most thorough option. -o ConnectTimeout=x and -o BatchMode=yes will both help, but nothing beats timeout for covering 100% of cases, even ssh client code failure! Though you really shouldn't kill -9 here; there's no need for the -9.
Aug
18
comment Is it possible to move MySQL to different hosting using replication?
--single-transaction is safe to use even in the presence of MyISAM. It will transparently downgrade to --lock-tables as needed, and do --single-transaction for the InnoDB ones. Though, honestly, if you're running MyISAM, you should take this opportunity to switch to InnoDB, anyway. One caveat with all of this: note that the mysql database has some funny bits in it, in particular things like permissions. Be careful that you don't lock yourself out in the course of importing the old host's data! You may also have some trouble if you're switching versions (e.g. 5.0 to 5.6).
Feb
26
comment Varnish as a cache proxy on openshift-online : openshift limits number of requests from same IP?
Sure, okay, that could happen if you have a cached copy eligible to be served to your loopback connection, whereas your browser was unable to hit the backend. That would require you to have configured backend health checking in your Varnish VCL, though; by default, Varnish doesn't monitor backend health. If you can get it to happen again, varnishlog output would tell you exact how and why Varnish is routing (or not) the request. You can also check the "Age" header you are receiving, or add a cachebreaker (e.g. ?abc123) to the URL, to make sure you aren't getting a cached response.
Jan
13
comment System not being able to handle soft interrupts but having idle time?
At the risk of being dismissive of your question, I want to clarify: ksoftirqd doesn't indicate that soft IRQs are being missed, it indicates that soft IRQs are happening often. In fact, ksoftirqd running is an indication that soft IRQs are not being missed!
Jan
13
comment Apex ANAME / ALIAS record in Windows Server 2012 R2 DNS Manager
Yes, SRV is lower in the list, but the selection logic is rather complicated; if Outlook doesn't like the answer it gets from an earlier stage, it'll try later ones, and then circle back to the original if it can't find a complete answer from those later stages. Certificate mismatches are an example of this, if I recall correctly; if it finds Autodiscover.xml but it has a cert mismatch, it'll keep going to see if it can find it without a cert mismatch, and if so, it'll present the latter.
Dec
3
comment How might I cancel scheduled downtime on Nagios
Fair point. Deleting a downtime, however, has a far larger effect on reports, no?
Nov
21
comment Mysqld.bin and php-fpm eating up all my CPU
For what it's worth, in APC's default (apc.ttl=0), it actually clears the whole cache.
Oct
28
comment rm on a directory with millions of files
It's causing all that I/O simply by being more efficient, though! The globbing is all front-loaded for your example (that is, the full list of files is generated before the first rm happens), so you have relatively efficient I/O at startup from that, followed by painful, out-of-order rms that probably don't cause much I/O, but involve scandir walking the directory repeatedly (not causing I/O because that's already been loaded into block cache; see also vfs_cache_pressure). If you'd like to slow things down, ionice is an option, but I'd probably use fractional-second sleeps.
Oct
10
comment CentOS server priority of root services and non root services
Can you please expand on "it hangs the entire server and needs a hard reboot"? Does the server stop responding to SSH? The console goes dark and cannot be woken back up? Pings get dropped? Power supply catches on fire?
Oct
10
comment rm on a directory with millions of files
You're being eaten alive by globbing. How about something more like: find /u* -maxdepth 3 -mindepth 3 -type d -path '*/app/*' -name diag -print0 | xargs -0I = find = -mindepth 4 -maxdepth 4 -type d -name 'trace' -print0 | xargs -0I = find = -mindepth 1 -maxdepth 1 -name '*.tr' ? Add -delete to the last one to actually delete things; as written, it just lists what it would delete. Note that this is optimized for circumstances where you have a lot of uninteresting things in nearby directories; if that's not the case, you can simplify the logic a great deal.
Oct
7
comment nginx + varnish, optimize caching urls for ssl and not
Thanks for spotting that. Fixed!
Oct
6
comment nginx + varnish, optimize caching urls for ssl and not
Boernie: Ah, you mean the scheme that is INSIDE of the req.url (.../http/example.com:80/... versus .../https/example.com:443/...). Code updated.
Oct
6
comment Implement HTTPS in with pfSense, Varnish and Tomcat
No; Varnish doesn't speak SSL. It must be plain HTTP when it reaches Varnish (notwithstanding the CONNECT verb, but even that is HTTP, albeit weird HTTP). The most common approach is to use something like Pound or nginx to unwrap the SSL off of the HTTP before it hits Varnish. I've added a relevant link to my answer, above.
Oct
6
comment How to disable AAAA lookups?
Lastly: for what it's worth, I'd solve this by running a DNS cache on localhost (as you reference, above). It'd be a heckuva lot easier to maintain your own, hacked DNS proxy/cache than it would be to maintain a hacked version of a core system library.
Oct
6
comment How to disable AAAA lookups?
Unfortunately, as you can see from the code, there doesn't appear to be a no_inet6 option in res_setoptions(). However, as you can see from (no-)ip6-dotint, it's an easy change to add. To test the theory that it's being set by default by your distro, I'd grab the package source files and compile it once "virgin" (to confirm that the package replicates the behavior) and then add: { STRnLEN ("no-inet6"), 1, ~RES_USE_INET6 }, to the options[] array and see if the problem goes away when you set that option in resolv.conf.
Oct
2
comment nginx + varnish, optimize caching urls for ssl and not
req.url doesn't contain scheme (http vs. https). Thus, you only need to run the code, above, unless I'm missing something in your question.
Sep
24
comment Arp attack on my network
Who has <IP> Tell 0.0.0.0 is a standard approach to avoiding IP address conflicts. The other option is to use 169.254/16 (i.e., RFC 3927), but most equipment I've seen uses the former. Thus, this particular part of the observed behavior is not, in itself, of concern.