Re: [gentoo-user] Partitioning strategy...?

2011-11-27 Thread Róbert Čerňanský
On Sun, 27 Nov 2011 00:01:07 +0100
Alex Schuster wo...@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: hslis...@zoznam.sk
Jabber: h...@jabber.sk



Re: [gentoo-user] Partitioning strategy...?

2011-11-27 Thread Dale

Róbert Čerňanský wrote:

On Sun, 27 Nov 2011 00:01:07 +0100
Alex Schusterwo...@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
  Formatlvm2
  Metadata Areas1
  Metadata Sequence No  9
  VG Access read/write
  VG Status resizable
  MAX LV0
  Cur LV1
  Open LV   1
  Max PV0
  Cur PV1
  Act PV1
  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!




Re: [gentoo-user] Partitioning strategy...?

2011-11-27 Thread Alan McKinnon
On Sun, 27 Nov 2011 09:02:37 +0100
Róbert Čerňanský hslis...@zoznam.sk wrote:

 On Sun, 27 Nov 2011 00:01:07 +0100
 Alex Schuster wo...@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.mckin...@gmail.com



Re: [gentoo-user] Partitioning strategy...?

2011-11-27 Thread Alex Schuster
Róbert Čerňanský writes:

 On Sun, 27 Nov 2011 00:01:07 +0100
 Alex Schuster wo...@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



Re: [gentoo-user] Partitioning strategy...?

2011-11-26 Thread Alan McKinnon
On Fri, 25 Nov 2011 08:30:42 -0800
Mark Knecht markkne...@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.mckin...@gmail.com



Re: [gentoo-user] Partitioning strategy...?

2011-11-26 Thread Mick
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 setupG.
 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/sda12048   976773167   4883855605  Extended
 /dev/sda54096  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 29315205804  13% /
 /dev/root   247919 29315205804  13% /
 devtmpfs 10240 0 10240   0% /dev
 rc-svcdir 102444   980   5% /lib/rc/init.d
 mdev 10240 0 10240   0% /dev
 shm1551308 0   1551308   0% /dev/shm
 /dev/sda7483917384 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
 bind0 0 /home/bindmounts/var/var 
 auto bind0 0 /home/bindmounts/usr/usr 
 auto bind0 0 /home/bindmounts/tmp   
 /tmp  auto bind0 0 /dev/sda6  
 noneswapsw  0 0 /dev/cdrom
  /mnt/cdrom  iso9660 noauto,users,ro 0 0 /dev/cdrom1  
   /mnt/cdrom1 autonoauto,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/shmtmpfs 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


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Partitioning strategy...?

2011-11-26 Thread Pandu Poluan
On Nov 26, 2011 2:57 PM, Alan McKinnon alan.mckin...@gmail.com wrote:

 On Fri, 25 Nov 2011 20:53:17 +0700
 Pandu Poluan pa...@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,


Re: [gentoo-user] Partitioning strategy...?

2011-11-26 Thread Pandu Poluan
On Sun, Nov 27, 2011 at 01:22, Mick michaelkintz...@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 setupG.
 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



Re: [gentoo-user] Partitioning strategy...?

2011-11-26 Thread kashani

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



Re: [gentoo-user] Partitioning strategy...?

2011-11-26 Thread Alan McKinnon
On Sun, 27 Nov 2011 01:42:40 +0700
Pandu Poluan pa...@poluan.info wrote:

 On Nov 26, 2011 2:57 PM, Alan McKinnon alan.mckin...@gmail.com
 wrote:
 
  On Fri, 25 Nov 2011 20:53:17 +0700
  Pandu Poluan pa...@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.mckin...@gmail.com



Re: [gentoo-user] Partitioning strategy...?

2011-11-26 Thread Alan McKinnon
On Sun, 27 Nov 2011 02:05:57 +0700
Pandu Poluan pa...@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.mckin...@gmail.com



Re: [gentoo-user] Partitioning strategy...?

2011-11-26 Thread Neil Bothwick
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.


signature.asc
Description: PGP signature


Re: [gentoo-user] Partitioning strategy...?

2011-11-26 Thread Neil Bothwick
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.


signature.asc
Description: PGP signature


Re: [gentoo-user] Partitioning strategy...?

2011-11-26 Thread Alex Schuster
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



Re: [gentoo-user] Partitioning strategy...?

2011-11-26 Thread Neil Bothwick
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!!!


signature.asc
Description: PGP signature


Re: [gentoo-user] Partitioning strategy...?

2011-11-26 Thread Mark Knecht
On Sat, Nov 26, 2011 at 3:32 PM, Neil Bothwick n...@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



Re: [gentoo-user] Partitioning strategy...?

2011-11-26 Thread Neil Bothwick
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.


signature.asc
Description: PGP signature


Re: [gentoo-user] Partitioning strategy...?

2011-11-26 Thread Mark Knecht
On Sat, Nov 26, 2011 at 3:50 PM, Neil Bothwick n...@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



[gentoo-user] Partitioning strategy...?

2011-11-25 Thread Pandu Poluan
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



Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Mark Knecht
On Fri, Nov 25, 2011 at 5:53 AM, Pandu Poluan pa...@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



Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Pandu Poluan
On Fri, Nov 25, 2011 at 21:35, Mark Knecht markkne...@gmail.com wrote:
 On Fri, Nov 25, 2011 at 5:53 AM, Pandu Poluan pa...@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



Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Jarry

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.



Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Mark Knecht
On Fri, Nov 25, 2011 at 8:12 AM, Pandu Poluan pa...@poluan.info wrote:
 On Fri, Nov 25, 2011 at 21:35, Mark Knecht markkne...@gmail.com wrote:
 On Fri, Nov 25, 2011 at 5:53 AM, Pandu Poluan pa...@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



Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Stéphane Guedon
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
/varreiserfs
/tmptmpfs
/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


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Pandu Poluan
On Nov 26, 2011 12:05 AM, Mark Knecht markkne...@gmail.com wrote:

 On Fri, Nov 25, 2011 at 8:12 AM, Pandu Poluan pa...@poluan.info wrote:
  On Fri, Nov 25, 2011 at 21:35, Mark Knecht markkne...@gmail.com wrote:
  On Fri, Nov 25, 2011 at 5:53 AM, Pandu Poluan pa...@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,


Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Pandu Poluan
On Nov 26, 2011 12:06 AM, Stéphane Guedon steph...@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
 /varreiserfs
 /tmptmpfs
 /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,


Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Mark Knecht
On Fri, Nov 25, 2011 at 9:53 AM, Pandu Poluan pa...@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



Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Stéphane Guedon
On Friday 25 November 2011 19:17:07 Mark Knecht wrote:
 On Fri, Nov 25, 2011 at 9:53 AM, Pandu Poluan pa...@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


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Walter Dnes
On Fri, Nov 25, 2011 at 10:17:07AM -0800, Mark Knecht wrote
 On Fri, Nov 25, 2011 at 9:53 AM, Pandu Poluan pa...@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 waltd...@waltdnes.org



Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Dale

Pandu Poluan wrote:



On Nov 26, 2011 12:05 AM, Mark Knecht markkne...@gmail.com 
mailto:markkne...@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.  :-)

sda1Primaryext2[boot]197.41
sda2Primaryswap  [swap]   1003.49
sda3Primaryreiserfs   [root]20003.89
sda5Logical ext3[blank]   5000.98
sda6Logical ext3[portage]   12000.69
sda7Logical reiserfs   [home]  50001.48
sda8Logical 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 way 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.  G!!


Dale

:-)  :-)

--
I am only responsible for what I said ... Not for what you understood or how 
you interpreted my words!



Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Walter Dnes
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 setupG.
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/sda12048   976773167   4883855605  Extended
/dev/sda54096  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 29315205804  13% /
/dev/root   247919 29315205804  13% /
devtmpfs 10240 0 10240   0% /dev
rc-svcdir 102444   980   5% /lib/rc/init.d
mdev 10240 0 10240   0% /dev
shm1551308 0   1551308   0% /dev/shm
/dev/sda7483917384 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,async0 1
/dev/sda7   /home reiserfs noatime,nodiratime,async,notail 0 1
/home/bindmounts/opt/opt  auto bind0 0
/home/bindmounts/var/var  auto bind0 0
/home/bindmounts/usr/usr  auto bind0 0
/home/bindmounts/tmp/tmp  auto bind0 0
/dev/sda6   noneswapsw  0 0
/dev/cdrom  /mnt/cdrom  iso9660 noauto,users,ro 0 0
/dev/cdrom1 /mnt/cdrom1 autonoauto,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/shmtmpfs nodev,nosuid,noexec   0 0
##

-- 
Walter Dnes waltd...@waltdnes.org



Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Mark Knecht
On Fri, Nov 25, 2011 at 11:51 AM, Walter Dnes waltd...@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 pa...@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 waltd...@waltdnes.org


Yes, true, but all I said was that TTBOMK nothing does it
automatically, not that it cannot be automated.

- Mark



Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Dale

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.  G!!


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!



Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Stéphane Guedon
On Friday 25 November 2011 21:09:04 Mark Knecht wrote:
 On Fri, Nov 25, 2011 at 11:51 AM, Walter Dnes waltd...@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 pa...@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 waltd...@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


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Neil Bothwick
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.


signature.asc
Description: PGP signature


Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Neil Bothwick
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.


signature.asc
Description: PGP signature


Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Neil Bothwick
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.


signature.asc
Description: PGP signature


Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Dale

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!




Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Dale

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!




Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Dale

Mark Knecht wrote:

On Fri, Nov 25, 2011 at 11:51 AM, Walter Dneswaltd...@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 Poluanpa...@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 Dneswaltd...@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!




Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Pandu Poluan
On Nov 26, 2011 5:05 AM, Neil Bothwick n...@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,


Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Volker Armin Hemmann
2011/11/25 Pandu Poluan pa...@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.


Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Pandu Poluan
On Nov 26, 2011 9:05 AM, Volker Armin Hemmann volkerar...@googlemail.com
wrote:



 2011/11/25 Pandu Poluan pa...@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,


Re: [gentoo-user] Partitioning strategy...?

2011-11-25 Thread Alan McKinnon
On Fri, 25 Nov 2011 20:53:17 +0700
Pandu Poluan pa...@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.mckin...@gmail.com