Re: Partitioning a second hard disk
> I am a (generally) linux newbie trying to jump in the deep end of learning
> linux. I have read a lot of documentation on the correct way to partition
> a hard disk by placing /, /home, /usr, /var, /boot, /tmp and obviously
> /swap on their own partitions, the size requirements and physical layout
> of the drive. My machine does not have any other OS's on it and has a
> second hard drive. I have not touched this second hard drive partitioning
> wise and it has nothing on it. I am trying to set up a semi debian
> workstation/file server and would like to use this second 80gb hard drive.
> What is the correct way to partition this disk when it will contain only
> documents and data? I have an existing 25Gb /home directory on the first
> 40gb hard drive but don't know whether to enable the full 80gb second
> drive as /home. Can you have two /home directories on separate disks? Do I
> need another partition on the second drive as swap? I'd appreciate any
> help regarding this matter.
This is a common question, and I don't think there's any one right answer.
There are lots of considerations.
One is protection-- by putting data on a different partition from programs,
you tend to insulate one from damage to the other.
Another is performance. If you have two sets of data that will tend to be
accessed at the same time-- e.g. data and programs-- then by putting them
on different disk drives, you improve performance by allowing both sets of
disk heads to operate at once to fetch your programs and data. At the
other extreme, putting them in the first and last partitions of the same
drive would give the worst performance, since the drive heads would have to
move back and forth across the width of the disk to access the two data
With only two disk drives, it's hard to find a completely optimal solution.
However, I think it's a mistake to make a lot of partitions, because it's
too inflexible an arrangement. The 7 you mention sounds like too many to
me. You'll end up sooner in the situation where one of the partitions is
too small, and you have to repartition and move data around, just to allow
some directories to grow. The fewer partitions you have, the less often
this will happen.
I use what I think is a fairly common arrangement, with exactly four
partitions: /, /boot, /home, and swap. /boot is kept separate (only 30
MB) so that I can mount it read-only. This protects it against damage to
the rest of the file system.