The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

/var partition problems

Discussion in 'General Discussion' started by Wallaby, Nov 27, 2003.

  1. Wallaby

    Wallaby Well-Known Member

    Joined:
    Aug 15, 2001
    Messages:
    131
    Likes Received:
    1
    Trophy Points:
    18
    Hope someone can offer words of wisdom here...

    We seem to have problems on the /var partition of one of our machines. It started with exim playing up, like:

    "Couldn't create message log /var/spool/exim/msglog//1APInN-00072C-Qh: No space left on device"

    but now MySQL will not start either:

    "mysql has failed, please contact the sysadmin (result was "/usr/bin/mysqlshow: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)")."

    There is over 900Mb free on /var.

    Any ideas? How can I check if there is a disk problem?

    Cheers!
     
  2. vishal

    vishal Well-Known Member

    Joined:
    Jan 28, 2003
    Messages:
    340
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Restart Exim and Mysql

    Look in to logs for exim :

    tail -f /var/log/exim_mainlog

    or simply do a

    rm -fr /var/spool/exim/msglog

    Dont worry Exim will create the folder after deletion.

    Thanks,
     
  3. Wallaby

    Wallaby Well-Known Member

    Joined:
    Aug 15, 2001
    Messages:
    131
    Likes Received:
    1
    Trophy Points:
    18
    Ok, got a bit of an update. The problem was the partition's inode usage was 100%.

    But, more seriously, the /var partition is now totally gone. Does not show up at all.

    Any ideas?
     
  4. vishal

    vishal Well-Known Member

    Joined:
    Jan 28, 2003
    Messages:
    340
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Can u paste the output :

    df -h

    fdisk -l
     
  5. Wallaby

    Wallaby Well-Known Member

    Joined:
    Aug 15, 2001
    Messages:
    131
    Likes Received:
    1
    Trophy Points:
    18
    Here we go:

    $ df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/hda6 494M 398M 70M 85% /
    /dev/hdb1 37G 8.2G 26G 24% /backup
    /dev/hda1 99M 14M 80M 15% /boot
    /dev/hda7 27G 4.0G 21G 16% /home
    none 251M 0 251M 0% /dev/shm
    /dev/hda2 4.9G 2.0G 2.7G 42% /usr

    $ fdisk -l
    Disk /dev/hda: 255 heads, 63 sectors, 4865 cylinders
    Units = cylinders of 16065 * 512 bytes
    Device Boot Start End Blocks Id System
    /dev/hda1 * 1 13 104391 83 Linux
    /dev/hda2 14 666 5245222+ 83 Linux
    /dev/hda3 667 1058 3148740 83 Linux
    /dev/hda4 1059 4865 30579727+ f Win95 Ext'd (LBA)
    /dev/hda5 1059 1189 1052226 82 Linux swap
    /dev/hda6 1190 1254 522081 83 Linux
    /dev/hda7 1255 4865 29005326 83 Linux
    Disk /dev/hdb: 255 heads, 63 sectors, 4865 cylinders
    Units = cylinders of 16065 * 512 bytes
    Device Boot Start End Blocks Id System
    /dev/hdb1 * 1 4865 39078081 83 Linux

    That "Win95 Ext'd (LBA)" looks weird -- this is a Linux-only machine (at The Planet) and AFAIK has never had anything Win-related on it!
     
  6. Wallaby

    Wallaby Well-Known Member

    Joined:
    Aug 15, 2001
    Messages:
    131
    Likes Received:
    1
    Trophy Points:
    18
    Just an FYI. An OS restore is needed:(

    At least we have the user data backed up.
     
  7. vishal

    vishal Well-Known Member

    Joined:
    Jan 28, 2003
    Messages:
    340
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Can u also paste the

    cat /etc/fastab ???
     
  8. Wallaby

    Wallaby Well-Known Member

    Joined:
    Aug 15, 2001
    Messages:
    131
    Likes Received:
    1
    Trophy Points:
    18
    Presume you mean fstab:

    $ cat /etc/fstab
    LABEL=/ / ext3 defaults 1 1
    LABEL=/backup /backup ext3 defaults 1 2
    LABEL=/boot /boot ext3 defaults 1 2
    none /dev/pts devpts gid=5,mode=620 0 0
    LABEL=/home /home ext3 defaults,usrquota 1 2
    none /proc proc defaults 0 0
    none /dev/shm tmpfs defaults 0 0
    LABEL=/usr /usr ext3 defaults,usrquota 1 2
    #LABEL=/var /var ext3 defaults,usrquota 1 2
    /dev/hda5 swap swap defaults 0 0
    /dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
    /dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
     
  9. vishal

    vishal Well-Known Member

    Joined:
    Jan 28, 2003
    Messages:
    340
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    #LABEL=/var /var ext3 defaults,usrquota 1 2

    Ok here is the deal if you could understand ???

    The /var is commented, Remove the comment from the LABEL and see if you get it back and mount it.

    Hope this helps !
     
Loading...

Share This Page