Friday, September 15, 2017

Best Practices Of Running File System Check On Ext4 Or Xfs


linux dvd.pngGenerally, running the file system check and repair
tool can be expected to automatically repair at least some of the inconsistencies it finds. In some cases, severely damaged i-nodes or directories may be discarded if they cannot be repaired, hence, significant changes to the file system may occur which may result in data loss.

To ensure that unexpected or undesirable changes are not permanently made, perform the following precautionary steps:


<<>>  Dry run (read-only mode)  <<>>


Most file system checkers have a mode of operation which checks but does not repair the file system. In this mode, the checker will print any errors that it finds and actions that it would have taken, without actually modifying the file system. Using "e2fsck" on ext4 (ext family file systems) and "xfs_repair" for xfs.


Saturday, September 9, 2017

Generate E-mail Alert Whenever An User Is Added Via Shell


 


Recently I came across a situation wherein there was a requirement to trigger an email alert whenever a new user is added to the system (Linux). Hence, I thought of coming up with a script to get this done. I found that this can be achieved in 2 ways as explained below (there could many other ways as well):

Thursday, January 12, 2017

Lets Automate Kdump

Kdump is kernel crash dumping mechanism and is very reliable because the crash dump is captured from the context of a freshly booted kernel and not from the context of the crashed kernel. Kdump uses Kexec to boot into a second kernel whenever system crashes. This second kernel, often called a capture kernel, boots with very little memory and captures the dump image.

Monday, November 21, 2016

Create & Restore Linux System Data Using Dump Command


I was searching for a simple backup solution in Linux system that could serve in block-level backup and for disaster recovery as well, and simply cost effective. Now-e-days, one could see a lot of options, however, I wanted to try out simple and yet native Linux solution, so, I came across this "dump & restore" utility.  This may not be an ideal solution for a larger network, but one could leverage on this for smaller network wherein there is no tight schedule on recovery. So, I thought of creating a step-by-step document of the same.

Complete system can be backed up and restored using native Linux commands “dump & restore” which would facilitate backup or disaster recovery process.