[thelist] linux server redistribute disk space
Shawn K. Quinn
skquinn at frogger.kicks-ass.net
Wed Aug 6 15:01:16 CDT 2003
On Tue, 5 Aug 2003, Richard Bennett wrote:
> Hi all,
>
> I have remote root access to our Linux Redhat 7.1 server, and could use some
> advice:
>
> Our disk looks like this:
>
> Filesystem 1k-blocks Used Available Use% Mounted on
> /dev/hda5 381139 244083 117378 68% /
> /dev/hda1 46636 5955 38273 14% /boot
> /dev/hda3 17781232 120864 16757116 1% /home
> none 256416 0 256416 0%
> /dev/shm
> /dev/hdb1 18982764 1258876 16759588 7% /usr
> /dev/hdb2 256665 236623 6789 98% /var
>
> Our webserver is on var/www/htdocs, but /var has run out of space.
> I'm trying to upload 500 megs of PDFs to the server.
>
> Is it possible to redistribute diskspace from /home to /var, without loosing
> data?
> Alternatively, can I put my pdfs on /home, and create a link from /var so
> they are visible from the web?
Since this is Linux and not one of the BSDs, you can use GNU Parted to
resize the filesystems. However, this typically should be done at the
console, especially when e.g. /var is involved.
I, personally, would take about 1-2 gigabytes off of /usr first (you have
an obscene amount of free space there) and seperate that into a new
filesystem for /var/www. Then do something like 'mv www www0', 'mount
/var/www', and then 'cp -a www0/* www'.
Yes, you can make /var/www a seperate filesystem. You can even make a
seperate filesystem for each site (up to, I think, 16 or 32 partitions on
one disk).
As an alternative, if getting to the console to do this is not feasible,
you could symlink to somewhere under /home. However, you have space under
/usr so a much more straightforward solution would be to move /var/www to
/usr/local/www if you need a "quick fix".
--
Shawn K. Quinn
More information about the thelist
mailing list