Un-Delete Open file

There is a way to un-delete a file if a program has it open in Linux. How directory entries work in Unix When you remove a file on Linux, what actually happens is that the file is unlinked. Lets have a look. I start with a clean directory: 1 2 3 4 $ ls -la total 4 drwxrwxr-x 2 me me 6 Sep 4 15:58 . drwxrwxr-x 14 me me 4096 Sep 4 15:28 .

Delete Online Logs

In the Oracle training courses they always say: Your junior DBA deleted the online redo logs. Of course, it is never your junior DBA that does that. They are standing behind you laughing. Anyway, what to do if your junior DBA deletes the online redo logs. Or even if someone else does it, is first of all, not to panic. According to Ask TOM the worst thing to do is a shut down abort because if you do that, the database will need to be recovered from the online redo logs, and they have been removed.

More Windows Woes

Introduction Having tested my Windows Ansible build all seemed to be going well. A colleague took the script and ran it, and all seemed to be well, except that Microsoft word didn’t work - It just hung. The Problem On the Windows process scheduler Microsoft Office can be invoked to run a macro to populate a template to form a Word Document. The problem was that despite the Ansible install having run, and supposedly being repeatable, it didn’t work.

Vagrant Multi VM provisioning

Multiple VMs required I am looking into Postgresql, replication and fail over. One way to set this up is to have a primary, a standby and a witness server. Two run databases, and one - the witness to decide whether a fail over is needed. To test this it would be nice to create three VMs on my desktop to help test ansible scripts. I have downloaded Virtualbox from Oracle, and my desktop has loads of memory.

How We Use Ansible

Introduction I realise I have written a few posts on Ansible, but no overview on how we manage it. I haven’t done any training on Ansible, and this is my first effort at automation (Apart from some bash and python scripts) so there is probably much that could be improved. Our Systems We have about 15 - 25 environments to manage, depending on how you count them. Around 2-5 of these are vanilla in one form or another, so don’t need to be managed by Ansible.

Ansible Strings And Numbers

I had a playbook fail because of the error dict object has no element It took me ages to debug it, but the problem is that I had defined the index as a string, but was trying to match it to a number. To fix it, I only had to quote the version in the inventory, and everything worked. I was only caught by this because I was using an old inventory file to test with.

Managing Windows with Ansible

After a lot of trial and error, I finally found a way to make it work. Here is what I did. As noted before, rather than trying to run an installer from a share, I simply copied it on to the local disc of the VM. Before running Ansible on windows, the operating system has to be configured using (for example) the ConfigureRemotingForAnsible.ps1 script. I took the defaults. I didn’t bother setting up any of the advanced options like CredSSP, as in practice there didn’t seem to be any benefit.

Getting Windows and Ansible to play nicely

The challenge is to run an installer from a share, then run some extra configuration. We do this in Unix (Well, GNU/Linux) all the time, and it is really, really easy. We even have the software on a Windows share, so we just need to mount that and run it! It turns out that Windows is different from Unix. A mounted share doesn’t belong to the system like in Linux, it belongs to a session.