Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
Is it possible? I have a server that's colocated so a live cd isn't really an option. Everything I can find on resizing the partitions has said to use a ...
  1. #1
    Just Joined!
    Join Date
    Apr 2005
    Posts
    14

    Resize partitions without the use of a live cd?

    Is it possible? I have a server that's colocated so a live cd isn't really an option. Everything I can find on resizing the partitions has said to use a live cd. Any help would be appreciated.

    My Current config looks like:

    Filesystem Size Used Avail Use% Mounted on
    /dev/md1 2.0G 314M 1.6G 17% /
    /dev/md6 119G 188M 113G 1% /home
    /dev/md4 2.0G 36M 1.9G 2% /tmp
    /dev/md3 12G 258M 11G 3% /var
    /dev/md2 7.8G 1.2G 6.2G 17% /usr
    /dev/md0 494M 32M 437M 7% /boot
    tmpfs 1013M 0 1013M 0% /dev/shm

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Quote Originally Posted by supergper View Post
    Is it possible? I have a server that's colocated so a live cd isn't really an option. Everything I can find on resizing the partitions has said to use a live cd. Any help would be appreciated.

    My Current config looks like:

    Filesystem Size Used Avail Use% Mounted on
    /dev/md1 2.0G 314M 1.6G 17% /
    /dev/md6 119G 188M 113G 1% /home
    /dev/md4 2.0G 36M 1.9G 2% /tmp
    /dev/md3 12G 258M 11G 3% /var
    /dev/md2 7.8G 1.2G 6.2G 17% /usr
    /dev/md0 494M 32M 437M 7% /boot
    tmpfs 1013M 0 1013M 0% /dev/shm
    This looks like a perfectly reasonable allocation to me. What partitions do you wish to shrink?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    I couldn't direct you on how to do it, but it is possible to boot the machine over a network, then use a command line program like cfdisk to partition.

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Actually, you can resize some partitions without rebooting the system, though some you cannot, such as / and /usr, though I don't know about /boot. You should be able to resize /home, provided you have enough space elsewhere to back it up to. In any case, you ABSOLUTELY MUST backup everything on the system disc before you perform such an operation! Failure to do so usually results in a visit from our friend and confidant, Murphy and you quickly discover the correct meaning of the term SNAFU!
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Just Joined!
    Join Date
    Apr 2005
    Posts
    14
    Well, I would like to shrink the /home directory as this server runs VPSes and as a result the /home shouldn't have anything in it really. I use HyperVM for my VPSes and it installs to / so once it's installed I'm 100% out of space on / and I'm not able to update anything. HyperVM recommends giving as much space to / as possible.

  6. #6
    Just Joined!
    Join Date
    Apr 2005
    Posts
    14
    also, this is a new install so I don't have anything in /home to loose. I could have the data center reload it but it costs to have them do so so I was hoping to not have to reload.

  7. #7
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Quote Originally Posted by supergper View Post
    Well, I would like to shrink the /home directory as this server runs VPSes and as a result the /home shouldn't have anything in it really. I use HyperVM for my VPSes and it installs to / so once it's installed I'm 100% out of space on / and I'm not able to update anything. HyperVM recommends giving as much space to / as possible.
    Thanks for the clarification. What you are saying is that you want to increase / and reduce /home. In what directory are the VPS's stored?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  8. #8
    Just Joined!
    Join Date
    Apr 2005
    Posts
    14
    Quote Originally Posted by Rubberman View Post
    Thanks for the clarification. What you are saying is that you want to increase / and reduce /home. In what directory are the VPS's stored?
    That is correct, I'd like to shrink /home and either give the space to / or create another mount point, /vz. (preferably give the space to /) The vpses are all stored in / (actually /vz), the actual virtualization part of it is handled by OpenVZ and is managed by HyperVM.

  9. #9
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Quote Originally Posted by supergper View Post
    That is correct, I'd like to shrink /home and either give the space to / or create another mount point, /vz. (preferably give the space to /) The vpses are all stored in / (actually /vz), the actual virtualization part of it is handled by OpenVZ and is managed by HyperVM.
    Well, if it were me, it's a LOT simpler to mv /vz to /home/vz and make a link from /home/vz to /vz. As a result, all the things that would go into /vz, are actually stored in /home/vz. In all respects, this is preferable to storing them in /. The root directory should actually be fairly small. If you need to store really large stuff in sub-directories of /, then it is preferable to actually put them somewhere else, for better backup and system recovery purposes, and make a link in / for applications that expect them there. I do that all the time, and it works very well. As a result, you will not have to modify your file system allocations at all. At least for now. IE:

    # mv /vz /home
    # ln -s /home/vz /

    Voila, you are done!
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  10. #10
    Just Joined!
    Join Date
    Apr 2005
    Posts
    14
    Quote Originally Posted by Rubberman View Post
    Well, if it were me, it's a LOT simpler to mv /vz to /home/vz and make a link from /home/vz to /vz. As a result, all the things that would go into /vz, are actually stored in /home/vz. In all respects, this is preferable to storing them in /. The root directory should actually be fairly small. If you need to store really large stuff in sub-directories of /, then it is preferable to actually put them somewhere else, for better backup and system recovery purposes, and make a link in / for applications that expect them there. I do that all the time, and it works very well. As a result, you will not have to modify your file system allocations at all. At least for now. IE:

    # mv /vz /home
    # ln -s /home/vz /

    Voila, you are done!
    Thanks, that exact same thought came to mind initially but I wasn't sure if that was kosher to do. It's just too simple of a solution

Page 1 of 2 1 2 LastLast

Posting Permissions

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