Category Archives: Scripts
XFS corruption – repairing

Note: The “magical” tool for XFS is (obviously) xfs_repair. Having it running can sometimes be the tough issue.

Introduction

How could a filesystem corruption happen? There are a couple of likely causes to it:

  • Kernel bugs: they are infrequent but they also did happen many times in the past and will still happen in the future. Not many things to be done about them, other than applying patches / keeping the kernel up to date;

  • Memory issues, e.g. memory errors propagated to the file system in control structures: they are usually mitigated with ECC memory but they can never be ruled out;

  • Underlying storage issues: quite unlikely but nevertheless possible;

  • Using the reset button on running servers: journaling file systems are almost always able to recover from such incident;

  • RAID controller issues: this could be the leading cause and not be easy to mitigate, even if firmware upgrade is sometimes possible.

Continue Reading →

The “Debugging” interview – a few pointers

The long interview day is nearing its end. Googamazbook got the best and the worst out of you (well, neither of those, but I’m trying to put some literature in here); the last interviewer comes in, smiles condescendently and greets you with:

Time for the easy interview, heh?

Yes, you have all the reasons to be concerned and feel you’re just one step away from failure (yes, why didn’t you spend the day by the pool in the basement of the many stars hotel they got you a room in for the interview?). But without further ado, the questions start pouring in:

Question 1

How do you figure out if a process is CPU bound or I/O bound?

Tricky! Let’s not jump to the conclusion. There are 2 variables here, this means we have 4 possibilities:

Continue Reading →

Crazy DevOps interview questions (4)

Note: The first 3 episodes of the interview series can be found here, here and here.


Question 1:

You have the shared document open and the phone rings. The interviewer, at the other end of the line, starts with a thick accent:

 – What does ls * do?

You cannot believe your ears: it sounds easy. Really easy. So you answer in the line of “it lists all the files in the current directory”. The interviewer follows up with one or 2 questions on how it really works and you answer about the star being passed as a parameter to ls and how the binary interprets it in some way that it gets the entire directory walked over and its contents listed. Simple!

Continue Reading →

Next Page