Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I need to increase the logical volume of the var directory, the maximum size of var right now is 10GB, I need to make it 50GB. I have a Centos 6 server.

The output of df -h is:

Filesystem            Size  Used Avail Use% Mounted on
rootfs                 10G   10G     0 100% /
/dev/root              10G   10G     0 100% /
none                  991M  312K  990M   1% /dev
/dev/sda2             455G  3.6G  429G   1% /home
tmpfs                 991M     0  991M   0% /dev/shm
/dev/root              10G   10G     0 100% /var/named/chroot/etc/named
/dev/root              10G   10G     0 100% /var/named/chroot/var/named
/dev/root              10G   10G     0 100% /var/named/chroot/etc/named.conf
/dev/root              10G   10G     0 100% /var/named/chroot/etc/named.rfc1912.zones
/dev/root              10G   10G     0 100% /var/named/chroot/etc/rndc.key
/dev/root              10G   10G     0 100% /var/named/chroot/usr/lib64/bind
/dev/root              10G   10G     0 100% /var/named/chroot/etc/named.iscdlv.key
/dev/root              10G   10G     0 100% /var/named/chroot/etc/named.root.key

I followed this tutorial. In order to increase the volume you have to do:

lvextend -L +40G /Path/To/var

My problem is simple, I don't know where my var is located.

If i do lvextend -L +40G /dev/root/var I get Volume group "root" not found

If i do lvextend -L +40G /dev/var I get

  Path required for Logical Volume "var"
  Please provide a volume group name
  Run `lvextend --help' for more information.

I tried every possible path, still can't find the right path to var, so where my var is located?

EDIT

If i do lvextend -L +40G /dev/root I get

  Path required for Logical Volume "root"
  Please provide a volume group name
  Run `lvextend --help' for more information.

pvs gives no output at all.

lvs gives this output No volume groups found

share|improve this question
    
Can you add the output of pvs, vgs and lvs please. –  Dennis Kaarsemaker Mar 26 '13 at 15:49
    
@DennisKaarsemaker I just did, sir –  Fischer Mar 26 '13 at 15:54

2 Answers 2

up vote 1 down vote accepted

As I expected from the name /dev/root, you're not using LVM. You have a few options:

  1. Reinstall
  2. Hope that your partitioning scheme allows you to grow the root partition with (g)parted.
  3. Create a new partition as LVM volume, create a vg and and an lv for /var and move /var over
  4. Clean up the current system so you don't need the space

Options 2 and 3 are best done when booting from a rescue cd or rescue netboot.

share|improve this answer
    
option 1: do you mean reinstall centos? if so what to do during the installation to insure that i'm using lvm volume? Basically i have nothing on the server right now so i can do a reinstallation –  Fischer Mar 26 '13 at 16:22

Your /var is inside the root mountpoint, so you'll want to increase the size of /dev/root, if that is an LVM volume.

share|improve this answer
    
please read my edit sir –  Fischer Mar 26 '13 at 15:48
    
Or use something like parted, as OP isn't using LVM. –  vonbrand Mar 26 '13 at 15:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.