expand /var, decrease /home space

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

expand /var, decrease /home space

smil3y
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

attempted to do this before, but never found a way, google is no use.

is there no fairly straightforward way to expand /var and decrease
/home?  for some reason when I installed etch quite a while ago in my
fairly successful attempt at running a webserver it made /var only 2.8
gig and made /home 280 something gig.

now I want /var to be say 200 gig, and /home alot smaller..... for
obvious reasons. OR, if theres an easier way to accomplish, maybe mount
/home inside /var? I dont know, reaching for answers lol.

Thanks for any tips or links you can provide.






- --
Steve Reilly

http://reillyblog.com



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJQaSZ8ltKtLpsP3URAm9IAJ9QDy2dUhwITkZzZHi448DhKPjJGgCcDfdK
n/EypDSPVjWpDOhcXbwUIxc=
=S2+O
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: expand /var, decrease /home space

Michael Iatrou
When the date was Friday 12 December 2008, steve wrote:

> is there no fairly straightforward way to expand /var and decrease
> /home?  for some reason when I installed etch quite a while ago in my
> fairly successful attempt at running a webserver it made /var only 2.8
> gig and made /home 280 something gig.
>
> now I want /var to be say 200 gig, and /home alot smaller..... for
> obvious reasons. OR, if theres an easier way to accomplish, maybe mount
> /home inside /var? I dont know, reaching for answers lol.
>
> Thanks for any tips or links you can provide.

You could create a symbolic link from /var/web/server/files to /home/htdocs/

Resizing your partitions is error prone and depends on file system, it's a
process you really want to avoid.

--
 Michael Iatrou (gxkx)


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: expand /var, decrease /home space

smil3y
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Iatrou wrote:

> When the date was Friday 12 December 2008, steve wrote:
>
>> is there no fairly straightforward way to expand /var and decrease
>> /home?  for some reason when I installed etch quite a while ago in my
>> fairly successful attempt at running a webserver it made /var only 2.8
>> gig and made /home 280 something gig.
>>
>> now I want /var to be say 200 gig, and /home alot smaller..... for
>> obvious reasons. OR, if theres an easier way to accomplish, maybe mount
>> /home inside /var? I dont know, reaching for answers lol.
>>
>> Thanks for any tips or links you can provide.
>
> You could create a symbolic link from /var/web/server/files to /home/htdocs/
>
> Resizing your partitions is error prone and depends on file system, it's a
> process you really want to avoid.
>

ok, well I wanted to avoid that if all possible anyway, tried this ln -s
/var/www/download /home/steve/public_html  but when I try to copy a file
into /var/www/download I get no space left on device. thats creating a
symbolic link from download directory (which has no space left) to a
directory that has 280 gig free in it. did I do something incorrectly?





- --
Steve Reilly

http://reillyblog.com



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJQa3z8ltKtLpsP3URAp6WAJ0cgbDI1ArUDf9ehFBNMnQK24zHIwCgmonI
gByn+tTSBaTTtuvzjr36x+E=
=IiHO
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: expand /var, decrease /home space

subscriptions@rdegraaf.nl
In reply to this post by smil3y
On Fri, 2008-12-12 at 00:39 +0100, steve wrote:
> fairly successful attempt at running a webserver it made /var only 2.8
> gig and made /home 280 something gig.
>
> now I want /var to be say 200 gig, and /home alot smaller..... for
> obvious reasons.

If the reason is using www, why not configure apache2 that its www
directory is in /home/www ?

You can find the configuration files in /etc/apache2/available-sites.

Best,

Rob


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: expand /var, decrease /home space

Raj Kiran Grandhi-3
subscriptions wrote:
> On Fri, 2008-12-12 at 00:39 +0100, steve wrote:
>> fairly successful attempt at running a webserver it made /var only 2.8
>> gig and made /home 280 something gig.
>>
>> now I want /var to be say 200 gig, and /home alot smaller..... for
>> obvious reasons.
>
> If the reason is using www, why not configure apache2 that its www
> directory is in /home/www ?

Or, alternatively, resize2fs /home to whatever size you need and put
/var/www/ in its own partition in the freed space.

>
> You can find the configuration files in /etc/apache2/available-sites.
>
> Best,
>
> Rob
>
>


--

If you can't explain it simply, you don't understand it well enough.
                                        -- Albert Einstein


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: expand /var, decrease /home space

Raj Kiran Grandhi-3
In reply to this post by smil3y
steve wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> attempted to do this before, but never found a way, google is no use.
>
> is there no fairly straightforward way to expand /var and decrease
> /home?  for some reason when I installed etch quite a while ago in my
> fairly successful attempt at running a webserver it made /var only 2.8
> gig and made /home 280 something gig.
>
> now I want /var to be say 200 gig, and /home alot smaller..... for
> obvious reasons. OR, if theres an easier way to accomplish, maybe mount
> /home inside /var? I dont know, reaching for answers lol.
>
> Thanks for any tips or links you can provide.

Can you give us the layout of your partitions? The output of `df` and
`sudo fdisk -l` should help us in recommending the least painful way of
achieving your goal.

> - --
> Steve Reilly

--

If you can't explain it simply, you don't understand it well enough.
                                        -- Albert Einstein


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: expand /var, decrease /home space

smil3y
In reply to this post by subscriptions@rdegraaf.nl
subscriptions wrote:

> On Fri, 2008-12-12 at 00:39 +0100, steve wrote:
>> fairly successful attempt at running a webserver it made /var only 2.8
>> gig and made /home 280 something gig.
>>
>> now I want /var to be say 200 gig, and /home alot smaller..... for
>> obvious reasons.
>
> If the reason is using www, why not configure apache2 that its www
> directory is in /home/www ?
>
> You can find the configuration files in /etc/apache2/available-sites.
>
> Best,
>
> Rob

well I dont know why I didnt think of that to begin with, worked
perfectly other than having to adjust permissions on one of the sites
folders..... thanks!





--
Steve Reilly

http://reillyblog.com




--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: expand /var, decrease /home space

Chris Davies-2
In reply to this post by smil3y
steve <[hidden email]> wrote:
> is there no fairly straightforward way to expand /var and decrease
> /home?

Only if you're running LVM (and even then it's not as straightforward
as I'd like). Otherwise it's a real PITA.


> for some reason when I installed etch quite a while ago in my
> fairly successful attempt at running a webserver it made /var only 2.8
> gig and made /home 280 something gig.

> now I want /var to be say 200 gig, and /home alot smaller..... for
> obvious reasons.

It's not obvious, but I'm going to guess you have your web server (and
maybe its log files) on /var and that's what's eating the space.

When I configure up apache I tend to set it to use vhosts under
/home/www. So I have /home/www/_default_/ (which is really a placeholder
for a vhost that does a redirect to http://www.roaima.co.uk/),
/home/www/www.roaima.co.uk/, /home/www/mail.roaima.co.uk/ and so
on. Further, within each vhost directory I have docroot and logs.

Appropriate Docroot and Log entries in /etc/apache/sites-enabled/*
complete the picture, and it leaves /var/www pretty much untouched. (I
use Alias directives to link back into /var/www/* as and when necessary.)

Hope that helps,
Chris


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: expand /var, decrease /home space

Chris Davies-2
In reply to this post by smil3y
steve <[hidden email]> wrote:
> ok, well I wanted to avoid that if all possible anyway, tried this ln -s
> /var/www/download /home/steve/public_html [...]

> thats creating a symbolic link from download directory (which has
> no space left) to a directory that has 280 gig free in it.

No. That has created a link to /var/www/download in
/home/steve/public_html. ("ln -s" is counter intuitive, IMO. The arguments
always seem to need to be the other way round.)


> did I do something incorrectly?

You forgot to ls -l /var/www/download to confirm the link was correctly
created. (You'd have seen it wasn't.)

Chris


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: expand /var, decrease /home space

smil3y
In reply to this post by Chris Davies-2
Chris Davies wrote:

>
> It's not obvious, but I'm going to guess you have your web server (and
> maybe its log files) on /var and that's what's eating the space.

thats pretty much it, yes.  between logs and site folders /var/www
pretty much became full..... I went to put a sizeable file in one
webservers download directory for a friend to download and thats when I
got the no space message.

I set this all up well over a year ago, and havent messed with it since.
never realized I could move document root outside /var, never even
really thought about it, I thought it would create permission problems.
 well, it did for one of the sites but fixed that already.
>
> When I configure up apache I tend to set it to use vhosts under
> /home/www.

same here

So I have /home/www/_default_/ (which is really a placeholder
> for a vhost that does a redirect to http://www.roaima.co.uk/),
> /home/www/www.roaima.co.uk/, /home/www/mail.roaima.co.uk/ and so
> on. Further, within each vhost directory I have docroot and logs.

I put document root in public_html mainly because it was already there,
and copied everything inside /var/www to it.  then changed sites-enabled
and vhost to reflect the new directory, and everything seems to be
working ok.
>
> Appropriate Docroot and Log entries in /etc/apache/sites-enabled/*
> complete the picture, and it leaves /var/www pretty much untouched. (I
> use Alias directives to link back into /var/www/* as and when necessary.)
>
> Hope that helps,

yes, big help, thanks, and happy holidays.




--
Steve Reilly

http://reillyblog.com




--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: expand /var, decrease /home space

subscriptions@rdegraaf.nl
In reply to this post by Chris Davies-2
On Fri, 2008-12-12 at 10:51 +0100, Chris Davies wrote:
>
> Appropriate Docroot and Log entries in /etc/apache/sites-enabled/*
> complete the picture, and it leaves /var/www pretty much untouched. (I
> use Alias directives to link back into /var/www/* as and when
> necessary.)

Note: /etc/apache2/sites-enabled contains links to configuration
files in /etc/apache2/sites-available.

When one configures a site, do it in 'sites-available' and link it from
'sites-enabled'.

Best,

Rob




--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: expand /var, decrease /home space

Boyd Stephen Smith Jr.-2
In reply to this post by Chris Davies-2
On Friday 2008 December 12 03:55:14 Chris Davies wrote:

>steve <[hidden email]> wrote:
>> ok, well I wanted to avoid that if all possible anyway, tried this ln -s
>> /var/www/download /home/steve/public_html [...]
>>
>> thats creating a symbolic link from download directory (which has
>> no space left) to a directory that has 280 gig free in it.
>
>No. That has created a link to /var/www/download in
>/home/steve/public_html. ("ln -s" is counter intuitive, IMO. The arguments
>always seem to need to be the other way round.)
Yeah "source" and "destination" get a but confused when you are talking about
creating a symlink.  But, you should think of "ln" as a special form of "cp"
(which it is), then consider "-s" just an option that doesn't change the
order of arguments (which it is), and you should get the order right.

For mv, cp, ln, et. al the path to put the result is determined by the last
argument.  It's consistent because it's UNIX.
--
Boyd Stephen Smith Jr.                     ,= ,-_-. =.
[hidden email]                      ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-'
http://iguanasuicide.org/                      \_/    

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: expand /var, decrease /home space

celejar
On Fri, 12 Dec 2008 10:20:44 -0600
"Boyd Stephen Smith Jr." <[hidden email]> wrote:

...

> Yeah "source" and "destination" get a but confused when you are talking about
> creating a symlink.  But, you should think of "ln" as a special form of "cp"
> (which it is), then consider "-s" just an option that doesn't change the
> order of arguments (which it is), and you should get the order right.
>
> For mv, cp, ln, et. al the path to put the result is determined by the last
> argument.  It's consistent because it's UNIX.

Great explanation; maybe now I'll be able to remember this, without
having to constantly check the manpages!

> Boyd Stephen Smith Jr.                     ,= ,-_-. =.

Celejar
--
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: expand /var, decrease /home space

smil3y
In reply to this post by Boyd Stephen Smith Jr.-2
Boyd Stephen Smith Jr. wrote:

>
> Yeah "source" and "destination" get a but confused when you are talking about
> creating a symlink.  But, you should think of "ln" as a special form of "cp"
> (which it is), then consider "-s" just an option that doesn't change the
> order of arguments (which it is), and you should get the order right.
>
> For mv, cp, ln, et. al the path to put the result is determined by the last
> argument.  It's consistent because it's UNIX.

thanks for the tip!




--
Steve Reilly

http://reillyblog.com




--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: expand /var, decrease /home space

Johannes Wiedersich-3
In reply to this post by Boyd Stephen Smith Jr.-2
Boyd Stephen Smith Jr. wrote:
> For mv, cp, ln, et. al the path to put the result is determined by the last
> argument.  It's consistent because it's UNIX.

Well, FWIW 'man ln' tells:

       ln [OPTION]... [-T] TARGET LINK_NAME   (1st form)
       ln [OPTION]... TARGET                  (2nd form)
       ln [OPTION]... TARGET... DIRECTORY     (3rd form)
       ln [OPTION]... -t DIRECTORY TARGET...  (4th form)

So there are 4 ways of invoking ln. Twice the target is the last
argument, twice the one before the last. This just seem to indicate that
you can pick whichever order sounds most consistent to you... 8-)

Johannes


signature.asc (268 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: expand /var, decrease /home space

Douglas A. Tutty-2
On Fri, Dec 12, 2008 at 11:56:06PM +0100, Johannes Wiedersich wrote:

> Boyd Stephen Smith Jr. wrote:
> > For mv, cp, ln, et. al the path to put the result is determined by the last
> > argument.  It's consistent because it's UNIX.
>
> Well, FWIW 'man ln' tells:
>
>        ln [OPTION]... [-T] TARGET LINK_NAME   (1st form)
>        ln [OPTION]... TARGET                  (2nd form)
>        ln [OPTION]... TARGET... DIRECTORY     (3rd form)
>        ln [OPTION]... -t DIRECTORY TARGET...  (4th form)
>
> So there are 4 ways of invoking ln. Twice the target is the last
> argument, twice the one before the last. This just seem to indicate that
> you can pick whichever order sounds most consistent to you... 8-)

Or, just use mc  Alt-x-S I think.


I've also used mc when I need to do the filesystem shuffle.

Doug.


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]