how to use a 1TB disk?
This thread belongs to

2009-10-13 15:20 GMT   |   #1

How should I use a 1 TB hd? The disk is intended to store music files and
Can just make 1 huge 1TB partition or maybe it's better to split the disk in
two partions?
Or there is no difference at all?

Thank you
2009-10-13 15:20 GMT   |   #2
Main difference I can think of is: how to plan to back things up - or do
you? It's going to be a pain to backup 1tb.
2009-10-13 15:20 GMT   |   #3
No, you just get two additional drives and keep them in separate
psychical locations. Smile
2009-10-13 21:20 GMT   |   #4
Well, the question you are asking is one that involves a lot of personal
taste, actually, so in essence only you would be qualified to judge how
you will be using this disk. Wink Personally however, I would suggest
the following...

Given the intended use of the disk for music files and video - so
basically, it's all multimedia stuff - I would first of all mount
whatever partitions you'll create on it to */srv* or a subdirectory
thereof. The */srv* directory is not implemented in most GNU/Linux
distributions, but it is specified in the File Hierarchy Standard (FHS)
version 2.3, and it is intended for shareable data.

So how to go about this? Well, one could use a single partition, or one
could distinguish between that which is solely audio and that which is
video (with audio, of course), in which case there would be two
partitions. However, the question then arises on what capacity to use
for either partition, and whether one partition will not prove to be
too large and the other too small at some point in the future.

Therefore, I would propose making use of LVM. You use /pvcreate/ to
prepare the disk for logical volumes - it is not necessary to create a
classic partition on it, although you can, and if so, then you should
only create one partition.

So say that this disk is of the SATA type and that it is your second
disk, then the disk itself would be */dev/sdb* and the partition you
create on it would be */dev/sdb1.* If you create a partition, then
that partition is what you should use /pvcreate/ on. Next, you
use /vgcreate/ to create a volume group - let's call it
*/dev/multimedia* or something - and in it, you create two logical
volumes - e.g. */dev/multimedia/audio* and */dev/multimedia/video* -
using /lvcreate./ (Note: all of the LVM tools have excellent /man/
pages, so be advised to read them before using the tools.)

Most modern distributions automatically scan all available hard disks
for logical volume groups and logical volumes at boot time, but
you /may/ have to look at your /init/ scripts to ensure that the new
disk will be scanned as well. This scanning is necessary because
logical volumes are an abstraction layer above the physical layer of
disks and partitions, and thus the kernel needs to be told of the
existence of those volumes before you can mount and access them. The
fact that LVM is an abstraction layer also translates in the need for
the */boot* filesystem - or the root filesystem if you don't have a
separate */boot* partition - to reside on a physical partition if
you're going to use GRUB as a bootloader, because GRUB knows about
partitions and filesystems but GRUB isn't capable of loading a kernel
off a logical volume.

Now, why would you use logical volumes? Well, as I mentioned higher up,
partition sizes are static, and you may want to adjust the size on the
fly depending on your needs. Logical volume management is far more
flexible than fixed-size partitions, eventhough you can of course grow
traditional partitions and filesystems if enough free diskspace is
available, and eventhough even logical volumes have their limitations.

Yet there is a lot more you can do with LVM than with fixed partitions,
and in addition to that, you are not limited to the maximum amount of
regular partitions per disk that the kernel allows - i.e. 15 partitions
per disk with SAS/SCSI/SATA/USB and the newer /libata/ approach to
IDE/PATA disks (i.e. the */dev/sd[az]* device nodes) or 63 partitions
per disk with the older legacy IDE/PATA driver code (i.e. the
*/dev/hd[az]* device nodes).

Considering the dynamic nature of the data you will be storing on that
disk, I definitely recommend using LVM. Create two volumes of about
equal size, or differing size if more appropriate to your present
situation. Make them large enough to hold the data you currently have,
but leave enough extra space available on the disk - or on the
partition, should you choose to create one - to grow either logical
volume when expansion is needed. The extra free space can always be
alotted to either of the two volumes without having to reformat
anything or fiddle with partition tables, simply by using the LVM

Hope this was helpful. Wink
2009-10-13 21:20 GMT   |   #5
To jon_solberg:
I would recommend *physical* locations instead. Psychic locations might
prove interesting but may be a little harder to implement. :pp

(Just kidding, of course - I know that it was a typo and that English is
not your main language. Wink)
2009-10-14 03:20 GMT   |   #6
Oops. I blame it all to aspell. Wink