Tag Archives: Linux

Recovery of the File System from Disaster

Hey Guys, long time no see…Well i am back and this time the issue is File System.

What Happened ?

Well My Backup Server’s root partition ran out of space due to some issue, and since it was on LVM (Logical Volume Manager) i took some space from my /home partition (it was 400 GB ) and added to my root partition. Following commands were used to resize the partition.

umount /dev/mapper/centos-home

lvreduce -L 200G /dev/mapper/centos-home

Note first i unmounted the partition and then reduced the space from my /home partition which was mounted as /centos-home
I took 200 GB out of it and added to my root partition.

The Mistake: I forgot to remount /home to /dev/mapper/centos-home

But i extended the partition with the following command:

lvextend -r -l+100%FREE /dev/mapper/centos-root

As per above command the partition will be re-sized to the 100% free space available from the reduced volume. Of course it was 200 GB. All was good when i saw the partition sized changed from no space to +200 GB. But then i realized that i was not able to mount /home to /centos-home and that was the time when all problem started. I “Rebooted The Machine” and when it came back it refused to enter the normal boot prompt but went into “Emergency mode”

Things i Tried:

I tried to fix the partition with xfs_repair tool , but in vain , and i received the error that “Cannot Find Super Block “

I tried to run the fixes couple of time but failed every time.

The Fix:

I fixed the issue by the following commands:

lvremove /dev/mapper/centos-home
lvcreate -L 200GB -n home centos

mkfs.xfs /dev/centos/home

mount /dev/mapper/centos-home

Luckily there was no important data on my /home partition and i was able to save my server.

Good Practice:

If you every fall prey to such situation, remember to “Backup” to an external drive and then proceed with the above mentioned technique to rescue yourself from such difficult situation.

I hope it will help some one some where, Let me know with your feedback.

Thanks & Best Regards,

Salman A. Francis

Linux Practical Security Course

Dear Members ,
I am happy to announce that Linux Practical Security by LZH Project is complete. We will launch it shortly. Please support us by buying and rating this course. For first 20 buyers there will be a discount of $5. Total cost is $25. You can also book your copy by sending me email to learning@itpings.com Please take a look at the introductory video here:

Openstack dashboard gives error “Error: Unable to retrieve information”

So today i ran into one more issue with Openstack , the error showed up  when i logged in to the dashboard and clicked on Project–>Instances.

What i saw terrified me because is saw “NOTHING” !

A day before i had the same issue and i thought it’s related to RAM so i restarted and everything started and operated normally, but this time the reboot didn’t help.

So i started scratching my head and started wondering what might be the reason. I searched internet but no success. I searched log files but nothing made sense at that time, so i rebooted one more time and an Error appeared saying something like “Openstack glance-registry api error limit reached ” So that gave me a head start that it has something to do with system being low in space.

A df -h showed that / is 100% full. I removed some unnecessary files , rebooted the system and Viola !

All started to work Normally.

Conclusion:

Make Sure you have enough space with OpenStack

 

CONVERTING CISCO 7940 PHONES TO WORK WITH ASTERISK / ELASTIX

cisco_phones

This is a third part of Hosting Cisco Phone Files on TFTP Server, to make Cisco Phones work with SIP Server such as Asterisk / Elastix.

You can Download the third part from here:  CONVERTING CISCO 7940 PHONES TO WORK WITH ASTERISK- Elastix -Part III

 

Thanks,

Salman Aftab

Setting up Linux DHCP Server for Cisco Phone Files PART -II

dhcp

This is the second part of three part series. In this part we will setup DHCP Server on our Linux box. This DHCP will provide automatic IP addresses to our Cisco Phones.(If it’s set to YES)

So Lets setup a simple DHCP Server on Linux.

You can Download the Pdf from here Setting up Linux TFTP Server for Cisco Phone Files -Part II

 

Don’t forget to Comment

Thanks,

Salman Aftab

Setting up Linux TFTP Server for Cisco Phone Files PART -I

TFTP-Server

Hey Guys this time its Linux and Cisco working hand to hand. This post is kind of a multipost and consist of :

1. TFTP Server Setup on CentOS 6.4

2. DHCP Server Setup on CentOS 6.4

3. Hosting Cisco Phones Firmware on TFTP Server

4. Converting SCCP to SIP to use Cisco VOIP Phones with Elastix.

At the End of this Tutorial we would be able to setup working Cisco VOIP Phones with Elastix / Asterisk.

You can Download Part -I from here Setting up Linux TFTP Server for Cisco Phone Files-I

Please comment,

Thanks,

Salman Aftab

www.itpings.com