* [gentoo-user] Partitioning strategy...?
@ 2011-11-25 13:53 Pandu Poluan
2011-11-25 13:55 ` [gentoo-user] " Pandu Poluan
` (5 more replies)
0 siblings, 6 replies; 53+ messages in thread
From: Pandu Poluan @ 2011-11-25 13:53 UTC (permalink / raw
To: gentoo-user
I want to build a Gentoo server box whose structure is
highly-partitioned, like this:
/
/boot
/usr
/tmp
/usr/portage ==> via NFS
/var
/var/lib/postgresql
/var/tmp
/var/log
/var/spool
(Not all of them will reside on the same physical disk; I have
/dev/sda up to /dev/sdd)
I've been searching high and low for recommended numbers... and there
are as many number as search-hits.
So. Care to share your partitioning strategy?
(And while we're at it, am I overdoing the partitioning?)
Rgds,
--
FdS Pandu E Poluan
~ IT Optimizer ~
• LOPSA Member #15248
• Blog : http://pepoluan.tumblr.com
• Linked-In : http://id.linkedin.com/in/pepoluan
^ permalink raw reply [flat|nested] 53+ messages in thread
* [gentoo-user] Re: Partitioning strategy...?
2011-11-25 13:53 [gentoo-user] Partitioning strategy...? Pandu Poluan
@ 2011-11-25 13:55 ` Pandu Poluan
2011-11-25 19:02 ` Francesco Talamona
2011-11-25 21:43 ` Neil Bothwick
2011-11-25 14:35 ` [gentoo-user] " Mark Knecht
` (4 subsequent siblings)
5 siblings, 2 replies; 53+ messages in thread
From: Pandu Poluan @ 2011-11-25 13:55 UTC (permalink / raw
To: gentoo-user
On Fri, Nov 25, 2011 at 20:53, Pandu Poluan <pandu@poluan.info> wrote:
> I want to build a Gentoo server box whose structure is
> highly-partitioned, like this:
>
> /
> /boot
> /usr
> /tmp
> /usr/portage ==> via NFS
> /var
> /var/lib/postgresql
> /var/tmp
> /var/log
> /var/spool
>
> (Not all of them will reside on the same physical disk; I have
> /dev/sda up to /dev/sdd)
>
> I've been searching high and low for recommended numbers... and there
> are as many number as search-hits.
>
> So. Care to share your partitioning strategy?
>
> (And while we're at it, am I overdoing the partitioning?)
>
I also wonder if /var/tmp can be shared between boxen (via NFS),
assuming I ensure that no two boxen perform emerge at the same time...
Rgds,
--
FdS Pandu E Poluan
~ IT Optimizer ~
• LOPSA Member #15248
• Blog : http://pepoluan.tumblr.com
• Linked-In : http://id.linkedin.com/in/pepoluan
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 13:53 [gentoo-user] Partitioning strategy...? Pandu Poluan
2011-11-25 13:55 ` [gentoo-user] " Pandu Poluan
@ 2011-11-25 14:35 ` Mark Knecht
2011-11-25 16:12 ` Pandu Poluan
2011-11-25 17:00 ` Stéphane Guedon
` (3 subsequent siblings)
5 siblings, 1 reply; 53+ messages in thread
From: Mark Knecht @ 2011-11-25 14:35 UTC (permalink / raw
To: gentoo-user
On Fri, Nov 25, 2011 at 5:53 AM, Pandu Poluan <pandu@poluan.info> wrote:
> I want to build a Gentoo server box whose structure is
> highly-partitioned, like this:
>
> /
> /boot
> /usr
> /tmp
> /usr/portage ==> via NFS
> /var
> /var/lib/postgresql
> /var/tmp
> /var/log
> /var/spool
>
> (Not all of them will reside on the same physical disk; I have
> /dev/sda up to /dev/sdd)
>
> I've been searching high and low for recommended numbers... and there
> are as many number as search-hits.
>
> So. Care to share your partitioning strategy?
>
> (And while we're at it, am I overdoing the partitioning?)
>
> Rgds,
> --
> FdS Pandu E Poluan
> ~ IT Optimizer ~
>
> • LOPSA Member #15248
> • Blog : http://pepoluan.tumblr.com
> • Linked-In : http://id.linkedin.com/in/pepoluan
>
>
I don't use LVM but I suspect that on this list that would be the #1
recommendation to take care of the numbers question.
- Mark
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 14:35 ` [gentoo-user] " Mark Knecht
@ 2011-11-25 16:12 ` Pandu Poluan
2011-11-25 16:25 ` Jarry
` (6 more replies)
0 siblings, 7 replies; 53+ messages in thread
From: Pandu Poluan @ 2011-11-25 16:12 UTC (permalink / raw
To: gentoo-user
On Fri, Nov 25, 2011 at 21:35, Mark Knecht <markknecht@gmail.com> wrote:
> On Fri, Nov 25, 2011 at 5:53 AM, Pandu Poluan <pandu@poluan.info> wrote:
>> I want to build a Gentoo server box whose structure is
>> highly-partitioned, like this:
>>
----- >8 snip
>
> I don't use LVM but I suspect that on this list that would be the #1
> recommendation to take care of the numbers question.
>
Everytime I read some guide on LVM, my eyes becomes blurry, the room
starts spinning, and I can hear wolves howling ... :D
Seriously, LVM looks mighty nice, but it also looks (and is!) mighty complex.
So, I want to start from something simple.
Aaaanyways, after reviewing my production boxes, I decided to
implement the following strategy:
/ == 800 MiB
/boot == 20 MiB
/usr == 1800 MiB
/usr/portage == 2000 MiB
/var == 4000 MiB
/var/lib/postgresql == 1000 MiB
Comments, suggestions, are welcome :)
Rgds,
--
FdS Pandu E Poluan
~ IT Optimizer ~
• LOPSA Member #15248
• Blog : http://pepoluan.tumblr.com
• Linked-In : http://id.linkedin.com/in/pepoluan
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 16:12 ` Pandu Poluan
@ 2011-11-25 16:25 ` Jarry
2011-11-25 16:30 ` Mark Knecht
` (5 subsequent siblings)
6 siblings, 0 replies; 53+ messages in thread
From: Jarry @ 2011-11-25 16:25 UTC (permalink / raw
To: gentoo-user
On 25-Nov-11 17:12, Pandu Poluan wrote:
> / == 800 MiB
> /boot == 20 MiB
> /usr == 1800 MiB
> /usr/portage == 2000 MiB
> /var == 4000 MiB
> /var/lib/postgresql == 1000 MiB
I think it is more than wise to put /tmp on separate
partition, and mount it with nodev/nosuid/noexec.
Malware frequently use tmp to download & compile
some bad tools and run them from there, as tmp
is one of not many world-writable directories...
Jarry
--
_______________________________________________________________
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 16:12 ` Pandu Poluan
2011-11-25 16:25 ` Jarry
@ 2011-11-25 16:30 ` Mark Knecht
2011-11-25 17:23 ` Pandu Poluan
2011-11-26 8:05 ` Alan McKinnon
2011-11-25 17:56 ` [gentoo-user] " James
` (4 subsequent siblings)
6 siblings, 2 replies; 53+ messages in thread
From: Mark Knecht @ 2011-11-25 16:30 UTC (permalink / raw
To: gentoo-user
On Fri, Nov 25, 2011 at 8:12 AM, Pandu Poluan <pandu@poluan.info> wrote:
> On Fri, Nov 25, 2011 at 21:35, Mark Knecht <markknecht@gmail.com> wrote:
>> On Fri, Nov 25, 2011 at 5:53 AM, Pandu Poluan <pandu@poluan.info> wrote:
>>> I want to build a Gentoo server box whose structure is
>>> highly-partitioned, like this:
>>>
>
> ----- >8 snip
>
>>
>> I don't use LVM but I suspect that on this list that would be the #1
>> recommendation to take care of the numbers question.
>>
>
> Everytime I read some guide on LVM, my eyes becomes blurry, the room
> starts spinning, and I can hear wolves howling ... :D
>
> Seriously, LVM looks mighty nice, but it also looks (and is!) mighty complex.
>
I'm exactly as you are WRT to LVM but I admired Dale for giving it a
shot and I'm sorta feeling like I gotta start learn it just to be part
of the group... ;-)
Seriously though, I've done enough RAID (0,1,5 & 6) recently to at
least feel comfortable setting it up. I'm much more worried about
whether I'll be able to handle it when it eventually breaks down. None
the less, with LVM on top of RAID I think I'd get past a lot of
limitations that I run into, and you may, when I picked a certain size
and 1 year down the road it turns out my needs changed.
Still, I glaze over every time... :-)
- Mark
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 13:53 [gentoo-user] Partitioning strategy...? Pandu Poluan
2011-11-25 13:55 ` [gentoo-user] " Pandu Poluan
2011-11-25 14:35 ` [gentoo-user] " Mark Knecht
@ 2011-11-25 17:00 ` Stéphane Guedon
2011-11-25 17:53 ` Pandu Poluan
2011-11-26 1:27 ` Volker Armin Hemmann
` (2 subsequent siblings)
5 siblings, 1 reply; 53+ messages in thread
From: Stéphane Guedon @ 2011-11-25 17:00 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1425 bytes --]
On Friday 25 November 2011 14:53:17 Pandu Poluan wrote:
> I want to build a Gentoo server box whose structure is
> highly-partitioned, like this:
>
> /
> /boot
> /usr
> /tmp
> /usr/portage ==> via NFS
> /var
> /var/lib/postgresql
> /var/tmp
> /var/log
> /var/spool
>
> (Not all of them will reside on the same physical disk; I have
> /dev/sda up to /dev/sdd)
>
> I've been searching high and low for recommended numbers... and there
> are as many number as search-hits.
>
> So. Care to share your partitioning strategy?
>
> (And while we're at it, am I overdoing the partitioning?)
>
> Rgds
I never set /usr separated from / especially on a server : if there's a bug
for any reason, nothing works ! (emerge is in /usr, gcc, ssh doesn't start).
But you are the one who decide !
This is my partition system :
/ ext3/4
/home ext3/4
/var reiserfs
/tmp tmpfs
/tmp_portage tmpfs (specifically for emerge, so I can mount or unmount it when
large compil start)
/mnt/portage reiserfs (shared via nfs)
/mnt/distfiles ext3/4 (shared via nfs)
I am available for any explanation. For the ones who read french I have
written a doc on my website concerning my choices.
--
Stéphane Guedon
page web : http://www.22decembre.eu/
carte de visite : http://www.22decembre.eu/downloads/Stephane-Guedon.vcf
clé publique gpg : http://www.22decembre.eu/downloads/Stephane-Guedon.asc
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 316 bytes --]
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 16:30 ` Mark Knecht
@ 2011-11-25 17:23 ` Pandu Poluan
2011-11-25 20:07 ` Dale
2011-11-26 8:05 ` Alan McKinnon
1 sibling, 1 reply; 53+ messages in thread
From: Pandu Poluan @ 2011-11-25 17:23 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1651 bytes --]
On Nov 26, 2011 12:05 AM, "Mark Knecht" <markknecht@gmail.com> wrote:
>
> On Fri, Nov 25, 2011 at 8:12 AM, Pandu Poluan <pandu@poluan.info> wrote:
> > On Fri, Nov 25, 2011 at 21:35, Mark Knecht <markknecht@gmail.com> wrote:
> >> On Fri, Nov 25, 2011 at 5:53 AM, Pandu Poluan <pandu@poluan.info>
wrote:
> >>> I want to build a Gentoo server box whose structure is
> >>> highly-partitioned, like this:
> >>>
> >
> > ----- >8 snip
> >
> >>
> >> I don't use LVM but I suspect that on this list that would be the #1
> >> recommendation to take care of the numbers question.
> >>
> >
> > Everytime I read some guide on LVM, my eyes becomes blurry, the room
> > starts spinning, and I can hear wolves howling ... :D
> >
> > Seriously, LVM looks mighty nice, but it also looks (and is!) mighty
complex.
> >
>
> I'm exactly as you are WRT to LVM but I admired Dale for giving it a
> shot and I'm sorta feeling like I gotta start learn it just to be part
> of the group... ;-)
>
Hey, not fair! Dale's got a headstart already with multi-partitions :-)
> Seriously though, I've done enough RAID (0,1,5 & 6) recently to at
> least feel comfortable setting it up. I'm much more worried about
> whether I'll be able to handle it when it eventually breaks down. None
> the less, with LVM on top of RAID I think I'd get past a lot of
> limitations that I run into, and you may, when I picked a certain size
> and 1 year down the road it turns out my needs changed.
>
Well, if the numbers I've chosen prove to be off the mark, I'll just
tarball everything and rebuild :-P
In the meantime, before I have to rebuild, I'm going to learn me some LVM
goodness...
Rgds,
[-- Attachment #2: Type: text/html, Size: 2254 bytes --]
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 17:00 ` Stéphane Guedon
@ 2011-11-25 17:53 ` Pandu Poluan
2011-11-25 18:17 ` Mark Knecht
2011-11-25 21:58 ` Neil Bothwick
0 siblings, 2 replies; 53+ messages in thread
From: Pandu Poluan @ 2011-11-25 17:53 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1180 bytes --]
On Nov 26, 2011 12:06 AM, "Stéphane Guedon" <stephane@22decembre.eu> wrote:
>
> On Friday 25 November 2011 14:53:17 Pandu Poluan wrote:
> > I want to build a Gentoo server box whose structure is
> > highly-partitioned, like this:
> >
> > /
> > /boot
> > /usr
> > /tmp
> > /usr/portage ==> via NFS
> > /var
> > /var/lib/postgresql
> > /var/tmp
> > /var/log
> > /var/spool
> >
----- >8 snip
>
> I never set /usr separated from / especially on a server : if there's a
bug
> for any reason, nothing works ! (emerge is in /usr, gcc, ssh doesn't
start).
>
> But you are the one who decide !
>
Well, actually that's the reason why I want to separate /usr: I'm going to
mount it ro to prevent something bad happening to the extremely important
files within.
> This is my partition system :
> / ext3/4
> /home ext3/4
> /var reiserfs
> /tmp tmpfs
> /tmp_portage tmpfs (specifically for emerge, so I can mount or unmount it
when
> large compil start)
> /mnt/portage reiserfs (shared via nfs)
> /mnt/distfiles ext3/4 (shared via nfs)
>
Why do you separate the distfiles from the portage tree?
Rgds,
[-- Attachment #2: Type: text/html, Size: 1578 bytes --]
^ permalink raw reply [flat|nested] 53+ messages in thread
* [gentoo-user] Re: Partitioning strategy...?
2011-11-25 16:12 ` Pandu Poluan
2011-11-25 16:25 ` Jarry
2011-11-25 16:30 ` Mark Knecht
@ 2011-11-25 17:56 ` James
2011-11-25 18:31 ` Pandu Poluan
2011-11-25 18:58 ` Francesco Talamona
` (3 subsequent siblings)
6 siblings, 1 reply; 53+ messages in thread
From: James @ 2011-11-25 17:56 UTC (permalink / raw
To: gentoo-user
Pandu Poluan <pandu <at> poluan.info> writes:
> Everytime I read some guide on LVM, my eyes becomes blurry, the room
> starts spinning, and I can hear wolves howling ... :D
> Seriously, LVM looks mighty nice, but it also looks (and is!) mighty complex.
I feel your pain....
I too have had trouble sorting out new installs with raid, GPT,
and LVM.
Have you seen these guides?
http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml
http://www.rodsbooks.com/gdisk/
> So, I want to start from something simple.
> Comments, suggestions, are welcome :)
(OK)
Well the problem is multifaceted, imho, with LVM being just
a singular issue among the mix. Grub is evolving and the old
grub has troubles with RAID. Add mdadm, disk over 2T, UUID and the
issues becomes really murky quickly.
What (IMHO) needs to happen, is the community needs to write some
install guides, based on notes from several installations, that
allow for various types of installations (with explicit syntax in-line)
that starts from simple to complex.
If we keep using the same installation semantics (examples)
then the only thing that will change is the additional information on
the installation complexity. We could use the new gentoo wiki
for development. I know much of this is redundant with the handbook
for installation, which would still be the "master reference" for
installations, but there would be a multiplicative example base
to compliment the handbook and more specifically focused to the
issues of a given installation. There is precedence for this; The
handbook already has version for different hardware architectures.
So what I'm proposing is that when someone feels motivated, keep notes
on your particular installation details, and post the notes (as
a work in progress) to the gentoo wiki. Then the next time someone
performs an installation, then look at the 'work in progress', use
the example, edit (add more detail) to the example, and update
the wiki. Over time these guides, focused on a particularly specific
example, could be referenced along with the installation handbook,
as a compliment. Just look at the handbook in section 4, Preparing
the disk. Woefully antiquated!
So I would also break it down into (2) main examples. One with a very simple
boot/root/swap scheme and another with many physically separate partitions,
such as (Pandu) seeks. In the second example of many (maximum) partitions, a
discussion of the merits, such as why /tmp should be on a separate
partition and such could be included. In fact, if only these (2) examples were
developed, we could removed the parts of the installation
instructions, such as GPT, or LVM or RAID in order to create
the other simpler installation instruction guides. Also how
you reference the drives (UUID) in the fstab is an
integral part of the installation landscape, that is changing.
Not to mention legacy bios and the latest issue of UEFI.
Personally, I've made several attempts to install a new work station
with RAID 1 on boot/root/swap, using 2T seagate drives, some time
ago. I did not want to use LVM and grub would not boot. I think
I'll give that install another whirl and yes, I'll post to the
wiki, once I get it right.
hth,
James
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 17:53 ` Pandu Poluan
@ 2011-11-25 18:17 ` Mark Knecht
2011-11-25 19:14 ` Stéphane Guedon
2011-11-25 19:51 ` Walter Dnes
2011-11-25 21:58 ` Neil Bothwick
1 sibling, 2 replies; 53+ messages in thread
From: Mark Knecht @ 2011-11-25 18:17 UTC (permalink / raw
To: gentoo-user
On Fri, Nov 25, 2011 at 9:53 AM, Pandu Poluan <pandu@poluan.info> wrote:
<SNIP>
>> /mnt/distfiles ext3/4 (shared via nfs)
>>
>
> Why do you separate the distfiles from the portage tree?
>
> Rgds,
distfiles has a tendency to grow large over the years. IIRC nothing
cleans it up automatically so having it separate is just a simple
safety mechanism to not run out of disk space after emerge -fDuN
@world, etc.
I do it also.
- Mark
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Re: Partitioning strategy...?
2011-11-25 17:56 ` [gentoo-user] " James
@ 2011-11-25 18:31 ` Pandu Poluan
2011-11-26 8:03 ` Alan McKinnon
0 siblings, 1 reply; 53+ messages in thread
From: Pandu Poluan @ 2011-11-25 18:31 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 3867 bytes --]
On Nov 26, 2011 1:05 AM, "James" <wireless@tampabay.rr.com> wrote:
>
> Pandu Poluan <pandu <at> poluan.info> writes:
>
>
> > Everytime I read some guide on LVM, my eyes becomes blurry, the room
> > starts spinning, and I can hear wolves howling ... :D
> > Seriously, LVM looks mighty nice, but it also looks (and is!) mighty
complex.
>
> I feel your pain....
> I too have had trouble sorting out new installs with raid, GPT,
> and LVM.
>
> Have you seen these guides?
>
> http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml
This one I've read. Okay, glanced. After finding myself starting blankly at
the screen for a couple of minutes, I decided to read it again later :-)
> http://www.rodsbooks.com/gdisk/
>
Haven't seen this one before. Gotta check it out. Thanks!
> > So, I want to start from something simple.
> > Comments, suggestions, are welcome :)
>
> (OK)
>
> Well the problem is multifaceted, imho, with LVM being just
> a singular issue among the mix. Grub is evolving and the old
> grub has troubles with RAID. Add mdadm, disk over 2T, UUID and the
> issues becomes really murky quickly.
>
> What (IMHO) needs to happen, is the community needs to write some
> install guides, based on notes from several installations, that
> allow for various types of installations (with explicit syntax in-line)
> that starts from simple to complex.
>
> If we keep using the same installation semantics (examples)
> then the only thing that will change is the additional information on
> the installation complexity. We could use the new gentoo wiki
> for development. I know much of this is redundant with the handbook
> for installation, which would still be the "master reference" for
> installations, but there would be a multiplicative example base
> to compliment the handbook and more specifically focused to the
> issues of a given installation. There is precedence for this; The
> handbook already has version for different hardware architectures.
>
> So what I'm proposing is that when someone feels motivated, keep notes
> on your particular installation details, and post the notes (as
> a work in progress) to the gentoo wiki. Then the next time someone
> performs an installation, then look at the 'work in progress', use
> the example, edit (add more detail) to the example, and update
> the wiki. Over time these guides, focused on a particularly specific
> example, could be referenced along with the installation handbook,
> as a compliment. Just look at the handbook in section 4, Preparing
> the disk. Woefully antiquated!
>
Actually, I have been keeping notes of all my installs, complete with
remarks to keep reminding my why I did this or that.
More for my own documentation, actually. I've honed my installation
procedure so much that it only bears a passing resemblance to the handbook.
I'll try to distill the notes and see if I can upload it to the wiki.
>
> So I would also break it down into (2) main examples. One with a very
simple
> boot/root/swap scheme and another with many physically separate
partitions,
> such as (Pandu) seeks. In the second example of many (maximum)
partitions, a
> discussion of the merits, such as why /tmp should be on a separate
> partition and such could be included. In fact, if only these (2) examples
were
> developed, we could removed the parts of the installation
> instructions, such as GPT, or LVM or RAID in order to create
> the other simpler installation instruction guides. Also how
> you reference the drives (UUID) in the fstab is an
> integral part of the installation landscape, that is changing.
> Not to mention legacy bios and the latest issue of UEFI.
>
I was once somewhat familiar with UUID-based fstab when I was still using
Ubuntu. Too bad I've deleted my last Ubuntu VM a couple of weeks ago. Let's
see if I can still find my installation notes...
Rgds,
[-- Attachment #2: Type: text/html, Size: 4757 bytes --]
^ permalink raw reply [flat|nested] 53+ messages in thread
* [gentoo-user] Re: Partitioning strategy...?
2011-11-25 16:12 ` Pandu Poluan
` (2 preceding siblings ...)
2011-11-25 17:56 ` [gentoo-user] " James
@ 2011-11-25 18:58 ` Francesco Talamona
2011-11-25 20:22 ` Dale
2011-11-25 20:08 ` [gentoo-user] " Walter Dnes
` (2 subsequent siblings)
6 siblings, 1 reply; 53+ messages in thread
From: Francesco Talamona @ 2011-11-25 18:58 UTC (permalink / raw
To: gentoo-user
On Friday 25 November 2011, Pandu Poluan wrote:
> On Fri, Nov 25, 2011 at 21:35, Mark Knecht <markknecht@gmail.com>
wrote:
> > On Fri, Nov 25, 2011 at 5:53 AM, Pandu Poluan <pandu@poluan.info>
wrote:
> >> I want to build a Gentoo server box whose structure is
>
> >> highly-partitioned, like this:
> ----- >8 snip
>
> > I don't use LVM but I suspect that on this list that would be the
> > #1 recommendation to take care of the numbers question.
>
> Everytime I read some guide on LVM, my eyes becomes blurry, the room
> starts spinning, and I can hear wolves howling ... :D
>
> Seriously, LVM looks mighty nice, but it also looks (and is!) mighty
> complex.
>
> So, I want to start from something simple.
>
> Aaaanyways, after reviewing my production boxes, I decided to
> implement the following strategy:
>
> / == 800 MiB
> /boot == 20 MiB
> /usr == 1800 MiB
> /usr/portage == 2000 MiB
> /var == 4000 MiB
> /var/lib/postgresql == 1000 MiB
>
> Comments, suggestions, are welcome :)
>
> Rgds,
IMO /usr/portage and /boot are too small, these are the respective sizes
in my system:
[root@aemaeth:~]$ du -sh /usr/portage
19G /usr/portage
[root@aemaeth:~]$ du -sh /boot
52M /boot
HTH
Francesco
--
Linux Version 3.1.1-gentoo, Compiled #1 SMP PREEMPT Mon Nov 14 07:03:50
CET 2011
Two 1GHz AMD Athlon 64 X2 Processors, 4GB RAM, 4021.84 Bogomips Total
aemaeth
^ permalink raw reply [flat|nested] 53+ messages in thread
* [gentoo-user] Re: Partitioning strategy...?
2011-11-25 13:55 ` [gentoo-user] " Pandu Poluan
@ 2011-11-25 19:02 ` Francesco Talamona
2011-11-25 21:43 ` Neil Bothwick
1 sibling, 0 replies; 53+ messages in thread
From: Francesco Talamona @ 2011-11-25 19:02 UTC (permalink / raw
To: gentoo-user
On Friday 25 November 2011, Pandu Poluan wrote:
> On Fri, Nov 25, 2011 at 20:53, Pandu Poluan <pandu@poluan.info> wrote:
> > I want to build a Gentoo server box whose structure is
> > highly-partitioned, like this:
> >
> > /
> > /boot
> > /usr
> > /tmp
> > /usr/portage ==> via NFS
> > /var
> > /var/lib/postgresql
> > /var/tmp
> > /var/log
> > /var/spool
> >
> > (Not all of them will reside on the same physical disk; I have
> > /dev/sda up to /dev/sdd)
> >
> > I've been searching high and low for recommended numbers... and
> > there are as many number as search-hits.
> >
> > So. Care to share your partitioning strategy?
> >
> > (And while we're at it, am I overdoing the partitioning?)
>
> I also wonder if /var/tmp can be shared between boxen (via NFS),
> assuming I ensure that no two boxen perform emerge at the same
> time...
>
> Rgds,
If you want to mount /var/tmp/portage over NFS you can set in
/etc/make.conf for every machine:
PORTAGE_TMPDIR=/var/tmp/<hostname>
So you won't have to worry about concurrent emerge across different
machines.
Disclaimer: this is an untested idea.
HTH
Francesco
--
Linux Version 3.1.1-gentoo, Compiled #1 SMP PREEMPT Mon Nov 14 07:03:50
CET 2011
Two 1GHz AMD Athlon 64 X2 Processors, 4GB RAM, 4021.84 Bogomips Total
aemaeth
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 18:17 ` Mark Knecht
@ 2011-11-25 19:14 ` Stéphane Guedon
2011-11-25 19:51 ` Walter Dnes
1 sibling, 0 replies; 53+ messages in thread
From: Stéphane Guedon @ 2011-11-25 19:14 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1212 bytes --]
On Friday 25 November 2011 19:17:07 Mark Knecht wrote:
> On Fri, Nov 25, 2011 at 9:53 AM, Pandu Poluan <pandu@poluan.info> wrote:
> <SNIP>
>
> >> /mnt/distfiles ext3/4 (shared via nfs)
> >
> > Why do you separate the distfiles from the portage tree?
> >
> > Rgds,
>
> distfiles has a tendency to grow large over the years. IIRC nothing
> cleans it up automatically so having it separate is just a simple
> safety mechanism to not run out of disk space after emerge -fDuN
> @world, etc.
>
> I do it also.
>
> - Mark
It is also because the portage tree is reiserfs and distfiles ext4.
Actually, it is like it :
/usr
/portage -> reiserfs | both shared through nfs
/distfiles -> ext4 |
/usr
/portage/distfiles | acces on an nfs
When you mount a filesystem B inside an other one A and share the root A
through nfs, it seems you acces (from nfs clients) to the A and the directory
under which is mounted B, but not B itself.
Do you understand me ?
--
Stéphane Guedon
page web : http://www.22decembre.eu/
carte de visite : http://www.22decembre.eu/downloads/Stephane-Guedon.vcf
clé publique gpg : http://www.22decembre.eu/downloads/Stephane-Guedon.asc
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 316 bytes --]
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 18:17 ` Mark Knecht
2011-11-25 19:14 ` Stéphane Guedon
@ 2011-11-25 19:51 ` Walter Dnes
2011-11-25 20:09 ` Mark Knecht
1 sibling, 1 reply; 53+ messages in thread
From: Walter Dnes @ 2011-11-25 19:51 UTC (permalink / raw
To: gentoo-user
On Fri, Nov 25, 2011 at 10:17:07AM -0800, Mark Knecht wrote
> On Fri, Nov 25, 2011 at 9:53 AM, Pandu Poluan <pandu@poluan.info> wrote:
> <SNIP>
> >> /mnt/distfiles ext3/4 (shared via nfs)
> >>
> >
> > Why do you separate the distfiles from the portage tree?
> >
> > Rgds,
>
> distfiles has a tendency to grow large over the years. IIRC nothing
> cleans it up automatically so having it separate is just a simple
> safety mechanism to not run out of disk space after emerge -fDuN
> @world, etc.
man eclean
http://gpio.ca/cgi-bin/man/man2html?1+eclean
--
Walter Dnes <waltdnes@waltdnes.org>
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 17:23 ` Pandu Poluan
@ 2011-11-25 20:07 ` Dale
2011-11-25 20:15 ` Dale
2011-11-25 21:48 ` Neil Bothwick
0 siblings, 2 replies; 53+ messages in thread
From: Dale @ 2011-11-25 20:07 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 3137 bytes --]
Pandu Poluan wrote:
>
>
> On Nov 26, 2011 12:05 AM, "Mark Knecht" <markknecht@gmail.com
> <mailto:markknecht@gmail.com>> wrote:
> >
>
> > I'm exactly as you are WRT to LVM but I admired Dale for giving it a
> > shot and I'm sorta feeling like I gotta start learn it just to be part
> > of the group... ;-)
> >
>
> Hey, not fair! Dale's got a headstart already with multi-partitions :-)
>
>
> In the meantime, before I have to rebuild, I'm going to learn me some
> LVM goodness...
>
> Rgds,
>
I have this on mine:
/
/boot
/home
/usr.portage
/var
/var/tmp/portage on tmpfs. Nice to have 16Gbs of ram. :-)
sda1 Primary ext2 [boot] 197.41
sda2 Primary swap [swap] 1003.49
sda3 Primary reiserfs [root] 20003.89
sda5 Logical ext3 [blank] 5000.98
sda6 Logical ext3 [portage] 12000.69
sda7 Logical reiserfs [home] 50001.48
sda8 Logical ext3 [var] 10001.95
Here is one thing to think about on LVM. If you put /usr on a separate
partition, you will need the init thingy, thanks to the dev at fedora.
Yea, lower case f just like lower case w for winders. Don't make me
spell it the way I want. There is a lady on this list. o_O Anyway, if
you are going to do /usr on a separate partition then you may as well
have LVM. You are going to have the init thingy anyway. You may as
well give the whole bit a try.
LVM has not really been a problem other than me trying to get my
sequence and commands straight. If I was going to install again, I
would likely have it all on LVM except / and /boot. After all, this is
sort of the way fedora does it which is what started the init thingy, in
my opinion anyway. I think a Gentoo dev, a really big one, needs to
poke the fedora dev in the eye, right one since most are right eye
dominant. Might make his keyboard look funny for a while. :/
The init thingy, I have tried making one and booting it. It fails each
and every time. I fix one thing, something else breaks. Google finds
the same problems but no fixes. I can't seem to find a howto that works
for me, including the Gentoo wiki one. Dang fedora !
So, LVM, works fine just have to learn it. The init thing, sucks !!
I think the partitioning scheme varies on what you are doing with your
box tho. For home use, /boot, /, /home and maybe /var. You can do
/usr/portage if fragmentation bothers you. I have a /data thing that I
started waaaaay back when I was new on Linux and using Mandrake. I
really need to move that stuff to my /home directory. I was a bit green
at the time. lol I put my TV shows, .iso files and other junk on
there. That is on LVM since it seems to grow.
Oh, here is a funny one. Imagine walking up to the computer and seeing
knotify taking up 14Gbs of ram. O_O My rig was using all the ram, some
cache and slow as leap year. I kill -9'd that thing. Grrrr!!
Dale
:-) :-)
--
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
[-- Attachment #2: Type: text/html, Size: 4391 bytes --]
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 16:12 ` Pandu Poluan
` (3 preceding siblings ...)
2011-11-25 18:58 ` Francesco Talamona
@ 2011-11-25 20:08 ` Walter Dnes
2011-11-26 18:22 ` Mick
2011-11-25 21:46 ` Neil Bothwick
2011-11-26 23:01 ` Alex Schuster
6 siblings, 1 reply; 53+ messages in thread
From: Walter Dnes @ 2011-11-25 20:08 UTC (permalink / raw
To: gentoo-user
On Fri, Nov 25, 2011 at 11:12:42PM +0700, Pandu Poluan wrote
> Everytime I read some guide on LVM, my eyes becomes blurry, the room
> starts spinning, and I can hear wolves howling ... :D
>
> Seriously, LVM looks mighty nice, but it also looks (and is!) mighty complex.
>
> So, I want to start from something simple.
>
> Aaaanyways, after reviewing my production boxes, I decided to
> implement the following strategy:
>
> / == 800 MiB
> /boot == 20 MiB
> /usr == 1800 MiB
> /usr/portage == 2000 MiB
> /var == 4000 MiB
> /var/lib/postgresql == 1000 MiB
>
> Comments, suggestions, are welcome :)
I have my own weird approach that's even weirder than my mdev setup<G>.
I start with...
* 250 megabytes for / as ext2fs (No that is not a typo)
* 4 gigs for swap
* the rest of the drive is /home as one huge reiserfs partition
And I do *NOT* use LVM. "fdisk -l" shows...
Device Boot Start End Blocks Id System
/dev/sda1 2048 976773167 488385560 5 Extended
/dev/sda5 4096 516095 256000 83 Linux
/dev/sda6 518144 8906751 4194304 83 Linux
/dev/sda7 8908800 976773167 483932184 83 Linux
"df" shows
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 247919 29315 205804 13% /
/dev/root 247919 29315 205804 13% /
devtmpfs 10240 0 10240 0% /dev
rc-svcdir 1024 44 980 5% /lib/rc/init.d
mdev 10240 0 10240 0% /dev
shm 1551308 0 1551308 0% /dev/shm
/dev/sda7 483917384 251951296 231966088 53% /home
The secret is that I bindmount /opt, /var, /usr, and /tmp onto the
large reiserfs partition.
##############################################################################
/dev/sda5 / ext2 noatime,nodiratime,async 0 1
/dev/sda7 /home reiserfs noatime,nodiratime,async,notail 0 1
/home/bindmounts/opt /opt auto bind 0 0
/home/bindmounts/var /var auto bind 0 0
/home/bindmounts/usr /usr auto bind 0 0
/home/bindmounts/tmp /tmp auto bind 0 0
/dev/sda6 none swap sw 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,users,ro 0 0
/dev/cdrom1 /mnt/cdrom1 auto noauto,user,ro 0 0
/dev/sdb1 /mnt/extb auto noauto,user,noatime,async 0 0
/dev/sdc1 /mnt/extc auto noauto,user,noatime,async 0 0
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
##############################################################################
--
Walter Dnes <waltdnes@waltdnes.org>
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 19:51 ` Walter Dnes
@ 2011-11-25 20:09 ` Mark Knecht
2011-11-25 20:30 ` Stéphane Guedon
2011-11-26 0:11 ` Dale
0 siblings, 2 replies; 53+ messages in thread
From: Mark Knecht @ 2011-11-25 20:09 UTC (permalink / raw
To: gentoo-user
On Fri, Nov 25, 2011 at 11:51 AM, Walter Dnes <waltdnes@waltdnes.org> wrote:
> On Fri, Nov 25, 2011 at 10:17:07AM -0800, Mark Knecht wrote
>> On Fri, Nov 25, 2011 at 9:53 AM, Pandu Poluan <pandu@poluan.info> wrote:
>> <SNIP>
>> >> /mnt/distfiles ext3/4 (shared via nfs)
>> >>
>> >
>> > Why do you separate the distfiles from the portage tree?
>> >
>> > Rgds,
>>
>> distfiles has a tendency to grow large over the years. IIRC nothing
>> cleans it up automatically so having it separate is just a simple
>> safety mechanism to not run out of disk space after emerge -fDuN
>> @world, etc.
>
> man eclean
> http://gpio.ca/cgi-bin/man/man2html?1+eclean
>
> --
> Walter Dnes <waltdnes@waltdnes.org>
>
Yes, true, but all I said was that TTBOMK nothing does it
automatically, not that it cannot be automated.
- Mark
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 20:07 ` Dale
@ 2011-11-25 20:15 ` Dale
2011-11-25 21:48 ` Neil Bothwick
1 sibling, 0 replies; 53+ messages in thread
From: Dale @ 2011-11-25 20:15 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 509 bytes --]
Dale wrote:
>
> Oh, here is a funny one. Imagine walking up to the computer and
> seeing knotify taking up 14Gbs of ram. O_O My rig was using all the
> ram, some cache and slow as leap year. I kill -9'd that thing. Grrrr!!
>
> Dale
>
> :-) :-)
Instead of *cache*, make that *swap*. What was I thinking? Oh, still
sort of pissed at fedora over the init thingy. That's it.
Dale
:-) :-)
--
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
[-- Attachment #2: Type: text/html, Size: 1035 bytes --]
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Re: Partitioning strategy...?
2011-11-25 18:58 ` Francesco Talamona
@ 2011-11-25 20:22 ` Dale
0 siblings, 0 replies; 53+ messages in thread
From: Dale @ 2011-11-25 20:22 UTC (permalink / raw
To: gentoo-user
Francesco Talamona wrote:
> IMO /usr/portage and /boot are too small, these are the respective
> sizes in my system: [root@aemaeth:~]$ du -sh /usr/portage 19G
> /usr/portage [root@aemaeth:~]$ du -sh /boot 52M /boot HTH Francesco
This is my size and it works fine with the occasional use of eclean:
/dev/sda6 11535344 5389288 5560088 50% /usr/portage
It's a 12Gb partition and only half full. That is with a full install
of KDE4, LOo and Fluxbox for back-up.
Dale
:-) :-)
--
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 20:09 ` Mark Knecht
@ 2011-11-25 20:30 ` Stéphane Guedon
2011-11-26 0:11 ` Dale
1 sibling, 0 replies; 53+ messages in thread
From: Stéphane Guedon @ 2011-11-25 20:30 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1308 bytes --]
On Friday 25 November 2011 21:09:04 Mark Knecht wrote:
> On Fri, Nov 25, 2011 at 11:51 AM, Walter Dnes <waltdnes@waltdnes.org> wrote:
> > On Fri, Nov 25, 2011 at 10:17:07AM -0800, Mark Knecht wrote
> >
> >> On Fri, Nov 25, 2011 at 9:53 AM, Pandu Poluan <pandu@poluan.info> wrote:
> >> <SNIP>
> >>
> >> >> /mnt/distfiles ext3/4 (shared via nfs)
> >> >
> >> > Why do you separate the distfiles from the portage tree?
> >> >
> >> > Rgds,
> >>
> >> distfiles has a tendency to grow large over the years. IIRC nothing
> >> cleans it up automatically so having it separate is just a simple
> >> safety mechanism to not run out of disk space after emerge -fDuN
> >> @world, etc.
> >
> > man eclean
> > http://gpio.ca/cgi-bin/man/man2html?1+eclean
> >
> > --
> > Walter Dnes <waltdnes@waltdnes.org>
>
> Yes, true, but all I said was that TTBOMK nothing does it
> automatically, not that it cannot be automated.
>
> - Mark
I find something on forums.gentoo.org that is called distfiles-cleanup. it's a
perl scrit to clean distfiles by release order. Search it.
--
Stéphane Guedon
page web : http://www.22decembre.eu/
carte de visite : http://www.22decembre.eu/downloads/Stephane-Guedon.vcf
clé publique gpg : http://www.22decembre.eu/downloads/Stephane-Guedon.asc
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 316 bytes --]
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Re: Partitioning strategy...?
2011-11-25 13:55 ` [gentoo-user] " Pandu Poluan
2011-11-25 19:02 ` Francesco Talamona
@ 2011-11-25 21:43 ` Neil Bothwick
1 sibling, 0 replies; 53+ messages in thread
From: Neil Bothwick @ 2011-11-25 21:43 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 370 bytes --]
On Fri, 25 Nov 2011 20:55:02 +0700, Pandu Poluan wrote:
> I also wonder if /var/tmp can be shared between boxen (via NFS),
> assuming I ensure that no two boxen perform emerge at the same time...
That will really slow down emerges.
--
Neil Bothwick
Psychiatrists say that 1 of 4 people are mentally ill.
Check three friends. If they're OK, you're it.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 16:12 ` Pandu Poluan
` (4 preceding siblings ...)
2011-11-25 20:08 ` [gentoo-user] " Walter Dnes
@ 2011-11-25 21:46 ` Neil Bothwick
2011-11-25 23:58 ` Dale
2011-11-26 1:16 ` Pandu Poluan
2011-11-26 23:01 ` Alex Schuster
6 siblings, 2 replies; 53+ messages in thread
From: Neil Bothwick @ 2011-11-25 21:46 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 761 bytes --]
On Fri, 25 Nov 2011 23:12:42 +0700, Pandu Poluan wrote:
> > I don't use LVM but I suspect that on this list that would be the #1
> > recommendation to take care of the numbers question.
> Everytime I read some guide on LVM, my eyes becomes blurry, the room
> starts spinning, and I can hear wolves howling ... :D
>
> Seriously, LVM looks mighty nice, but it also looks (and is!) mighty
> complex.
It may look it, but you only have to learn the concepts once. That many
physical partitions will be extra work forever, imagine what happens when
one of the middle ones is no longer big enough.
Seriously, spend half an hour reading up on LVM and you'll never regret
it.
--
Neil Bothwick
RAM disk is *not* an installation procedure.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 20:07 ` Dale
2011-11-25 20:15 ` Dale
@ 2011-11-25 21:48 ` Neil Bothwick
2011-11-25 23:47 ` Dale
1 sibling, 1 reply; 53+ messages in thread
From: Neil Bothwick @ 2011-11-25 21:48 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 483 bytes --]
On Fri, 25 Nov 2011 14:07:48 -0600, Dale wrote:
> Here is one thing to think about on LVM. If you put /usr on a separate
> partition, you will need the init thingy, thanks to the dev at fedora.
Not yet you don't. I'm happily running a separate /usr (LVM has nothing
to do with it) without an initramfs. On my new box, I do have an
initramfs, but that's because I have / on LVM, soon to be on an encrypted
volume.
--
Neil Bothwick
Assassins do it from behind.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 17:53 ` Pandu Poluan
2011-11-25 18:17 ` Mark Knecht
@ 2011-11-25 21:58 ` Neil Bothwick
1 sibling, 0 replies; 53+ messages in thread
From: Neil Bothwick @ 2011-11-25 21:58 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 442 bytes --]
On Sat, 26 Nov 2011 00:53:57 +0700, Pandu Poluan wrote:
> Why do you separate the distfiles from the portage tree?
A better question is why put the distfiles in the middle of the portage
tree? It really makes no sense, they are two very different types of data.
A separate DISTDIR also makes sense when sharing it over NFS between
various machines.
--
Neil Bothwick
If at first you don't succeed, call in an airstrike.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 21:48 ` Neil Bothwick
@ 2011-11-25 23:47 ` Dale
0 siblings, 0 replies; 53+ messages in thread
From: Dale @ 2011-11-25 23:47 UTC (permalink / raw
To: gentoo-user
Neil Bothwick wrote:
> On Fri, 25 Nov 2011 14:07:48 -0600, Dale wrote:
>
>> Here is one thing to think about on LVM. If you put /usr on a separate
>> partition, you will need the init thingy, thanks to the dev at fedora.
> Not yet you don't. I'm happily running a separate /usr (LVM has nothing
> to do with it) without an initramfs. On my new box, I do have an
> initramfs, but that's because I have / on LVM, soon to be on an encrypted
> volume.
>
>
That was what I meant to say. If he has / on LVM, he needs a init
thingy even now.
You don't need the init thingy for a separate /usr now but we all know
it is coming. I wouldn't want him to do a nice install then run into a
known coming issue that throws things into a mess. Heck, even I don't
want to reinstall just for the heck of it. I don't many who does.
Thanks for clarifying my point tho. Maybe I do need to drink coffee
when I first get up. :/
Dale
:-) :-)
--
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 21:46 ` Neil Bothwick
@ 2011-11-25 23:58 ` Dale
2011-11-26 21:30 ` Neil Bothwick
2011-11-26 1:16 ` Pandu Poluan
1 sibling, 1 reply; 53+ messages in thread
From: Dale @ 2011-11-25 23:58 UTC (permalink / raw
To: gentoo-user
Neil Bothwick wrote:
> On Fri, 25 Nov 2011 23:12:42 +0700, Pandu Poluan wrote:
>
>>> I don't use LVM but I suspect that on this list that would be the #1
>>> recommendation to take care of the numbers question.
>> Everytime I read some guide on LVM, my eyes becomes blurry, the room
>> starts spinning, and I can hear wolves howling ... :D
>>
>> Seriously, LVM looks mighty nice, but it also looks (and is!) mighty
>> complex.
> It may look it, but you only have to learn the concepts once. That many
> physical partitions will be extra work forever, imagine what happens when
> one of the middle ones is no longer big enough.
>
> Seriously, spend half an hour reading up on LVM and you'll never regret
> it.
>
>
Besides, even I can use LVM now. I even reduced one and took a drive
off, mostly to learn. Between Neil and Alan, plus others, you would
have some good helpers here. Heck, read over my old threads. I even
posted the commands I used to remove a drive a few days ago. There's
not much better than having someone that has already done it to post the
commands used. At least then you know it works.
Am I going to put / on LVM, not yet. I'm still a can or two short of a
six pack. I got to get the init thingy to work and work WELL first.
If I were you, I would at least try to put /boot and / outside LVM then
everything else on LVM. Just make sure /boot and / have PLENTY of space
since they are pretty much committed at that point. This is something I
am thinking of doing on my rig and one reason I removed the a drive from
LVM. I needed some space to swap things around even from a CD/DVD boot.
Once you learn how to use it, it really is nice. Setting it up is not
bad at all. It's when you need to move data that you can't back up or
afford to lose that it gets hairy. That is true for traditional
partitions to tho.
Dale
:-) :-)
--
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 20:09 ` Mark Knecht
2011-11-25 20:30 ` Stéphane Guedon
@ 2011-11-26 0:11 ` Dale
1 sibling, 0 replies; 53+ messages in thread
From: Dale @ 2011-11-26 0:11 UTC (permalink / raw
To: gentoo-user
Mark Knecht wrote:
> On Fri, Nov 25, 2011 at 11:51 AM, Walter Dnes<waltdnes@waltdnes.org> wrote:
>> On Fri, Nov 25, 2011 at 10:17:07AM -0800, Mark Knecht wrote
>>> On Fri, Nov 25, 2011 at 9:53 AM, Pandu Poluan<pandu@poluan.info> wrote:
>>> <SNIP>
>>>>> /mnt/distfiles ext3/4 (shared via nfs)
>>>>>
>>>> Why do you separate the distfiles from the portage tree?
>>>>
>>>> Rgds,
>>> distfiles has a tendency to grow large over the years. IIRC nothing
>>> cleans it up automatically so having it separate is just a simple
>>> safety mechanism to not run out of disk space after emerge -fDuN
>>> @world, etc.
>> man eclean
>> http://gpio.ca/cgi-bin/man/man2html?1+eclean
>>
>> --
>> Walter Dnes<waltdnes@waltdnes.org>
>>
> Yes, true, but all I said was that TTBOMK nothing does it
> automatically, not that it cannot be automated.
>
> - Mark
>
>
I use http-replicator and I wish it would clean distfiles from it
instead of /usr/portage/distfiles. When I run repcacheman, it cleans
out distfiles already. I just need to clean up http-rep's directory.
Right now, I do a emerge -ef world, rm http-rep's stuff then run
repcacheman again. Thing is, it cleans out all the stuff my x86 box
needs that my amd64 box doesn't since I always forget to run emerge -ef
world on the x86 box too. < sighs >
Dale
:-) :-)
--
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 21:46 ` Neil Bothwick
2011-11-25 23:58 ` Dale
@ 2011-11-26 1:16 ` Pandu Poluan
1 sibling, 0 replies; 53+ messages in thread
From: Pandu Poluan @ 2011-11-26 1:16 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 929 bytes --]
On Nov 26, 2011 5:05 AM, "Neil Bothwick" <neil@digimed.co.uk> wrote:
>
> On Fri, 25 Nov 2011 23:12:42 +0700, Pandu Poluan wrote:
>
> > > I don't use LVM but I suspect that on this list that would be the #1
> > > recommendation to take care of the numbers question.
>
> > Everytime I read some guide on LVM, my eyes becomes blurry, the room
> > starts spinning, and I can hear wolves howling ... :D
> >
> > Seriously, LVM looks mighty nice, but it also looks (and is!) mighty
> > complex.
>
> It may look it, but you only have to learn the concepts once. That many
> physical partitions will be extra work forever, imagine what happens when
> one of the middle ones is no longer big enough.
>
> Seriously, spend half an hour reading up on LVM and you'll never regret
> it.
>
Oh, I certainly will. But not now. I need to get this box up, staged, and
productioned ASAP.
Afterwards, I'll commit myself to understanding LVM.
Rgds,
[-- Attachment #2: Type: text/html, Size: 1196 bytes --]
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 13:53 [gentoo-user] Partitioning strategy...? Pandu Poluan
` (2 preceding siblings ...)
2011-11-25 17:00 ` Stéphane Guedon
@ 2011-11-26 1:27 ` Volker Armin Hemmann
2011-11-26 2:56 ` Pandu Poluan
2011-11-26 7:54 ` Alan McKinnon
2011-11-26 19:24 ` kashani
5 siblings, 1 reply; 53+ messages in thread
From: Volker Armin Hemmann @ 2011-11-26 1:27 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 873 bytes --]
2011/11/25 Pandu Poluan <pandu@poluan.info>
> I want to build a Gentoo server box whose structure is
> highly-partitioned, like this:
>
> /
> /boot
>
okay
> /usr
>
why? just makes your life harder.
> /tmp
>
okay
> /usr/portage ==> via NFS
>
if it makes you happy...
> /var
>
okay
> /var/lib/postgresql
>
?
/var/tmp
>
okay
> /var/log
>
why?
/var/spool
>
why?
>
> (Not all of them will reside on the same physical disk; I have
> /dev/sda up to /dev/sdd)
>
> I've been searching high and low for recommended numbers... and there
> are as many number as search-hits.
>
> So. Care to share your partitioning strategy?
>
if you really have to split up /var like this, do yourself some favours and
spread it over several disks. Also don't put /var and /usr on the same
disk.
>
> (And while we're at it, am I overdoing the partitioning?)
>
yes, a lot.
[-- Attachment #2: Type: text/html, Size: 2702 bytes --]
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-26 1:27 ` Volker Armin Hemmann
@ 2011-11-26 2:56 ` Pandu Poluan
0 siblings, 0 replies; 53+ messages in thread
From: Pandu Poluan @ 2011-11-26 2:56 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1300 bytes --]
On Nov 26, 2011 9:05 AM, "Volker Armin Hemmann" <volkerarmin@googlemail.com>
wrote:
>
>
>
> 2011/11/25 Pandu Poluan <pandu@poluan.info>
>>
>> I want to build a Gentoo server box whose structure is
>> highly-partitioned, like this:
>>
>> /
>> /boot
>
>
> okay
>
>>
>> /usr
>
>
> why? just makes your life harder.
>
Why will it make my life harder.
>>
>> /tmp
>
>
> okay
>
>>
>> /usr/portage ==> via NFS
>
>
> if it makes you happy...
>
The portage tree will be shared among Gentoo boxen.
>>
>> /var
>
>
> okay
>
>>
>> /var/lib/postgresql
>
>
> ?
>
I'm using PostgreSQL, and the database IMO should be safely kept in a
separate partition.
>> /var/tmp
>
>
> okay
>
>>
>> /var/log
>
>
> why?
>
Postfix's log files are huge.
>> /var/spool
>
>
> why?
Postfix.
>>
>>
>> (Not all of them will reside on the same physical disk; I have
>> /dev/sda up to /dev/sdd)
>>
>> I've been searching high and low for recommended numbers... and there
>> are as many number as search-hits.
>>
>> So. Care to share your partitioning strategy?
>
>
> if you really have to split up /var like this, do yourself some favours
and spread it over several disks. Also don't put /var and /usr on the same
disk.
>
Indeed.
>>
>>
>> (And while we're at it, am I overdoing the partitioning?)
>
>
> yes, a lot.
>
:-)
Rgds,
[-- Attachment #2: Type: text/html, Size: 2281 bytes --]
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 13:53 [gentoo-user] Partitioning strategy...? Pandu Poluan
` (3 preceding siblings ...)
2011-11-26 1:27 ` Volker Armin Hemmann
@ 2011-11-26 7:54 ` Alan McKinnon
2011-11-26 18:42 ` Pandu Poluan
2011-11-26 19:24 ` kashani
5 siblings, 1 reply; 53+ messages in thread
From: Alan McKinnon @ 2011-11-26 7:54 UTC (permalink / raw
To: gentoo-user
On Fri, 25 Nov 2011 20:53:17 +0700
Pandu Poluan <pandu@poluan.info> wrote:
> I want to build a Gentoo server box whose structure is
> highly-partitioned, like this:
partition setups are like lovers - highly variable. And the one that
suits you will suit almost no-one else.
Many of the recommendations you find on-line come from an earlier time
and the reason they got going is no longer valid for the most part. So
do take care to evaluate the real reason why you are doing something.
Valid reasons included:
You want to unmount a dir structure (/boot).
The fs type for a partition is different from that fs it mounts to
(often /var/log but these days most often used with tmpfs).
You need to mount an fs with different mount options to the fs it
mounts onto (/home noexec on multi-user setups for example)
The way to do this is not to search Google for recommendations, as
there is no such valid thing, but to figure out for yourself why you
want a mountpoint, calculate how much space *you* need, then do it.
Read other's experiences who use similar software as you by all means,
but that will be mere hints.
My own thoughts:
- I can't find a good reason anymore to have a local /usr separate. It's
always mounted on my systems, even in maintenance mode (there's
always at least one decent tool that the distro decided to put
in /usr/sbin)
- /tmp is only useful on it's own if it's a tmpfs. Mine hasn't ever
filled up anywhere (despite best efforts of users). tmpfs is general
is an awesome idea.
- Keeping data and code separate is always a good idea. But only a few
things in /var are critical like /var/log and /var/<database>.
Everything else is usually tiny and can safely live on /
- /boot is traditionally separate partly because long long long ago
BIOSs couldn't read past 1024 cylinders which borked lilo. This is no
longer true.
>
> /
> /boot
> /usr
> /tmp
> /usr/portage ==> via NFS
> /var
> /var/lib/postgresql
> /var/tmp
> /var/log
> /var/spool
>
> (Not all of them will reside on the same physical disk; I have
> /dev/sda up to /dev/sdd)
>
> I've been searching high and low for recommended numbers... and there
> are as many number as search-hits.
>
> So. Care to share your partitioning strategy?
>
> (And while we're at it, am I overdoing the partitioning?)
>
> Rgds,
--
Alan McKinnnon
alan.mckinnon@gmail.com
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Re: Partitioning strategy...?
2011-11-25 18:31 ` Pandu Poluan
@ 2011-11-26 8:03 ` Alan McKinnon
2011-11-26 8:32 ` Dale
0 siblings, 1 reply; 53+ messages in thread
From: Alan McKinnon @ 2011-11-26 8:03 UTC (permalink / raw
To: gentoo-user
On Sat, 26 Nov 2011 01:31:28 +0700
Pandu Poluan <pandu@poluan.info> wrote:
> I was once somewhat familiar with UUID-based fstab when I was still
> using Ubuntu. Too bad I've deleted my last Ubuntu VM a couple of
> weeks ago. Let's see if I can still find my installation notes...
>
That's the easy part.
Column 1 in /etc/fstab identifies which partition is to be mounted.
Identifiers need to be unique.
Device names in /dev/ are no longer stable, they can and do move around
and change.
User-defined labels are a good choice but users can and do re-use the
same labels.
All filesystems generate a GUID for themselves and these are guaranteed
to be unique in the universe, so simply put it in column 1 and mount
will never ever get it wrong.
Ubuntu takes this approach to be able to give guarantees about
installers. It works well. Until you find you want to edit fstab by
hand.
--
Alan McKinnnon
alan.mckinnon@gmail.com
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 16:30 ` Mark Knecht
2011-11-25 17:23 ` Pandu Poluan
@ 2011-11-26 8:05 ` Alan McKinnon
1 sibling, 0 replies; 53+ messages in thread
From: Alan McKinnon @ 2011-11-26 8:05 UTC (permalink / raw
To: gentoo-user
On Fri, 25 Nov 2011 08:30:42 -0800
Mark Knecht <markknecht@gmail.com> wrote:
> > Seriously, LVM looks mighty nice, but it also looks (and is!)
> > mighty complex.
>
> I'm exactly as you are WRT to LVM but I admired Dale for giving it a
> shot and I'm sorta feeling like I gotta start learn it just to be part
> of the group... ;-)
The only reasons people find LVM complicated is that the man pages
could stand some re-writing and that most of the guides out on the
intartubes and writing by people equally confused. They give a bunch of
examples and don't explain what all the building blocks of LVM are.
Neil said earlier to spend an hour learning it - this is excellent
advice.
The gentoo docs were very good last time I looked at them, but that was
3+ years ago. I doubt they've changed much.
--
Alan McKinnnon
alan.mckinnon@gmail.com
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Re: Partitioning strategy...?
2011-11-26 8:03 ` Alan McKinnon
@ 2011-11-26 8:32 ` Dale
0 siblings, 0 replies; 53+ messages in thread
From: Dale @ 2011-11-26 8:32 UTC (permalink / raw
To: gentoo-user
Alan McKinnon wrote:
> On Sat, 26 Nov 2011 01:31:28 +0700
> Pandu Poluan<pandu@poluan.info> wrote:
>
>> I was once somewhat familiar with UUID-based fstab when I was still
>> using Ubuntu. Too bad I've deleted my last Ubuntu VM a couple of
>> weeks ago. Let's see if I can still find my installation notes...
>>
> That's the easy part.
>
> Column 1 in /etc/fstab identifies which partition is to be mounted.
> Identifiers need to be unique.
>
> Device names in /dev/ are no longer stable, they can and do move around
> and change.
> User-defined labels are a good choice but users can and do re-use the
> same labels.
> All filesystems generate a GUID for themselves and these are guaranteed
> to be unique in the universe, so simply put it in column 1 and mount
> will never ever get it wrong.
>
> Ubuntu takes this approach to be able to give guarantees about
> installers. It works well. Until you find you want to edit fstab by
> hand.
>
I installed Kubuntu for my brother and I noticed it uses UUID in fstab
too. I also like that it commented where the partition was when Kubuntu
was originally installed. That helps if you chroot in and are not sure
what partition is what but found the fstab file, most likely / at that
point. Then you can mount whatever is listed in fstab using UUID or the
regular device names if nothing has changed.
I might add, if you chose to use UUID, man blkid will be your friend.
Dale
:-) :-)
--
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 20:08 ` [gentoo-user] " Walter Dnes
@ 2011-11-26 18:22 ` Mick
2011-11-26 19:05 ` Pandu Poluan
0 siblings, 1 reply; 53+ messages in thread
From: Mick @ 2011-11-26 18:22 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 3558 bytes --]
On Friday 25 Nov 2011 20:08:01 Walter Dnes wrote:
> On Fri, Nov 25, 2011 at 11:12:42PM +0700, Pandu Poluan wrote
>
> > Everytime I read some guide on LVM, my eyes becomes blurry, the room
> > starts spinning, and I can hear wolves howling ... :D
> >
> > Seriously, LVM looks mighty nice, but it also looks (and is!) mighty
> > complex.
> >
> > So, I want to start from something simple.
> >
> > Aaaanyways, after reviewing my production boxes, I decided to
> > implement the following strategy:
> >
> > / == 800 MiB
> > /boot == 20 MiB
> > /usr == 1800 MiB
> > /usr/portage == 2000 MiB
> > /var == 4000 MiB
> > /var/lib/postgresql == 1000 MiB
> >
> > Comments, suggestions, are welcome :)
>
> I have my own weird approach that's even weirder than my mdev setup<G>.
> I start with...
> * 250 megabytes for / as ext2fs (No that is not a typo)
> * 4 gigs for swap
> * the rest of the drive is /home as one huge reiserfs partition
>
> And I do *NOT* use LVM. "fdisk -l" shows...
>
> Device Boot Start End Blocks Id System
> /dev/sda1 2048 976773167 488385560 5 Extended
> /dev/sda5 4096 516095 256000 83 Linux
> /dev/sda6 518144 8906751 4194304 83 Linux
> /dev/sda7 8908800 976773167 483932184 83 Linux
>
> "df" shows
>
> Filesystem 1K-blocks Used Available Use% Mounted on
> rootfs 247919 29315 205804 13% /
> /dev/root 247919 29315 205804 13% /
> devtmpfs 10240 0 10240 0% /dev
> rc-svcdir 1024 44 980 5% /lib/rc/init.d
> mdev 10240 0 10240 0% /dev
> shm 1551308 0 1551308 0% /dev/shm
> /dev/sda7 483917384 251951296 231966088 53% /home
>
> The secret is that I bindmount /opt, /var, /usr, and /tmp onto the
> large reiserfs partition.
>
###########################################################################
> ### /dev/sda5 / ext2 noatime,nodiratime,async
> 0 1 /dev/sda7 /home reiserfs
> noatime,nodiratime,async,notail 0 1 /home/bindmounts/opt /opt auto
> bind 0 0 /home/bindmounts/var /var
> auto bind 0 0 /home/bindmounts/usr /usr
> auto bind 0 0 /home/bindmounts/tmp
> /tmp auto bind 0 0 /dev/sda6
> none swap sw 0 0 /dev/cdrom
> /mnt/cdrom iso9660 noauto,users,ro 0 0 /dev/cdrom1
> /mnt/cdrom1 auto noauto,user,ro 0 0 /dev/sdb1
> /mnt/extb auto noauto,user,noatime,async 0 0 /dev/sdc1
> /mnt/extc auto noauto,user,noatime,async 0 0
>
> # glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
> # POSIX shared memory (shm_open, shm_unlink).
> # (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
> # use almost no memory if not populated with files)
> shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
>
###########################################################################
> ###
I recall your interesting mounting approach, but never really understood the
benefit of it. Would you please explain why you use bindmount?
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-26 7:54 ` Alan McKinnon
@ 2011-11-26 18:42 ` Pandu Poluan
2011-11-26 20:58 ` Alan McKinnon
2011-11-26 21:08 ` Neil Bothwick
0 siblings, 2 replies; 53+ messages in thread
From: Pandu Poluan @ 2011-11-26 18:42 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 2466 bytes --]
On Nov 26, 2011 2:57 PM, "Alan McKinnon" <alan.mckinnon@gmail.com> wrote:
>
> On Fri, 25 Nov 2011 20:53:17 +0700
> Pandu Poluan <pandu@poluan.info> wrote:
>
> > I want to build a Gentoo server box whose structure is
> > highly-partitioned, like this:
>
> partition setups are like lovers - highly variable. And the one that
> suits you will suit almost no-one else.
>
Careful, you've just raised some unholy memories there ;-)
> Many of the recommendations you find on-line come from an earlier time
> and the reason they got going is no longer valid for the most part. So
> do take care to evaluate the real reason why you are doing something.
>
> Valid reasons included:
>
> You want to unmount a dir structure (/boot).
> The fs type for a partition is different from that fs it mounts to
> (often /var/log but these days most often used with tmpfs).
> You need to mount an fs with different mount options to the fs it
> mounts onto (/home noexec on multi-user setups for example)
>
> The way to do this is not to search Google for recommendations, as
> there is no such valid thing, but to figure out for yourself why you
> want a mountpoint, calculate how much space *you* need, then do it.
Indeed, that's what I originally asked: the numbers.
> Read other's experiences who use similar software as you by all means,
> but that will be mere hints.
>
> My own thoughts:
>
> - I can't find a good reason anymore to have a local /usr separate. It's
> always mounted on my systems, even in maintenance mode (there's
> always at least one decent tool that the distro decided to put
> in /usr/sbin)
>
Mounting it ro not a good idea?
> - /tmp is only useful on it's own if it's a tmpfs. Mine hasn't ever
> filled up anywhere (despite best efforts of users). tmpfs is general
> is an awesome idea.
>
Noted.
> - Keeping data and code separate is always a good idea. But only a few
> things in /var are critical like /var/log and /var/<database>.
> Everything else is usually tiny and can safely live on /
>
Except /var/tmp, which can grow to epic proportions :-)
> - /boot is traditionally separate partly because long long long ago
> BIOSs couldn't read past 1024 cylinders which borked lilo. This is no
> longer true.
>
I'm a bit scared that a buggy program or script borked the kernels I put
there...
Thus also the reason to mount /usr ro.
And if I can make /bin /sbin /etc all ro, I want to make them ro, too...
Am I being too paranoid?
Rgds,
[-- Attachment #2: Type: text/html, Size: 3115 bytes --]
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-26 18:22 ` Mick
@ 2011-11-26 19:05 ` Pandu Poluan
2011-11-26 21:07 ` Alan McKinnon
0 siblings, 1 reply; 53+ messages in thread
From: Pandu Poluan @ 2011-11-26 19:05 UTC (permalink / raw
To: gentoo-user
On Sun, Nov 27, 2011 at 01:22, Mick <michaelkintzios@gmail.com> wrote:
> On Friday 25 Nov 2011 20:08:01 Walter Dnes wrote:
>> On Fri, Nov 25, 2011 at 11:12:42PM +0700, Pandu Poluan wrote
>>
>> > Everytime I read some guide on LVM, my eyes becomes blurry, the room
>> > starts spinning, and I can hear wolves howling ... :D
>> >
>> > Seriously, LVM looks mighty nice, but it also looks (and is!) mighty
>> > complex.
>> >
>> > So, I want to start from something simple.
>> >
>> > Aaaanyways, after reviewing my production boxes, I decided to
>> > implement the following strategy:
>> >
>> > / == 800 MiB
>> > /boot == 20 MiB
>> > /usr == 1800 MiB
>> > /usr/portage == 2000 MiB
>> > /var == 4000 MiB
>> > /var/lib/postgresql == 1000 MiB
>> >
>> > Comments, suggestions, are welcome :)
>>
>> I have my own weird approach that's even weirder than my mdev setup<G>.
>> I start with...
>> * 250 megabytes for / as ext2fs (No that is not a typo)
>> * 4 gigs for swap
>> * the rest of the drive is /home as one huge reiserfs partition
>>
>> And I do *NOT* use LVM. "fdisk -l" shows...
>>
>> Device Boot Start End Blocks Id System
>> /dev/sda1 2048 976773167 488385560 5 Extended
>> /dev/sda5 4096 516095 256000 83 Linux
>> /dev/sda6 518144 8906751 4194304 83 Linux
>> /dev/sda7 8908800 976773167 483932184 83 Linux
>>
>> "df" shows
>>
>> Filesystem 1K-blocks Used Available Use% Mounted on
>> rootfs 247919 29315 205804 13% /
>> /dev/root 247919 29315 205804 13% /
>> devtmpfs 10240 0 10240 0% /dev
>> rc-svcdir 1024 44 980 5% /lib/rc/init.d
>> mdev 10240 0 10240 0% /dev
>> shm 1551308 0 1551308 0% /dev/shm
>> /dev/sda7 483917384 251951296 231966088 53% /home
>>
>> The secret is that I bindmount /opt, /var, /usr, and /tmp onto the
>> large reiserfs partition.
>>
> ###########################################################################
>> ### /dev/sda5 / ext2 noatime,nodiratime,async
>> 0 1 /dev/sda7 /home reiserfs
>> noatime,nodiratime,async,notail 0 1 /home/bindmounts/opt /opt auto
>> bind 0 0 /home/bindmounts/var /var
>> auto bind 0 0 /home/bindmounts/usr /usr
>> auto bind 0 0 /home/bindmounts/tmp
>> /tmp auto bind 0 0 /dev/sda6
>> none swap sw 0 0 /dev/cdrom
>> /mnt/cdrom iso9660 noauto,users,ro 0 0 /dev/cdrom1
>> /mnt/cdrom1 auto noauto,user,ro 0 0 /dev/sdb1
>> /mnt/extb auto noauto,user,noatime,async 0 0 /dev/sdc1
>> /mnt/extc auto noauto,user,noatime,async 0 0
>>
>> # glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
>> # POSIX shared memory (shm_open, shm_unlink).
>> # (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
>> # use almost no memory if not populated with files)
>> shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
>>
> ###########################################################################
>> ###
>
> I recall your interesting mounting approach, but never really understood the
> benefit of it. Would you please explain why you use bindmount?
>
Not really explaining waltdnes' interesting layout, but using
bindmount (instead of symlinks) ensures that when a program tries to
find a relative directory from a path, it will not attempt to do so
from the symlink's target.
E.g.:
Say I have /lib/gzampl/, which is actually a symlink/bindmount to
/mnt/gzampl/. Then theres another directory /lib/morethings. With a
symlink, if a program wants to do "../morethings" from within
/lib/gzampl/, it might end up in /mnt/morethings if the program tries
to resolve the symlink first. With a bindmount, doing "../morethings"
from /lib/gzampl/ will always end up in /lib/morethings.
(CMIIW)
That said... mentioning bindmount made me rethink things...
What if I have:
/mnt/.temporaries ==> ext4, 4GiB
/mnt/.persistents ==> reiserfs, 2GiB
then I make some directories and bindmounts:
/mnt/.temporaries/tmp --bm--> /tmp
/mnt/.temporaries/vartmp --bm--> /var/tmp
/mnt/.temporaries/run --bm--> /run
/run --bm--> /var/run
/run/lock --bm--> /var/lock
/mnt/.persistents/postgresql --bm--> /var/lib/postgresql
/mnt/.persistents/vardb --bm--> /var/db
/mnt/.persistents/varlog --bm--> /var/log
/mnt/.persistents/varspool --bm--> /var/spool
Ta da! The ephemeral directories can now just fight among themselves,
and the important directories can be backed up in one fell swoop (via
/mnt/.persistents)?
Thoughts are welcome, of course :)
Rgds,
--
FdS Pandu E Poluan
~ IT Optimizer ~
• LOPSA Member #15248
• Blog : http://pepoluan.tumblr.com
• Linked-In : http://id.linkedin.com/in/pepoluan
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 13:53 [gentoo-user] Partitioning strategy...? Pandu Poluan
` (4 preceding siblings ...)
2011-11-26 7:54 ` Alan McKinnon
@ 2011-11-26 19:24 ` kashani
5 siblings, 0 replies; 53+ messages in thread
From: kashani @ 2011-11-26 19:24 UTC (permalink / raw
To: gentoo-user
On 11/25/2011 5:53 AM, Pandu Poluan wrote:
>
> So. Care to share your partitioning strategy?
I'm not a fan of building servers outta parts. If this is a proper
server with a raid card, which is useful for high IO things like mail
and db servers, then your favorite RAID level, /boot / swap and the rest
in /var.
If they are separate drives then put the OS/portage on one, Postgres on
another, Postfix on one, and logging on the last for the best IO. I'd
call them /mnt/postgres /mnt/postfix and /mnt/logging so the sysadmin
that comes after you isn't completely confused as to what's going on.
If IO isn't a huge priority I'd put the OS/Portage on one and then
softraid the three drives into /data or some such and symlink Postgres,
logging, and Postfix as appropriate.
> (And while we're at it, am I overdoing the partitioning?)
Yes, though you'll do it anyway. It's cool, I was spending time on the
same thing ten years ago. It's ultimately more annoying than useful and
you'll simplify later.
LVM is always good to know and very useful for snapshotting database
backups. I find it less useful for changing partitions or adding drives.
In regards to filling up partitions monitoring, cron, and logrotate are
your friends. I email at 70% and page at 80%.
kashani
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-26 18:42 ` Pandu Poluan
@ 2011-11-26 20:58 ` Alan McKinnon
2011-11-26 21:08 ` Neil Bothwick
1 sibling, 0 replies; 53+ messages in thread
From: Alan McKinnon @ 2011-11-26 20:58 UTC (permalink / raw
To: gentoo-user
On Sun, 27 Nov 2011 01:42:40 +0700
Pandu Poluan <pandu@poluan.info> wrote:
> On Nov 26, 2011 2:57 PM, "Alan McKinnon" <alan.mckinnon@gmail.com>
> wrote:
> >
> > On Fri, 25 Nov 2011 20:53:17 +0700
> > Pandu Poluan <pandu@poluan.info> wrote:
> >
> > > I want to build a Gentoo server box whose structure is
> > > highly-partitioned, like this:
> >
> > partition setups are like lovers - highly variable. And the one that
> > suits you will suit almost no-one else.
> >
>
> Careful, you've just raised some unholy memories there ;-)
>
> > Many of the recommendations you find on-line come from an earlier
> > time and the reason they got going is no longer valid for the most
> > part. So do take care to evaluate the real reason why you are doing
> > something.
> >
> > Valid reasons included:
> >
> > You want to unmount a dir structure (/boot).
> > The fs type for a partition is different from that fs it mounts to
> > (often /var/log but these days most often used with tmpfs).
> > You need to mount an fs with different mount options to the fs it
> > mounts onto (/home noexec on multi-user setups for example)
> >
> > The way to do this is not to search Google for recommendations, as
> > there is no such valid thing, but to figure out for yourself why you
> > want a mountpoint, calculate how much space *you* need, then do it.
>
> Indeed, that's what I originally asked: the numbers.
>
> > Read other's experiences who use similar software as you by all
> > means, but that will be mere hints.
> >
> > My own thoughts:
> >
> > - I can't find a good reason anymore to have a local /usr separate.
> > It's always mounted on my systems, even in maintenance mode (there's
> > always at least one decent tool that the distro decided to put
> > in /usr/sbin)
> >
>
> Mounting it ro not a good idea?
Personally, I find an ro /usr a gigantic PITA. I'm the kind of guy that
will forget to remount it before emerge too many times, then write a
wrapper script around emerge. Thus effectively undoing the entire
benefot of having it ro at all :-)
I also remember the the brain-dead rpm maintainer from RedHat. rpm
would happily update it's database then bail out halfway through the
install() phase if /usr was mounted ro, leaving the database
irreversibly corrupt. For three years this person refused to consider
this a bug even though rpm could easily detect the condition in advance
every single time (i.e. a classic case of verify you *can* write
something before writing it).
Such stories make me fearful of a local /usr mounted ro. Your needs may
differ.
A remote /usr mounted over NFS remotely as a terminal server - that's a
different story altogether.
>
> > - /tmp is only useful on it's own if it's a tmpfs. Mine hasn't ever
> > filled up anywhere (despite best efforts of users). tmpfs is
> > general is an awesome idea.
> >
>
> Noted.
>
> > - Keeping data and code separate is always a good idea. But only a
> > few things in /var are critical like /var/log and /var/<database>.
> > Everything else is usually tiny and can safely live on /
> >
>
> Except /var/tmp, which can grow to epic proportions :-)
As a sysadmin of a real server I would expect no less from you than a
Nagios instance that mails you before the point of epicness :-)
> > - /boot is traditionally separate partly because long long long ago
> > BIOSs couldn't read past 1024 cylinders which borked lilo. This is
> > no longer true.
> >
>
> I'm a bit scared that a buggy program or script borked the kernels I
> put there...
>
> Thus also the reason to mount /usr ro.
Following on from above, consider this:
The only thing you will allow to write to /usr is emerge, right? And
like most folks you don't check every bit of what it does?
So the buggy scripts you are in fear of will be ebuilds. And yet, you
will always allow then to be installed without prior checks.
So why do you plan to have safeguards when you know in advance you
will always suspend them?
> And if I can make /bin /sbin /etc all ro, I want to make them ro,
> too...
>
> Am I being too paranoid?
Yes.
You are causing yourself an insane amount of work for no good reason
and it will drive you beserk in a week. Or you will implement
workarounds.
Normally only root can write to those areas. Only root can remount
them. If a user gets into a position where they can overwrite things,
you have already lost every last measure of protection and the game is
already over.
What you need is a proper backup strategy with restores that actually
work.
--
Alan McKinnnon
alan.mckinnon@gmail.com
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-26 19:05 ` Pandu Poluan
@ 2011-11-26 21:07 ` Alan McKinnon
0 siblings, 0 replies; 53+ messages in thread
From: Alan McKinnon @ 2011-11-26 21:07 UTC (permalink / raw
To: gentoo-user
On Sun, 27 Nov 2011 02:05:57 +0700
Pandu Poluan <pandu@poluan.info> wrote:
> Not really explaining waltdnes' interesting layout, but using
> bindmount (instead of symlinks) ensures that when a program tries to
> find a relative directory from a path, it will not attempt to do so
> from the symlink's target.
[snip]
> Ta da! The ephemeral directories can now just fight among
themselves,
> and the important directories can be backed up in one fell swoop (via
> /mnt/.persistents)?
>
> Thoughts are welcome, of course :)
>
> Rgds,
That's an interesting solution but I still don't understand the problem
it solves.
What actual real-world threat does this counter? Not a theoretical
threat, an actual real one, and why do you think you need to stop
software using relative paths?
Not to rain on your parade, but it just sounds a lot like chrooting
named - a huge amount of work, a real PITA for the maintainer, lots and
lots of warm fuzzies for PHBs, but no real actual benefit overall.
--
Alan McKinnnon
alan.mckinnon@gmail.com
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-26 18:42 ` Pandu Poluan
2011-11-26 20:58 ` Alan McKinnon
@ 2011-11-26 21:08 ` Neil Bothwick
1 sibling, 0 replies; 53+ messages in thread
From: Neil Bothwick @ 2011-11-26 21:08 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 540 bytes --]
On Sun, 27 Nov 2011 01:42:40 +0700, Pandu Poluan wrote:
> > - Keeping data and code separate is always a good idea. But only a few
> > things in /var are critical like /var/log and /var/<database>.
> > Everything else is usually tiny and can safely live on /
> Except /var/tmp, which can grow to epic proportions :-)
Put PORTAGE_TMPDIR on its own filesystem (possibly tmpfs) and that will no
longer happen.
--
Neil Bothwick
Q How many screws are there in a lesbians coffin?
A None. It's all tongue and groove.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 23:58 ` Dale
@ 2011-11-26 21:30 ` Neil Bothwick
0 siblings, 0 replies; 53+ messages in thread
From: Neil Bothwick @ 2011-11-26 21:30 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 592 bytes --]
On Fri, 25 Nov 2011 17:58:55 -0600, Dale wrote:
> If I were you, I would at least try to put /boot and / outside LVM then
> everything else on LVM. Just make sure /boot and / have PLENTY of
> space since they are pretty much committed at that point.
I find 400MB for / (and no separate /boot) to be ample space, usually
only 50% full. Everything else then goes in LVs. This is (soon to be was)
one of the advantages of a small / and separate /usr, all the flexibility
of LVM without the need for an initramfs.
--
Neil Bothwick
Save the whales. Collect the whole set.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-25 16:12 ` Pandu Poluan
` (5 preceding siblings ...)
2011-11-25 21:46 ` Neil Bothwick
@ 2011-11-26 23:01 ` Alex Schuster
2011-11-26 23:32 ` Neil Bothwick
2011-11-27 8:02 ` Róbert Čerňanský
6 siblings, 2 replies; 53+ messages in thread
From: Alex Schuster @ 2011-11-26 23:01 UTC (permalink / raw
To: gentoo-user
Pandu Poluan writes:
> Everytime I read some guide on LVM, my eyes becomes blurry, the room
> starts spinning, and I can hear wolves howling ... :D
>
> Seriously, LVM looks mighty nice, but it also looks (and is!) mighty
> complex.
I really don't think so. pvcreate <partition> creates a physical volume,
vgcreate <vgname> <partition> starts a volume group, and lvcreate -n
<name> -L <size> <vgname> creates a logical volume that you can use as
if it were a physical partition.
pvcreate /dev/sda5
vgcreate myvg /dev/sda5
lvcreate -n usr -L 10G myvg
mke2fs -j /dev/myvg/usr
> So, I want to start from something simple.
Of course, just using /dev/sda5 for /usr is simpler. But what if this
turns out to be too small? With so many partitions I would think this is
very likely to happen sooner or later. With LVM, all you'd have to do is:
lvresize -L +1G /dev/myvg/usr
resize2fs /dev/myvg/usr
Takes 10 seconds plus the time you need to type this, and you have 1G of
more space. Otherwise, you'd probably have to boot from another system
and use something like parted to move stuff around. Or move stuff like
/usr/src to other partitions.
Another neat featurea are snapshots, this is nice for backups.
> Comments, suggestions, are welcome :)
I also have many partitons, but I've overdone italready.
I like to have all big partitions separated in order to prevent / from
becoming full, so I have /home, /opt, /tmp, /usr and /var. I also have
/usr/{local,src}. And a big partition for /var/portage, contining tree
(sometimes on its own partition), distfiles and tmpdir. And /home. And
/data/{mp3,mpeg}. And /32 for my 32 bit chroot Gentoo. And /backup for
all sorts of backups, including a sub-directory with another partiton
for each of the partitions above. All are LUKS-encrypted, and it takes a
while during bootup until they are all opened. But then, I reboot very
seldomly.
Wonko
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-26 23:01 ` Alex Schuster
@ 2011-11-26 23:32 ` Neil Bothwick
2011-11-26 23:43 ` Mark Knecht
2011-11-27 8:02 ` Róbert Čerňanský
1 sibling, 1 reply; 53+ messages in thread
From: Neil Bothwick @ 2011-11-26 23:32 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 675 bytes --]
On Sun, 27 Nov 2011 00:01:07 +0100, Alex Schuster wrote:
> > Seriously, LVM looks mighty nice, but it also looks (and is!) mighty
> > complex.
>
> I really don't think so. pvcreate <partition> creates a physical volume,
> vgcreate <vgname> <partition> starts a volume group, and lvcreate -n
> <name> -L <size> <vgname> creates a logical volume that you can use as
> if it were a physical partition.
The problem people have with LVM is not working with PVs, VGs and LVs, it
is understanding what they are and how they fit together. Once that is
clear, the system becomes as simple as you stated.
--
Neil Bothwick
I cna ytpe 300 wrods pre mniuet!!!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-26 23:32 ` Neil Bothwick
@ 2011-11-26 23:43 ` Mark Knecht
2011-11-26 23:50 ` Neil Bothwick
0 siblings, 1 reply; 53+ messages in thread
From: Mark Knecht @ 2011-11-26 23:43 UTC (permalink / raw
To: gentoo-user
On Sat, Nov 26, 2011 at 3:32 PM, Neil Bothwick <neil@digimed.co.uk> wrote:
> On Sun, 27 Nov 2011 00:01:07 +0100, Alex Schuster wrote:
>
>> > Seriously, LVM looks mighty nice, but it also looks (and is!) mighty
>> > complex.
>>
>> I really don't think so. pvcreate <partition> creates a physical volume,
>> vgcreate <vgname> <partition> starts a volume group, and lvcreate -n
>> <name> -L <size> <vgname> creates a logical volume that you can use as
>> if it were a physical partition.
>
> The problem people have with LVM is not working with PVs, VGs and LVs, it
> is understanding what they are and how they fit together. Once that is
> clear, the system becomes as simple as you stated.
>
>
> --
> Neil Bothwick
I have a machine I built a couple of years ago that has a good Intel
MB & processor (i5-661) from that time frame, and the machine already
has Gentoo on it, but the hard drives where more or less what I had
hanging around at the time so it ended up with 4 smallish drives. 3
for Gentoo, 1 for Windows. Would it be a reasonable training exercise
to take a new 1TB drive and do some sort of rsync copy of those 3
drives into some sort of a LVM and see how it works?
- Mark
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-26 23:43 ` Mark Knecht
@ 2011-11-26 23:50 ` Neil Bothwick
2011-11-26 23:58 ` Mark Knecht
0 siblings, 1 reply; 53+ messages in thread
From: Neil Bothwick @ 2011-11-26 23:50 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1108 bytes --]
On Sat, 26 Nov 2011 15:43:21 -0800, Mark Knecht wrote:
> > The problem people have with LVM is not working with PVs, VGs and
> > LVs, it is understanding what they are and how they fit together.
> > Once that is clear, the system becomes as simple as you stated.
> I have a machine I built a couple of years ago that has a good Intel
> MB & processor (i5-661) from that time frame, and the machine already
> has Gentoo on it, but the hard drives where more or less what I had
> hanging around at the time so it ended up with 4 smallish drives. 3
> for Gentoo, 1 for Windows. Would it be a reasonable training exercise
> to take a new 1TB drive and do some sort of rsync copy of those 3
> drives into some sort of a LVM and see how it works?
Yes, although you could also manage it without a new drive. It's a more
challenging exercise, and probably not for an LVM novice, but you could
convert the three drives into a single volume group without recourse to
another drive, provided they weren't all 90% full.
--
Neil Bothwick
Definition of Trust: Two cannibals having oral sex.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-26 23:50 ` Neil Bothwick
@ 2011-11-26 23:58 ` Mark Knecht
0 siblings, 0 replies; 53+ messages in thread
From: Mark Knecht @ 2011-11-26 23:58 UTC (permalink / raw
To: gentoo-user
On Sat, Nov 26, 2011 at 3:50 PM, Neil Bothwick <neil@digimed.co.uk> wrote:
> On Sat, 26 Nov 2011 15:43:21 -0800, Mark Knecht wrote:
>
>> > The problem people have with LVM is not working with PVs, VGs and
>> > LVs, it is understanding what they are and how they fit together.
>> > Once that is clear, the system becomes as simple as you stated.
>
>> I have a machine I built a couple of years ago that has a good Intel
>> MB & processor (i5-661) from that time frame, and the machine already
>> has Gentoo on it, but the hard drives where more or less what I had
>> hanging around at the time so it ended up with 4 smallish drives. 3
>> for Gentoo, 1 for Windows. Would it be a reasonable training exercise
>> to take a new 1TB drive and do some sort of rsync copy of those 3
>> drives into some sort of a LVM and see how it works?
>
> Yes, although you could also manage it without a new drive. It's a more
> challenging exercise, and probably not for an LVM novice, but you could
> convert the three drives into a single volume group without recourse to
> another drive, provided they weren't all 90% full.
>
>
> --
> Neil Bothwick
They are all small drives (80GB or 160GB) and they are all over 90%
full. They are also fairly slow and draw higher power than the 1TB
drive so I figure I'll save a few bucks on electricity each month by
doing it.
Not sure if I'll try moving Windows to the same drive. Seems like I
should as it will remove another drive from the box.
- Mark
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-26 23:01 ` Alex Schuster
2011-11-26 23:32 ` Neil Bothwick
@ 2011-11-27 8:02 ` Róbert Čerňanský
2011-11-27 8:12 ` Dale
` (2 more replies)
1 sibling, 3 replies; 53+ messages in thread
From: Róbert Čerňanský @ 2011-11-27 8:02 UTC (permalink / raw
To: gentoo-user
On Sun, 27 Nov 2011 00:01:07 +0100
Alex Schuster <wonko@wonkology.org> wrote:
> pvcreate /dev/sda5
> vgcreate myvg /dev/sda5
> lvcreate -n usr -L 10G myvg
> mke2fs -j /dev/myvg/usr
>
> Of course, just using /dev/sda5 for /usr is simpler. But what if this
> turns out to be too small? With so many partitions I would think this
> is very likely to happen sooner or later. With LVM, all you'd have to
> do is:
>
> lvresize -L +1G /dev/myvg/usr
> resize2fs /dev/myvg/usr
Here I do not understand from where this +1G is taken? Don't you have
to make something smaller by 1G first?
Robert
--
Róbert Čerňanský
E-mail: hslists2@zoznam.sk
Jabber: hs@jabber.sk
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-27 8:02 ` Róbert Čerňanský
@ 2011-11-27 8:12 ` Dale
2011-11-27 8:29 ` Alan McKinnon
2011-11-27 9:31 ` Alex Schuster
2 siblings, 0 replies; 53+ messages in thread
From: Dale @ 2011-11-27 8:12 UTC (permalink / raw
To: gentoo-user
Róbert Čerňanský wrote:
> On Sun, 27 Nov 2011 00:01:07 +0100
> Alex Schuster<wonko@wonkology.org> wrote:
>
>> pvcreate /dev/sda5
>> vgcreate myvg /dev/sda5
>> lvcreate -n usr -L 10G myvg
>> mke2fs -j /dev/myvg/usr
>>
>> Of course, just using /dev/sda5 for /usr is simpler. But what if this
>> turns out to be too small? With so many partitions I would think this
>> is very likely to happen sooner or later. With LVM, all you'd have to
>> do is:
>>
>> lvresize -L +1G /dev/myvg/usr
>> resize2fs /dev/myvg/usr
> Here I do not understand from where this +1G is taken? Don't you have
> to make something smaller by 1G first?
>
> Robert
>
>
Nope. Not if you have 1Gb of space that is not used yet. Here is a
example:
root@fireball / # vgdisplay
--- Volume group ---
VG Name data
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 9
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 698.63 GiB
PE Size 4.00 MiB
Total PE 178850
Alloc PE / Size 102400 / 400.00 GiB
Free PE / Size 76450 / 298.63 GiB
VG UUID eNF7B0-3BDb-qe1W-5FTH-4Uah-wRe1-xD7Xa8
root@fireball / #
Right now there is 400Gbs of space used. I have 298Gbs of free space.
If I wanted to add some space to something, lvresize -L +1G /dev/<path
to lv here> would get it added then just resize the file system.
That help?
Dale
:-) :-)
--
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-27 8:02 ` Róbert Čerňanský
2011-11-27 8:12 ` Dale
@ 2011-11-27 8:29 ` Alan McKinnon
2011-11-27 9:31 ` Alex Schuster
2 siblings, 0 replies; 53+ messages in thread
From: Alan McKinnon @ 2011-11-27 8:29 UTC (permalink / raw
To: gentoo-user
On Sun, 27 Nov 2011 09:02:37 +0100
Róbert Čerňanský <hslists2@zoznam.sk> wrote:
> On Sun, 27 Nov 2011 00:01:07 +0100
> Alex Schuster <wonko@wonkology.org> wrote:
>
> > pvcreate /dev/sda5
> > vgcreate myvg /dev/sda5
> > lvcreate -n usr -L 10G myvg
> > mke2fs -j /dev/myvg/usr
> >
> > Of course, just using /dev/sda5 for /usr is simpler. But what if
> > this turns out to be too small? With so many partitions I would
> > think this is very likely to happen sooner or later. With LVM, all
> > you'd have to do is:
> >
> > lvresize -L +1G /dev/myvg/usr
> > resize2fs /dev/myvg/usr
>
> Here I do not understand from where this +1G is taken? Don't you have
> to make something smaller by 1G first?
The 1G is taken from the free pool of unused extents. This assumes you
have free extents, if not, then you do need to free some up somwehere
else first.
Using LVM is a lot like using a SAN - don't allocate everything right
at the beginning, rather give each lv what it needs today and grow it
as space needs change. This way you always have free extents available
for use.
--
Alan McKinnnon
alan.mckinnon@gmail.com
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [gentoo-user] Partitioning strategy...?
2011-11-27 8:02 ` Róbert Čerňanský
2011-11-27 8:12 ` Dale
2011-11-27 8:29 ` Alan McKinnon
@ 2011-11-27 9:31 ` Alex Schuster
2 siblings, 0 replies; 53+ messages in thread
From: Alex Schuster @ 2011-11-27 9:31 UTC (permalink / raw
To: gentoo-user
Róbert Čerňanský writes:
> On Sun, 27 Nov 2011 00:01:07 +0100
> Alex Schuster <wonko@wonkology.org> wrote:
>
> > pvcreate /dev/sda5
> > vgcreate myvg /dev/sda5
> > lvcreate -n usr -L 10G myvg
> > mke2fs -j /dev/myvg/usr
> >
> > Of course, just using /dev/sda5 for /usr is simpler. But what if this
> > turns out to be too small? With so many partitions I would think this
> > is very likely to happen sooner or later. With LVM, all you'd have to
> > do is:
> >
> > lvresize -L +1G /dev/myvg/usr
> > resize2fs /dev/myvg/usr
>
> Here I do not understand from where this +1G is taken? Don't you have
> to make something smaller by 1G first?
I assumed that /dev/sda5 is large enough and has free space that is not
being used for logical volumes. The lvcreate -L 10G step creates a
logical volume of 10 GB size, the rest of the volume group (that is using
the physical volume /dev/sda5) is being unused. You can create other
logical volumes with lvcreate, or extend existing ones, until all of that
space is being used. Then, you need to make something smaller of course
(which can be done), or you can extend your volume group by another
partition. Which may be on the same drive, or even on another one.
pvcreate /dev/sda6
vgextend myvg /dev/sda6
lvresize...
Wonko
^ permalink raw reply [flat|nested] 53+ messages in thread
end of thread, other threads:[~2011-11-27 9:32 UTC | newest]
Thread overview: 53+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-25 13:53 [gentoo-user] Partitioning strategy...? Pandu Poluan
2011-11-25 13:55 ` [gentoo-user] " Pandu Poluan
2011-11-25 19:02 ` Francesco Talamona
2011-11-25 21:43 ` Neil Bothwick
2011-11-25 14:35 ` [gentoo-user] " Mark Knecht
2011-11-25 16:12 ` Pandu Poluan
2011-11-25 16:25 ` Jarry
2011-11-25 16:30 ` Mark Knecht
2011-11-25 17:23 ` Pandu Poluan
2011-11-25 20:07 ` Dale
2011-11-25 20:15 ` Dale
2011-11-25 21:48 ` Neil Bothwick
2011-11-25 23:47 ` Dale
2011-11-26 8:05 ` Alan McKinnon
2011-11-25 17:56 ` [gentoo-user] " James
2011-11-25 18:31 ` Pandu Poluan
2011-11-26 8:03 ` Alan McKinnon
2011-11-26 8:32 ` Dale
2011-11-25 18:58 ` Francesco Talamona
2011-11-25 20:22 ` Dale
2011-11-25 20:08 ` [gentoo-user] " Walter Dnes
2011-11-26 18:22 ` Mick
2011-11-26 19:05 ` Pandu Poluan
2011-11-26 21:07 ` Alan McKinnon
2011-11-25 21:46 ` Neil Bothwick
2011-11-25 23:58 ` Dale
2011-11-26 21:30 ` Neil Bothwick
2011-11-26 1:16 ` Pandu Poluan
2011-11-26 23:01 ` Alex Schuster
2011-11-26 23:32 ` Neil Bothwick
2011-11-26 23:43 ` Mark Knecht
2011-11-26 23:50 ` Neil Bothwick
2011-11-26 23:58 ` Mark Knecht
2011-11-27 8:02 ` Róbert Čerňanský
2011-11-27 8:12 ` Dale
2011-11-27 8:29 ` Alan McKinnon
2011-11-27 9:31 ` Alex Schuster
2011-11-25 17:00 ` Stéphane Guedon
2011-11-25 17:53 ` Pandu Poluan
2011-11-25 18:17 ` Mark Knecht
2011-11-25 19:14 ` Stéphane Guedon
2011-11-25 19:51 ` Walter Dnes
2011-11-25 20:09 ` Mark Knecht
2011-11-25 20:30 ` Stéphane Guedon
2011-11-26 0:11 ` Dale
2011-11-25 21:58 ` Neil Bothwick
2011-11-26 1:27 ` Volker Armin Hemmann
2011-11-26 2:56 ` Pandu Poluan
2011-11-26 7:54 ` Alan McKinnon
2011-11-26 18:42 ` Pandu Poluan
2011-11-26 20:58 ` Alan McKinnon
2011-11-26 21:08 ` Neil Bothwick
2011-11-26 19:24 ` kashani
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox