Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Nov 2004
    Posts
    39

    Default changing size of directory ??

    Hello All:

    I made the /var directory too small.
    Is there any way to change the size of a directory under Linux without reformating the HDD ?

    John

  2. #2
    Member
    Join Date
    Jan 2005
    Location
    Earth
    Posts
    1,050

    Default

    You cannot resize the Linux partition once created. Only LVM partitions can be resized.

  3. #3
    Member
    Join Date
    Oct 2004
    Location
    New Jersey, USA
    Posts
    160

    Default

    If you cannot reformat easily, I'd suggest symlinking folders. Aka add a second hard drive as /home2, then say, move /var/lib to /home2 like this. (assuming you have /home2 as a 2nd hard drive)

    cd /var;cp -Rp lib /home2;mv lib lib.bak;ln -s /home2/lib;

    That should sucessfully move /var/lib to /home2/lib, then create a virtual link, so /var/lib is correctly working, and its files are at /var/lib.bak/ Restart mysql, and should be okay, at which point you can move / trash the lib.bak directory (Keeping a backup is always suggested)

    This is a hack job way of doing it, but sometimes it's the only option.
    -Kris
    HostMerit
    'Web Hosting on Your Terms'

  4. #4
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Yup. Also, if you obtain an additional disk you can always create a larger /var partition on that and copy the contents from one to the other and then dismount the old one and use it for something else. I'd go with HostMerit's suggestion.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

Similar Threads & Tags
Similar threads

  1. Disabling changing mailbox size by clients
    By Noordzee in forum New User Questions
    Replies: 1
    Last Post: 08-12-2011, 12:07 PM
  2. cPanel Home Directory Backup Size Limit
    By aarondwyer in forum Data Protection
    Replies: 3
    Last Post: 03-21-2009, 08:51 PM
  3. Changing Disk Quota Size?
    By jem71 in forum New User Questions
    Replies: 3
    Last Post: 08-29-2005, 06:02 PM
  4. Monitor Directory Size
    By nurseryboy in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-21-2004, 12:07 AM
  5. Changing default mailbox size.
    By SuperBaby in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 03-02-2004, 04:42 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube