Monthly Archives: May 2016

Shrinking LVM logical volume with ext3/ext4 filesystem

… the required steps to reduce the size of an LVM logical volume formatted as an ext4 filesystem… 1) Unmount the logical volume (or boot into a live CD if the logical volume contains the root filesystem) 2) Check the … Continue reading

Posted in Linux | Tagged , | Leave a comment

Only one Perl instance – lock script

Use File::NFSLock to get an exclusive lock on the script itself: use Fcntl qw(LOCK_EX LOCK_NB); use File::NFSLock; # Try to get an exclusive lock on myself. my $lock = File::NFSLock->new($0, LOCK_EX|LOCK_NB); die “$0 is already running!\n” unless $lock; Alternatively use … Continue reading

Posted in Others | Tagged | Leave a comment