Find the answer to your Linux question:
Results 1 to 2 of 2
Hi all, This is my first time as a member but I have spent a lot of time looking at the ports. My server is running OSCent. I had a ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2011
    Posts
    1

    Linux OSCent dev sda5 running out of space


    Hi all,

    This is my first time as a member but I have spent a lot of time looking at the ports.

    My server is running OSCent.

    I had a problem with my server where the dev/sda5 partition was running out of space. After a lot of searching around for a solution I thought it only right I should share my findings.

    I found the cause to be the MySQL binary log files were getting very big, in some cases over 1Gb. The solution to this issue was to find a way of removing them but there was not a lot of information on how this was done. So this is what I did.

    In the var/mysql directory I found files like:

    mysql-bin.000001
    mysql-bin.000002
    mysql-bin.000003

    All for these files were over 1Gb.

    To remove them I found an artical which discribed how to use "Purge binary logs".

    Process:

    Login to your server at the command prompt.

    From the command prompt login to MySQL:

    Command> mysql -u admin -p

    Enter your password
    This account must have "super privilgies".

    To purge the "Binary logs"

    Command> purge binary logs <followed by the name of the log file >
    or
    Command: purge binary logs before <followed by a date >
    Example: purge binary logs before '2011-02-14 07:30:00';

    This will remove all the binary log file before the given date and time.

    I also found that from the command prompt I could enter a command that would automatically remove the binary logs.

    Command> expire_logs_days=n; < n is the number of days you wish to keep your binary log files.

    The command format for this is:

    Command-Line Format --expire_logs_days=#
    Option-File Format expire_logs_days
    Option Sets Variable Yes, expire_logs_days
    Variable Name expire_logs_days
    Variable Scope Global
    Dynamic Variable Yes
    Permitted Values
    Type numeric
    Default 0
    Range 0-99


    I do hope someone finds this helpful, I know I did.

    Regards,

    DCJ

  2. #2
    Just Joined!
    Join Date
    May 2006
    Posts
    73
    That is why when I'm setting up a heavily used server I always either install apps like MySQL and or Apache to their own partitions or put /usr and or /var on it's own partition. I also often use LVM partitions as well. I've had more than one server run completely out of disk space on / because of Apache, Postgres or MySQL logs. I've also had xsessionerrors files fill up / one of many reasons I put /home on it's own 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
  •