-1

I am renting a dedicated server with Parallel Plesk on it (which I hate and I try to use command line).

I have a filesystem that is full,"df -H" prints this:

Filesystem             Size   Used  Avail Use% Mounted on
/dev/md1               4.0G   4.0G   361k 100% /
/dev/mapper/vg00-usr   4.3G   1.4G   3.0G  32% /usr
/dev/mapper/vg00-var   4.3G   2.8G   1.6G  64% /var
/dev/mapper/vg00-home
                       4.3G   4.4M   4.3G   1% /home
none                   1.1G    24M   1.1G   3% /tmp
tmpfs                  1.1G      0   1.1G   0% /usr/local/psa/handlers/before-local
tmpfs                  1.1G      0   1.1G   0% /usr/local/psa/handlers/before-queue
tmpfs                  1.1G      0   1.1G   0% /usr/local/psa/handlers/before-remote
tmpfs                  1.1G      0   1.1G   0% /usr/local/psa/handlers/info
tmpfs                  1.1G      0   1.1G   0% /usr/local/psa/handlers/spool

The server I'm renting has 1TB of hard drive. Why are these so small, how can I increase my storage ? (I'm pretty beginner with Linux).

Thank you

2
  • it doesn't have to be /dev/md1, resizing /var would be great and I could move all to there.
    – xtrimsky
    Jun 1, 2012 at 19:52
  • my server is currently down as I wasn't fast enough, thank you for the answers but I'll accept one only after I get my SSH back :(
    – xtrimsky
    Jun 1, 2012 at 20:53

3 Answers 3

5

You are running LVM which should make this easy. These devices which are mounted are "logical volumes" which are allocated from one big chunk of space called a "volume group". Running vgdisplay should show you details about the volume group. Here's what mine currenlty looks like, yours should look similar:

--- Volume group ---
VG Name               vg00
System ID             
Format                lvm2
Metadata Areas        1
Metadata Sequence No  10
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                9
Open LV               2
Max PV                0
Cur PV                1
Act PV                1
VG Size               186.26 GiB
PE Size               4.00 MiB
Total PE              47683
Alloc PE / Size       39165 / 152.99 GiB
Free  PE / Size       8518 / 33.27 GiB
VG UUID               ekYzHp-b4n9-8971-nBBZ-kOfH-Cfd1-ZcEf12

The important bit here is the "Free PE" line which shows that we have some "Free physical extents" which can be allocated to our logical volumes. You can allocate space to a logical volume with lvresize. perhaps something like lvresize --size +100M /dev/mapper/vg00-var to increase by 100 megabytes.

After resizing the logical volume, you'll have to resize the contained filesystem. How to do this would be filesystem dependent. If it is ext2/ext3/ext4, you would use resize2fs /dev/mapper/vg00-var. And the changes should be immediately apparent.

2
  • ok I have done that, but now Apache is not starting by default (I have to do an apachectl -k restart each time I reboot the server), and mysql isn't working at all, mysql.sock was somewhere in /var and now its not there anymore
    – xtrimsky
    Jun 2, 2012 at 15:28
  • You would have to use resize4fs in case of ext4
    – th3an0maly
    Mar 10, 2016 at 6:49
0

Use du to see where your space is. Your space is unallocated if you you really have it. Try vgdisplay to see if it is in the LVM volume group. It might well be unallocated on your drives.

There are a lot of possibilities but I'd guess space would be in the volume group but unallocated. In this case use lvextend to give more space to the volumes you like. After volume is resized you can use resize2fs to online increase your the desired filesystem's space.

update: now I see md1 is out of space, easiest is to move your data off that filesystem. If that's not possible, please give a detailed information about space allocation on your devices (e.g. vgdisplay -v, fdisk -p, etc.)

0

You can re-size your /var by expanding your Logical Volume ==> Volume Group. Can you post your "vgdisplay" & "lvdisplay" outputs.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .