jump to navigation

Linux sparse file in /var/log/lastlog using RHEL3 19 November 2008

Posted by Maulvi Bakar in : Linux,Work , add a comment

The guys in the promised backup lands had their heads scratching.  Their backups seems to bloat an extra 1.2TB in size!  The culprit seems to be the

/var/log/lastlog

Lastlog is sparse file which contains unallocated blocks or “empty space” and it does not actually take up filesystem space.  Simple test like thus will have a very straightforward results –

$ du -H /var/log/lastlog
156kB   /var/log/lastlog

Furthermore, “lastlog” is a file that almost never grow anyway. A common issue apparently.

Usually it is suggested that either the file be excluded from the backup excercise or, if policy-wise not possible, then the backup application to be configured to handle the specific sparse file, in this case “lastlog”.

Sparse files can confuse some backup software. Usually tools like GNU tar requires the use of the -S parameter to fix it. If you are using some other software, consult the backup software’s manuals for options on how to deal with sparse files.

Enjoy!

RHEL4 U5 Install, Boots Up with “GRUB” error on screen. 29 October 2008

Posted by Maulvi Bakar in : Linux,Work , 1 comment so far

This one is a funny error. After finishing the installation, the system reboots and ‘poof’ on screen only displays “GRUB”.

My suspicion is that, GRUB somehow or rather did not install properly onto MBR. Considering previously that the system comes only with a single harddisk. Later on, after fixing a second harddisk, the OS was re-installed with RAID1. Maybe that’s the cause as the old GRUB was not properly overwritten.

Basically, I re-insert the installation CD and boot up into rescue mode.
linux rescue

Upon boot up, mount the filesystem thus –
# chroot /mnt/sysimage

Use grub the regenerate the grub stuff on both hdds thus –
# grub

On the grub command line, select the 1st harddisk
grub> root (hd0,0)

Initialize grub onto the 1st harddisk
grub> setup (hd0)

Do the same for the 2nd harddisk
grub> root (hd1,0)
grub> setup (hd1)

Exit the grub menu –
grub> exit

Reboot the system and your grub should behave normally now..

Enjoy

From the Badlands to the Hardlands and finally to the Promised Land. 18 October 2008

Posted by Maulvi Bakar in : Home,Work , 2 comments

Hmm..

My retirement seems to be quite short-lived. I thought I’m gonna retire from the so called promised land. Well, I did retire.. Thought of taking up agricultural activities, then the economy gone south.

Turns out, the promised land is a Hardland. Well, I’m a former Badlander. At first, I thought I can hack it. Hack it I did! 3 years!.. or somewhere close to it! The results? Diabetic, Low Blood Pressure or somewhere close to it too 😉

The advise is to retire 😉 as if that is possible. Nope, it’s just that I need to be mindful of myself, my health and ultimately, all those who have a claim on my life (The spouse, the Inhouse Celebrity).

Then, I got head-hunted again! First from a Japanese Electronics Giant™, but they balked at my physical conditions. My suspicions is more due to my academics, being a graduate of the Jedi Academy (or maybe the Starfleet Academy ;-). Then, it’s an American Technology Giant™ (purportedly to be the largest in the world! It’s true!). Now, these guys didn’t even care about my formal background, just so I can demonstrate my abilities.

Heh! Use the force Luke!

I am grateful to be given an opportunity with the American Technology Giant™. Now I truly believe I am in the promised land. I sincerely believe I may just retire here instead… Professionally of course.. The union-like work environment. The superb benefits package, especially medical, hospitalization which covers spouse and children, unlimited mind you! All these does help nudging me towards my decision.

Wish me luck!

Time Travelling in VMware Server for Linux (Guest & Host) 6 August 2008

Posted by Maulvi Bakar in : Home,Linux,Work , 2 comments

I run two VMware host machines at home. This is where I do most of my ‘Training’. Well, most of my knowledge on Linux are self-learned anyway. This is where I do my R&D.

Simply, theory is good. But how do you know whether the theory is practical? What potential pitfalls when you deploy a solution? Especially Free (Libre) and Open Source Solutions? Not to say FLOSS solutions are no good, but in a commercial environment, when paying customers are willing to pay good money to transfer their operational risks to you, you better be sure of the solution that you’re proposing.

FLOSS solutions backed by commercial vendors – eg. Red Hat, is a safe bet. You can propose it to customers and as a fall back, there’s always Red Hat. Problem starts with FLOSS solutions that specifically states – ‘No warranty/guarantee of any kind’ 😛

Not to say they’re no good, mind you. That’s where you as a FLOSS Service Provider comes in. To provide the kind of warranty/guarantee that the customer wants for such FLOSS solutions. The other advantage of FLOSS, if the customer’s not happy with a FLOSS vendor, being FLOSS, you can always go to another vendor. That forces FLOSS vendors to always provide the best service.

Anyway, I’m rambling and digressing –

My guest OSes keep travelling faster than my host OS, sometimes as fast as 2 seconds every 10 seconds. Need to tune the VMware server host a bit –

file – /etc/vmware/config

host.cpukHz = 3400000
hostinfo.noTSC = TRUE
tools.syncTime = TRUE

The first line is to specify the maximum CPU clock rate the system may run.
Second line is to specify that the cpu is not running at a constant clock rate (speedstep, cpufreq or power management is active when idle) and the timestamp counter is inaccurate an to use it as the least.
The last line sets the default to use vmware-tools timesync function.

Well, I hope this is a permanent solution.

Enjoy

Linux NFS Server, AIX NFS Client 31 July 2008

Posted by Maulvi Bakar in : Linux,Unix,Work , 3 comments

Hmmm..

We have a Linux NFS machine to extend the AIX Server’s chronic acute harddisk space shortage syndrome. Somehow, AIX Client could not mount the shared NFS folder from the Linux Server.

Apparently, AIX uses high ports to establish the connectivity to NFS Server. Linux NFS Server requires low ports (below 1024). So, you have to force AIX to use those reserved ports to establish the connection.

nfso -o nfs_use_reserved_ports=1

Then, the normal ‘mount’ should work from AIX after the medicine 😛

Enjoy

Apache Redirection – http to https 24 March 2008

Posted by Maulvi Bakar in : Linux,Work , add a comment

Many times have you encountered situation where you want to automatically redirect a page from one site to another. Simple problem of having a http://example.com/Some/Url/resource and http://www.example.com/Some/Url/resource to a https://www.example.com/Some/Url/resource

Actually, it is as simple as a single line in the http.conf file like thus –

Redirect permanent / https://www.example.com/

Therefore, anything that you put there will be redirected to the other site preserving the same resource url locations. It was so simple that I got disgusted! Darn!

Inhouse Celebrity 16 March 2008

Posted by Maulvi Bakar in : Home , 2 comments

Well, today I’ve been blessed with a daughter. My first-born child – Farah Farzana.

From Farah Farzana

Happy New Year – 2008 1 January 2008

Posted by Maulvi Bakar in : Home,Society , add a comment

Hmm..

The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.

George Bernard Shaw, Man and Superman (1903) “Maxims for Revolutionists”
Irish dramatist & socialist (1856 – 1950)

Let’s greet the new year with hope of progress for a better future..

Enjoy!

New HDD, enlarging Red Hat/Centos ext3/lvm partition 16 December 2007

Posted by Maulvi Bakar in : Home,Linux,System , 3 comments

Hmmm,

Suddenly, I’ve run out of space on one of my servers at home. Solution, add a new harddisk, extend existing partition onto the new harddisk.. Simple right? Right…

Firstly, fix the new harddisk onto the machine. Fdisk it like thus –

# fdisk /dev/sdb

Create a new ‘sdb1’ partition using type 8e, which is Linux LVM.

Next, we need to create a Physical Volume within the newly created sdb1 partition.

# pvcreate /dev/sdb1

After that we will extend the existing volume ‘VolGroup00’ onto the newly created physical volume.

# vgextend VolGroup00 /dev/sdb1

Once done, the next step is to extend the Logical Volume within the volume group to use the free space newly made available when you extend the volume group previously.

# lvextend -L 40G /dev/VolGroup00/LogVol00

And finally, we’ll enlarge the ext3 partition to make use of the newly available free space in the logical volume.

# resize2fs /dev/VolGroup00/LogVol00

Enjoy!

Typo error since fixed as advised! Thank you!

Gnome-RDP, Terminal Server Client, vncviewer – Fullscreen woes! 12 December 2007

Posted by Maulvi Bakar in : Linux,System , 2 comments

Well, I am using Ubuntu 7.10 Gutsy Gibbon.  Feeling gutsy right?  😉

Anyway, it seems that whenever I connect to a remote machine via VNC protocol, doesn’t matter what my client of choice, if I am using ‘Fullscreen’, I’ll be ‘Full Screaming’.  Seems that the CTRL-ALT-ENTER does not work for me to switch windows.  I’ll be stuck to the remote machine screen.

Fortunately, there’s hope yet.  Press ‘F8’ button and voila! There’s a host of options in the menu revealed.

Enjoy!

π