Webhosting Blog


Booting SUSE in single user mode

For basic system administration function you might require to reboot your SUSE server in maintenance / single user mode.

Follow following set of steps to boot the server in single user mode.

1. At the boot screen select the normal kernel for booting the server.

2. At the bottom of the screen you might observe the boot Options menu.

3. On the boot options menu place the following command to boot in single user mode.

boot option init=/bin/bash


4. This should now boot the server in single user mode.

5. for basic server administration check if the servers root partition is mounted in a rw mode with a mount command.

6. If not mount the partition in rw mode with the command

<none>~ # mount -o remount,rw /

7. once done reboot the server .



ERROR: Insufficient free extents in volume group

While adding a logical volume you might face an error as follows:

Insufficient free extents (XXXX) in volume group VOLUMEGROUPNAME: XXXXX required

localhost:~ # lvcreate -L +100G -n <logical_vol_name> <vg_name>

  Insufficient free extents (25599) in volume group vg_data: 25600 required

This error basically arrises as the vgdisplay or the vgs command try to round off and manipulate the assigned size in to human readable format.

To work around this issue you can consider using the physical extent units instead of the exact byte format for the size limits.

Following the steps mentioned below can help to sort the issue:

Use the following command to verify the free extent and total extent count:

localhost:~ # vgs -o +vg_free_count,vg_extent_count

  VG          #PV #LV #SN Attr   VSize   VFree   Free  #Ext

  vg_data   1   0   0 wz–n- 100.00G 100.00G 25599 25599

You can notice the free extents available are 25599 . Now in order to use the free extent value instead of the byte size you can use the option -l as follows

localhost:~ # lvcreate -l 25599 -n LV_home vg_data

  Logical volume “LV_home” created

Above command will use all the available free extents. Check this with the following command.

   localhost:~ # vgs -o +vg_free_count,vg_extent_count

               VG      #PV #LV #SN Attr   VSize   VFree Free #Ext

               vg_data   1   1   0 wz–n- 100.00G    0     0 25599

Now view the created logical volume.

localhost:~ # lvdisplay

  — Logical volume —

  LV Name                /dev/vg_data/LV_home

  VG Name                vg_data

  LV UUID                3BLbnm-8KfX-pHOm-oE5f-GRei-qTN8-uHFgZI

  LV Write Access        read/write

  LV Status              available

  # open                 0

  LV Size                100.00 GB

  Current LE             25599

  Segments               1

  Allocation             inherit

  Read ahead sectors     0

  Block device           253:0


Configuring NTP synchronization in SUSE Linux Using YAST

To configure a SUSE server with NTP you can follow following steps:

We will use the Yast tool to configure the NTP on the SUSE server.

Issue the Command as follows to initiate the yast tool.


You can find basic yast configuration screen as follows. Navigate to Network Services and select NTP configuration.


This will open the basic NTP configuration screen.


To configure the server with the basic NTP time synchronization while bootup of the servers select the option During Boot . In the NTP Server configuration section you can use the Random timeservers  Servers  or you can configure the required NTP server to be configured with the server in the Address section.

You can configure Advanced Settings for the NTP server via the Advanced Configuration setting.

It will open a screen similar to the following:


Select the Edit option and place the appropriate Server details in the Address section. Once Done Click on Finish. It will auto restart all the respective services for NTP. Quit the Yast tool once all the above settings are done as mentioned.

You can check the configuration using the ntpq command.

#ntpq -p


# ntpq

ntpq> peers

This will print a list of the peers known to the server. Thats it! The server is now synchronized with the mentioned NTP server.

How To Use Proxy Server To Access Internet via Shell Prompt ?

If you are accessing the text based internet in linux especially when you are accessing the application or the web configured behind proxy server(squid specifically), you might not be able to get the complete functionality / application working.

For enabling the access you will have to enable the environment variable called http_proxy on your server / machine. This variable enables the access to the application or the text based sessions via the proxy server. You will just need to know the hostname (or IP address) of the proxy server and the proxy port number of the proxy server.

You can enable the variable by using the  following command to set proxy server.

[root@server]# export http_proxy=http://server-ip:port/

If you are using an IP address for enabling the variable you can use the following command:

[root@server]# export http_proxy=

If you are using hostname for the proxy server you can use the following command:
[root@server]# export http_proxy=http://proxy_server_domainname:3128/

You are now all set to go!

2012 in review

The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

Here’s an excerpt:

4,329 films were submitted to the 2012 Cannes Film Festival. This blog had 44,000 views in 2012. If each view were a film, this blog would power 10 Film Festivals

Click here to see the complete report.

Service: [exim] has been disabled by the sys admin

Service: [exim] has been disabled by the sys admin

Trying to restart exim on the cPanel server issues as mentioned above.

This issue arises as the exim service is disabled in WHM>> Service Manager >> Exim.  So if you face the above error login to the WHM of the server and enable the service from the Service Manager. Now when you try to restart the service you should not face any error.

Store Copy of Incoming/Outgoing Emails

You can easily monitor the incoming or outgoing emails for all the email accounts for a domain without any BCC entry. You can simply use the following filters for this.
Add following code in the Exim system filter file (/etc/cpanel_exim_system_filter.)

Lets make a backup copy of the current filters so we can restore the same in case if there are issues with the newly configured filters.

# cp -a /etc/cpanel_exim_system_filter /etc/cpanel_exim_system_filter-orig

Assuming that the incoming emails for all the email accounts under the domain and outgoing emails from the email accounts from the domain are stored in different email accounts , we will add 2 different email accounts.
For example:
outgoing@domain.com Will be used to store the outgoing emails from the domain email accounts.
incoming@domain.com Will be used to store the incoming emails for the domain email accounts.

Open the file /etc/cpanel_exim_system_filter and add the following lines at the end of the file:

########### Filter to locate the emails for the domain with fields TO, CC, BCC having the domain name included ###############
if (“$h_to:, $h_cc:, $h_bcc” contains “domain.com”)
unseen deliver “incoming@domain.com”

########### Filter to locate the emails sent from the domain ##############
if $sender_address_domain is domain.com
unseen deliver “outgoing@domain.com”

Just restart the exim service and now you can get a copy of all the incoming and outgoing emails from the domain .

# service exim restart

In WHM ensure the filters are enabled from Main >> Service Configuration >> Exim Configuration Editor .

You can refer THIS URL to track outgoing emails in cPanel without BCC.