Webhosting Blog


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


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!