[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How I partitioned my harddrive



on Tue, Jan 28, 2003 at 02:32:55AM -0500, Emma Jane Hogbin (emmajane@xtrinsic.com) wrote:
> 
> I'd mostly call myself a "regular user" -- although I do have a web server
> installed on my laptop it doesn't broadcast to the world...it's just me
> the couch and the tv and occassionally the cat. 

Hmm...I'd wondered where he'd gone....

<...>

> I believe I came up with these numbers from a Red Hat book, although
> many people have included their disk partition sizes on their web
> sites. 

Myself included:

    http://kmself.home.netcom.com/Linux/FAQs/partition.html

Note that partitioning is a pretty subjective issue.  You can pretty
much have any number of partitions from one[1] on up.

Red Hat partitioning guidelines are almost certainly going to be biased
in favor of a large root partition.  RH seems to want a 250 MiB root for
a 7.x install.  You can do less, but it will complain.  Debian uses a
sparser root, which the old farts consider a better thing (less to go
wrong).  BSDers take this to an extreme.

The argument in favor of fewer partitions is fewer decisions, less
wasted/lost space, and easier overall management.  

The argument in favor of more partitions is more control, particularly
selecting filesystems and/or mount options appropriate to the partition
(nodev, nosuid, noexec, etc.).  You're also increasing recoverability --
filesystem corruption is generally restricted to only a single
partition.  You also have the option of shuttling data to other
partitions while doing maintenance or recovery.  And if you create a
spare bootable partition, you've got a fallback on the system in the
event your primary boot goes pear shaped.


> I know only of the linux laptop site, but many of the people
> who've contributed info have included disk partition information:
> http://www.linux-laptop.net/
> 
> Here's mine:
> emmajane@debian:~$ df -h (-h = human readable sizes)
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/hda2             464M   28M  412M   7% /

Note that you're only using 7% of this partition.  That's a good 350 MiB 
wasted...

> /dev/hda3             4.6G  2.1G  2.4G  47% /home

Healthy.  I generally give /home the remainder of space after allocating
to all else.

> /dev/hda5             2.3G  1.3G  901M  60% /usr

Good.

> /dev/hda6             464M  108M  333M  25% /var

I tend to recommend 750 MiB  - 1 GiB.  You've split out /var/cache
separately...

> /dev/hda7             2.8G   46M  2.6G   2% /usr/local

My experience is that /usr/local tends not to get used that much on
Debian.  Something about having 12k available packages all of which go
to /usr....

> /dev/hda9              46M   13M   31M  30% /tmp

Good, possibly a bit thin.  I tend to give 64-256MB to /tmp

> /dev/hda10            2.3G  334M  1.9G  15% /var/cache

Hmm.  Frankly, I'd lose this.  If you can, roll the space back into /var
and /home.  parted may be able to resize your partitions.

<...>



> So today I filled up /var. Based on some great advice that got here I
> decided to find the largest subdirectory and make a new partition just
> for that directory. This freed up a good chunk of space (75% of the
> partition) to be shared in the other sub-directories. A number of
> people recommended cleaning out /var...464M isn't a lot to begin with.
> I have virtually no logs and no mail. As you can see, there wasn't a
> lot to clean out:
> 
> debian:/home/emmajane# du --max-depth=1 -h /var
> 12K     /var/lost+found
> 75M     /var/lib
> 334M    /var/cache
> 2.8M    /var/backups
> 1.0K    /var/local
> 1.0K    /var/lock
> 21M     /var/log
> 40K     /var/run
> 9.9M    /var/spool
> 10K     /var/tmp
> 1.0K    /var/opt
> 1.0K    /var/mail
> 10K     /var/www
> 441M    /var
> 
> (Note that the size of /var/cache is approximately the same size as
> /dev/hda10 from above? This is because I moved /var/cache into that
> partition but du reads it as if it were all the same...I think.)

du reads the directories _in_ the directory you point it at.  If you
want to keep it on one filesystem, use the '-x' option.


<good stuff snipped>

IMO your end results are still a bit imbalanced.  Not a huge deal, but
keep it in mind as you go through this process again.

Peace.

--------------------
Notes:

1.  One partition assumes either no swap, or use of a swapfile.

-- 
Karsten M. Self <kmself@ix.netcom.com>        http://kmself.home.netcom.com/
 What Part of "Gestalt" don't you understand?
   At the sound of the toner, boycott Lexmark:  trade restraint via DMCA.
    http://news.com.com/2100-1023-979791.html



Reply to: