Find the answer to your Linux question:
Results 1 to 7 of 7
I have Fedora installed on my dedicated server. /var partition has run out of space, because the amount of disk space assigned to it is very little. How can I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2004
    Location
    izmir
    Posts
    4

    How to change quota for /var


    I have Fedora installed on my dedicated server. /var partition has run out of space, because the amount of disk space assigned to it is very little. How can I increase the disk quota for "/var" ?

    The result of df;

    -------------------------------------------------------------------
    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/hda1 497829 113112 359015 24% /
    /dev/hda6 114191268 879100 107511500 1% /data
    none 451592 0 451592 0% /dev/shm
    /dev/hda2 2522076 1515876 878084 64% /usr
    /dev/hda3 1004052 898880 54168 95% /var
    -------------------------------------------------------------------

    Thank you

  2. #2
    Linux User
    Join Date
    Jun 2003
    Location
    Huntington Beach, CA
    Posts
    390
    If you have more space on the drive make another partition, mount it as /mnt/newvar or something and copy the current /var contents over to it and just edit /etc/fstab to point to the new partition. If you need more specific instructions I'd be glad to help you out.

  3. #3
    Just Joined!
    Join Date
    Jul 2004
    Location
    izmir
    Posts
    4
    I would appreciate if you could provide me step by step guidance.

    Just in case, I use Plesk 7 for managing the server. I wouldn't like the change to have negative effect on Plesk.

    Thank you

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jun 2004
    Posts
    14
    Quote Originally Posted by izmir
    I would appreciate if you could provide me step by step guidance.

    Just in case, I use Plesk 7 for managing the server. I wouldn't like the change to have negative effect on Plesk.

    Thank you
    There is no guidance : you just copy your /var content to a new partition (bigger) and then you mount that new partition as /var instead

  6. #5
    Linux User
    Join Date
    Jun 2003
    Location
    Huntington Beach, CA
    Posts
    390
    Alright, the first thing you need to do in make the partition. There's several different programs you can use to do this, if the server is connected to a monitor and booted up in graphical mode just use fedoras partitioning software. I've never used fedora so I'm not sure where it is or if theres some kind of command center type program, but if there's not we can take a different route. Open a terminal and su root, as root type fdisk to bring up a menu similar to the following:
    Code:
    Usage: fdisk [-l] [-b SSZ] [-u] device
    E.g.: fdisk /dev/hda  (for the first IDE disk)
      or: fdisk /dev/sdc  (for the third SCSI disk)
      or: fdisk /dev/eda  (for the first PS/2 ESDI drive)
      or: fdisk /dev/rd/c0d0  or: fdisk /dev/ida/c0d0  (for RAID devices)
      ...
    Whatever drive you're going to be making the new partition on is what you have to select, for example fdisk /dev/hda. Once you do that you'll be presented with a prompt, enter p to double check your current partition table so you can decide how big a partition you want to make. Once you've decided type n for new partition, and follow the instructions. When you're done that type p again to confirm the new partition table, if you want to change what you just made type d and enter the location to delete it. Once you're satisfied, type w to write the partition table. Now you need to put a file system on the new partition. There's a couple you can choose from, ext2 and 3, reisferfs, xfs ect. I use reiser as it does well with small files, but I'm not sure if resier tools is installed on your system so for the example we'll use ext3. Simply enter the following command (still as root) mke2fs -j /dev/hdxy, and there you have it. Now mkdir /mnt/newvar, mount /dev/hdxy /mnt/newvar and cp -rf /var/* /mnt/newvar, unmount and reboot.

  7. #6
    Just Joined!
    Join Date
    Jul 2004
    Location
    izmir
    Posts
    4
    Fedora is very much like any other linux system. There is not much difference. So any solution that works on other linux systems would work on Fedora.

    I don't have physical access to the computer. I make ssh connection using putty.

    It looks like, I have parted installed on my computer.

    I understand that I can create a big partition and copy all my data from /var to the newvar. How does the operating system know that it should do some tasks in the newvar? For example, when I create a new mail account at Plesk, would it be able to create the new mailnames under /newvar instead of /var.

    Also, how do I unmount a directory?

    In case it helps, the result of "fdisk /dev/hda -l" command is as follows;

    ---------------------------------------------------------------
    Disk /dev/hda: 123.5 GB, 123522416640 bytes
    255 heads, 63 sectors/track, 15017 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/hda1 * 1 64 514048+ 83 Linux
    /dev/hda2 65 383 2562367+ 83 Linux
    /dev/hda3 384 510 1020127+ 83 Linux
    /dev/hda4 511 15017 116527477+ 5 Extended
    /dev/hda5 511 574 514048+ 82 Linux swap
    /dev/hda6 575 15017 116013366 83 Linux
    ---------------------------------------------------------------

    Thank you.

  8. #7
    Linux User
    Join Date
    Jun 2003
    Location
    Huntington Beach, CA
    Posts
    390
    umount /var will unmount it, and if you've copied over the files already just remount it with mount /dev/hdxy /var. Then change the partition in fstab so in case you ever have to reboot it it will mount /var on the new partition.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •