[vox-tech] Resizing Root Partition
Mark K. Kim
vox-tech@lists.lugod.org
Tue, 23 Sep 2003 10:14:06 -0700 (PDT)
Your root is taking up too much space. My primary system uses only 125MB
in root, even though I don't have a separate /tmp. I'd look into why it's
so big.
Some ideas:
1. Unmount everything but root (easier yet, run in single-user
mode). See if you got anything in /usr, /tmp, and /var. They
should be empty.
2. If you got /opt or /pkg, move them to /usr and symlink.
3. Your root home (probably /root or /) should stay pretty
small. Move things you don't need out of it
(for example, downloaded files.)
BTW, you shouldn't need to download anything into /root,
really - you should download them to your user home directory,
then install them as root, from your user home directory.
4. Unmount everything but root, and type:
cd /
du -sH *
which should tell you how much each directory is using up
how much space. CD into the big directories and type
`du -sH *` again, then again, then again until you find
the culprits. Remove things like coredumps and such.
Also, when you install new apps, install them to /usr/local or /usr, not
root. And don't move anything out of root without verifying it's OK.
Something like /etc shouldn't be moved out of root.
-Mark
On Tue, 23 Sep 2003, Richard Crawford wrote:
> I'm trying to install Java onto my server at home so that I can start
> mucking around with JSP and Tomcat. Unfortunately, the Java SDK refuses
> to install, telling me that I don't have enough disk space. I ran df to
> get the disk usage, and this is what I get:
>
> root@hagrid:~/
> # df -h
> Filesystem Size Used Avail Use% Mounted on
> /dev/hda1 486M 462M 4.0K 100% /
> /dev/hda6 25G 6.2G 17G 27% /home
> none 125M 0 124M 0% /dev/shm
> /dev/hda7 99M 4.1M 89M 5% /tmp
> /dev/hda2 4.8G 1.5G 3.1G 32% /usr
> /dev/hda3 494M 167M 301M 36% /var
>
> My partition map looks like this:
>
>
> root@hagrid:~/
> # fdisk -l
>
> Disk /dev/hda: 255 heads, 63 sectors, 4865 cylinders
> Units =3D cylinders of 16065 * 512 bytes
>
> Device Boot Start End Blocks Id System
> /dev/hda1 * 1 64 514048+ 83 Linux
> /dev/hda2 65 701 5116702+ 83 Linux
> /dev/hda3 702 766 522112+ 83 Linux
> /dev/hda4 767 4111 26868712+ 5 Extended
> /dev/hda5 767 831 522081 82 Linux swap
> /dev/hda6 832 4098 26242146 83 Linux
> /dev/hda7 4099 4111 104391 83 Linux
>
> In this case, I wonder if it's best to resize the root partition, or to g=
o
> in and wipe out a bunch of files. Thoughts? Suggestions?
>
> Sliante,
> Richard S. Crawford
>
> http://www.mossroot.com http://www.stonegoose.com/catseyeview
> AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford
> MSN: underpope@hotmail.com
> Howard Dean for America: http://www.deanforamerica.com
> "It is only with the heart that we see rightly; what is essential is
> invisible to the eye." --Antoine de Saint Exup=E9ry
>
>
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech
>
--=20
Mark K. Kim
http://www.cbreak.org/
PGP key available on the website
PGP key fingerprint: 7324 BACA 53AD E504 A76E 5167 6822 94F0 F298 5DCE