View previous topic :: View next topic |
Author |
Message |
EnlightedGnome Tux's lil' helper
Joined: 07 Jun 2005 Posts: 126 Location: Denmark, Odense
|
Posted: Tue Aug 09, 2005 4:58 pm Post subject: What can I do to save diskspace on my root partision? |
|
|
I'm constantly running out of diskspace on my root partision, so I wondered if anyone had some good advices on how to save some diskspace there? I have an other partision with tons of diskspace, if any idear would include something like moving directories. _________________ checking for -lifesign in -Kenny... no
- oh my god, they killed Kenny |
|
Back to top |
|
|
EzInKy Veteran
Joined: 11 Oct 2002 Posts: 1742 Location: Kentucky
|
Posted: Tue Aug 09, 2005 5:07 pm Post subject: Re: What can I do to save diskspace on my root partision? |
|
|
EnlightedGnome wrote: | I'm constantly running out of diskspace on my root partision, so I wondered if anyone had some good advices on how to save some diskspace there? I have an other partision with tons of diskspace, if any idear would include something like moving directories. |
You certainly can move things to the other partition, but what to move depends on what it taking up all the space on /. If it's things like large multimedia files, create a multimedia directory, say /porn, there and move all your movies and music there. If its /var or /usr, move them there. You can even copy a whole partition to another with:
Code: |
cp -a from_partition to_partition
|
How you orginize things is totally up to you. _________________ Time is what keeps everything from happening all at once. |
|
Back to top |
|
|
psyqil Advocate
Joined: 26 May 2003 Posts: 2767
|
Posted: Tue Aug 09, 2005 6:08 pm Post subject: |
|
|
Moving /usr/portage and /usr/src can save you a lot. |
|
Back to top |
|
|
Cinder6 l33t
Joined: 05 Aug 2004 Posts: 767 Location: California
|
Posted: Tue Aug 09, 2005 6:52 pm Post subject: |
|
|
Another idea is to use the -Os CFLAG, which will make your binaries as small as possible. If you copy your root fs to a new partition, I recommend going into a livecd and doing this:
Code: | mkdir /mnt/new
mount /dev/hdxy /mnt/gentoo #your old partition
mount /dev/hdxy /mnt/new #your new partition
cp -Rvp /mnt/gentoo /mnt/new |
Then you should edit your config files to point to the new partition. Example: /etc/fstab, /boot/grub/grub.conf _________________ Knowledge is power.
Power corrupts.
Study hard.
Be evil.
Ugly Overload |
|
Back to top |
|
|
nephros Advocate
Joined: 07 Feb 2003 Posts: 2139 Location: Graz, Austria (Europe - no kangaroos.)
|
Posted: Tue Aug 09, 2005 6:56 pm Post subject: |
|
|
In case you are using ccache with portage, make sure it is configured to use a cache dir different from the default (which is /root/.ccache).
You can set this with the variable CCACHE_DIR.
(I have set this in make.conf and pointing to /var/tmp/ccache which is on another partition.) _________________ Please put [SOLVED] in your topic if you are a moron. |
|
Back to top |
|
|
EnlightedGnome Tux's lil' helper
Joined: 07 Jun 2005 Posts: 126 Location: Denmark, Odense
|
Posted: Tue Aug 09, 2005 9:21 pm Post subject: |
|
|
When moving big stuff like /usr/src is it right to do it like this?
Code: | #mkdir /somewhere_on_another_partion
#cp -av /usr/src /somewhere_on_another_partion
#rm -Rv /usr/src
#ln -s /somewhere_on_another_partion /usr/src |
_________________ checking for -lifesign in -Kenny... no
- oh my god, they killed Kenny |
|
Back to top |
|
|
EzInKy Veteran
Joined: 11 Oct 2002 Posts: 1742 Location: Kentucky
|
Posted: Wed Aug 10, 2005 12:50 am Post subject: |
|
|
EnlightedGnome wrote: | When moving big stuff like /usr/src is it right to do it like this?
Code: | #mkdir /somewhere_on_another_partion
#cp -av /usr/src /somewhere_on_another_partion
#rm -Rv /usr/src
#ln -s /somewhere_on_another_partion /usr/src |
|
Alternatively you could create a mount point, as is done with /boot, but mounted automatically.
fstab entry example:
Code: |
/dev/hdb2 /home ext3 defaults 0 2
|
_________________ Time is what keeps everything from happening all at once. |
|
Back to top |
|
|
EnlightedGnome Tux's lil' helper
Joined: 07 Jun 2005 Posts: 126 Location: Denmark, Odense
|
Posted: Wed Aug 10, 2005 1:00 am Post subject: |
|
|
Which is best/most effective, creating a symbolic link or mounting at startup using a fstab entry? _________________ checking for -lifesign in -Kenny... no
- oh my god, they killed Kenny |
|
Back to top |
|
|
EzInKy Veteran
Joined: 11 Oct 2002 Posts: 1742 Location: Kentucky
|
Posted: Wed Aug 10, 2005 3:12 am Post subject: |
|
|
EnlightedGnome wrote: | Which is best/most effective, creating a symbolic link or mounting at startup using a fstab entry? |
I prefer the using the mount point as Linux is specifically designed to efficiently integrate multiple drives and filesystems into a single hierarchy. _________________ Time is what keeps everything from happening all at once. |
|
Back to top |
|
|
Cinder6 l33t
Joined: 05 Aug 2004 Posts: 767 Location: California
|
Posted: Wed Aug 10, 2005 6:27 am Post subject: |
|
|
EzInKy wrote: | EnlightedGnome wrote: | Which is best/most effective, creating a symbolic link or mounting at startup using a fstab entry? |
I prefer the using the mount point as Linux is specifically designed to efficiently integrate multiple drives and filesystems into a single hierarchy. |
I second that opinion. _________________ Knowledge is power.
Power corrupts.
Study hard.
Be evil.
Ugly Overload |
|
Back to top |
|
|
psyqil Advocate
Joined: 26 May 2003 Posts: 2767
|
Posted: Wed Aug 10, 2005 11:54 am Post subject: |
|
|
EnlightedGnome wrote: | Which is best/most effective, creating a symbolic link or mounting at startup using a fstab entry? | Both, of course, you don't need seperate partitions if you already have a big one. And it's Code: | ln -s /usr/src /somewhere_on_another_partion |
|
|
Back to top |
|
|
EnlightedGnome Tux's lil' helper
Joined: 07 Jun 2005 Posts: 126 Location: Denmark, Odense
|
Posted: Wed Aug 10, 2005 12:22 pm Post subject: |
|
|
psyqil wrote: | EnlightedGnome wrote: | Which is best/most effective, creating a symbolic link or mounting at startup using a fstab entry? | Both, of course, you don't need seperate partitions if you already have a big one. And it's Code: | ln -s /usr/src /somewhere_on_another_partion |
|
from the ln manual pages:
ln [options] source [dest] _________________ checking for -lifesign in -Kenny... no
- oh my god, they killed Kenny |
|
Back to top |
|
|
psyqil Advocate
Joined: 26 May 2003 Posts: 2767
|
Posted: Wed Aug 10, 2005 12:45 pm Post subject: |
|
|
EnlightedGnome wrote: | ln [options] source [dest] | Oh, my bad, sorry! I must have thought of another scenario... |
|
Back to top |
|
|
ph03n1x l33t
Joined: 06 Feb 2003 Posts: 756
|
Posted: Wed Aug 10, 2005 4:30 pm Post subject: |
|
|
You can also try to clean
/usr/tmp/ that freed about 2 gig here I have made a cron job now.
/usr/portage/distfiles is usually also taking quite a few hundred mbs |
|
Back to top |
|
|
lenbro n00b
Joined: 11 Aug 2005 Posts: 5
|
Posted: Thu Aug 11, 2005 3:03 pm Post subject: RE: moving /usr to new partition |
|
|
Thanks for making Gentoo forums the best!
Regarding EnlightedGnome's question:
Are the commands for relocating /usr any different if you are copying/moving /usr
to a new partition on a different hard disk?
For instance, what is the right way to move /usr off /dev/hda1 and onto /dev/hdb1 ?
I am concerned that if I do it wrong, I will (once again), hose my wonderful new OS!
Thanx |
|
Back to top |
|
|
Cinder6 l33t
Joined: 05 Aug 2004 Posts: 767 Location: California
|
Posted: Thu Aug 11, 2005 5:49 pm Post subject: |
|
|
There isn't really a right way. Just copy it over, then delete the old entries, and update /etc/fstab. If you are changing your root partition, you want to update your bootloader, of cource. For copying, I recommend the -p flag, to insure your permissions are preserved. _________________ Knowledge is power.
Power corrupts.
Study hard.
Be evil.
Ugly Overload |
|
Back to top |
|
|
|