[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
Re: Main server partitioning strategy
- Subject: Re: Main server partitioning strategy
- From: "liakakos" <ukha@xxxxxxxxxxxxxxxxx>
- Date: Sun, 18 Sep 2005 08:43:34 -0000
The simplest way to do what you're talking about is to use LVM
(logical volume manager). It allows just what you're after by the
sounds of it. Basically, you bundle all your disks into an LVM volume
group, and then use LVM to create virtual partitions as required.
Here's how to do it...
First of all, create a partition on each disk that spans the entire
disks. Set the type to 8e. Then, prep it for use with LVM.
Assuming these disks are hdc and hdd:
pvcreate /dev/hdc1
pvcreate /dev/hdd1
Now, create the volume group, telling it which partitions to include:
vgcreate VolGroup01 /dev/hdc1 /dev/hdd1
Now you can create some volumes. A 50G volume with a name of LogVol00:
lvcreate -L 50G -n LogVol00 VolGroup01
With LVM You can create volumes that sit on a single disk (you can use
the lvcreate command to specify a particular one if required), or span
disks if there isn't enough space on one, or you can stripe across
multiple disks for performance.
Anyway, next, create a filesystem on it:
mke2fs -j /dev/VolGroup01/LogVol00
In /etc/fstab, you'd put something like this:
/dev/VolGroup01/LogVol00 /opt/CD_Rips ext3fs defaults 0 0
Now mount it:
mount /opt/CD_Rips
(Assuming you'd created the directory first!)
That's it.
Now, suppose you need more space, then you just add the new disk to
the volume group, and extend the volume dynamically. Firstly, add the
new disk having created a single partition.
pvcreate /dev/hde1
vgextend VolGroup01 /dev/hde1
Now extend the virtual partition:
lvextend -L 100G /dev/VolGroup01/LogVol00
Finally extend the filesystem:
resize2fs /dev/VolGroup01/LogVol00 100G
There's your starter course in LVM. Any questions?
Cheers,
Steve
--- In ukha_d@xxxxxxx, Jim Noble <yahoo-groups@b...> wrote:
>
> (I figure this is sort of on topic - feel free to tell me to take
it
> offline if not!)
>
> Ok, so I've just plopped a couple of 1/4 Tb discs into my linux
server
> which I intend to start filling with CD & DVD rips, photos,
videos,
> zoneminder data, etc etc.
>
> I figure now would be a good time to decide on the partition
strategy :*)
>
> Does anyone have a words of wisdom they'd care to impart with
regards to
> paritioning large discs for use with linux?
>
> I'm saving the two onboard RAID-aware SATA channels for a mirror of
the
> 120Gb boot device (when I've liberated it's twin from another
machine).
> So I'm using two of the remaining four non-RAID SATA channels.
>
> Besides, I know I don't want to stripe (not robust enough) or
mirror
> (lose too much space) the new discs, and I guess that a s/w N-way
RAID-5
> array using partitions on two physical discs would be somewhat
pointless
> (the more partitions, the more likely a drive failure would wipe
you
> out, right?)
>
> But there are still several ways it could be done.
>
> Single partitions on each drive would be a pain to repair (fsck).
>
> I believe there's a way to join multiple partitions into a single
> virtual device though (using md?), so I'm currently thinking that
I'll
> split each disc into 3 or 4 partitions, and join them into 2 or 3
> virtual drives (keeping recoverable data (CD/DVD rips etc) separate
so
> they don't have to be backed up with the rest). I think I can then
add
> in more storage space on the fly if/when I add more discs.
>
> Sound sensible?
>
> Jim
UKHA_D Main Index |
UKHA_D Thread Index |
UKHA_D Home |
Archives Home
|