public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] 500 meg / partition (including /boot) *WITHOUT USING LVM*
@ 2007-09-02 14:32 Walter Dnes
  2007-09-02 19:15 ` Neil Bothwick
  0 siblings, 1 reply; 30+ messages in thread
From: Walter Dnes @ 2007-09-02 14:32 UTC (permalink / raw
  To: Gentoo Users List

  While installing Gentoo recently, I managed to pull off a cute stunt
that...
a) minimizes wasted disk space
b) retains the ability to wipe and re-install the OS, without wiping
   user data

  I'm considering doing a Gentoo Wiki entry, if one hasn't already been
done.  First, I'll run it past the list for comments and any problems
you may find.  (Update: after a read-through, it occurs to me that I
should probably bindmount /opt similarly to /tmp, /usr, and /var).

  The example below uses /dev/sda.  Substitute as appropriate for your
system (hda or wharever)

Step 1) Partition a blank hard drive.

- partition the entire hard drive (500 gigabytes in my case) as one
  gigantic extended partition (partition 1)

- create a 500 megabyte logical linux (type 83) partition of at the
  beginning of the extended partition (partition 5).  This will be the
  / partition

- next, create a logical linux swap (type 82) partition approx twice
  the size of your ram (partition 6).

- next, create a logical linux (type 83) partition using the remainder
  of the drive (partition 7).  This will be mounted as /home.  Here's
  what my drive looks like, according to "fdisk -l"

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       60801   488384001    5  Extended
/dev/sda5               1          62      497952   83  Linux
/dev/sda6              63         549     3911796   82  Linux swap / Solaris
/dev/sda7             550       60801   483974158+  83  Linux

  Step 2) File system creation... *WARNING* the following script wipes
all data on partitions 5, 6, and 7.  Use this only when you want to wipe
everything, *INCLUDING ALL YOUR DATA*, and start fresh.  For mounting
the drive after a reboot during install (or booting off the install CD
for rescue work) use the script in step 3.

#!/bin/bash
mke2fs /dev/sda5
mkswap /dev/sda6
mkreiserfs /dev/sda7
swapon /dev/sda6
mount /dev/sda5 /mnt/gentoo -o noatime
mkdir /mnt/gentoo/home
mount /dev/sda7 /mnt/gentoo/home -o noatime,notail
mkdir /mnt/gentoo/tmp
chmod 1777 /mnt/gentoo/tmp
mkdir /mnt/gentoo/usr
chmod 755 /mnt/gentoo/usr
mkdir /mnt/gentoo/var
chmod 755 /mnt/gentoo/var
mkdir /mnt/gentoo/home/bindmounts
mkdir /mnt/gentoo/home/bindmounts/tmp
chmod 1777 /mnt/gentoo/home/bindmounts/tmp
mkdir /mnt/gentoo/home/bindmounts/usr
chmod 755 /mnt/gentoo/home/bindmounts/usr
mkdir /mnt/gentoo/home/bindmounts/var
chmod 755 /mnt/gentoo/home/bindmounts/var
mount --bind /mnt/gentoo/home/bindmounts/tmp /mnt/gentoo/tmp
mount --bind /mnt/gentoo/home/bindmounts/usr /mnt/gentoo/usr
mount --bind /mnt/gentoo/home/bindmounts/var /mnt/gentoo/var

  Again, substitute as appropriate if your harddrive is not /dev/sda.
Let's examine the script in detail...

mke2fs /dev/sda5
mkswap /dev/sda6
mkreiserfs /dev/sda7
swapon /dev/sda6

  The first 4 commands format the partitions and activate the swapdrive.
Partition 5 really should be ext2fs for a few reasons...

  - Partition 5 will rarely be written to during normal operation; only
    when you are installing/updating programs/scripts that reside in
    /bin or /sbin so journalling isn't that important.

  - Journalling requires disk space, which we're trying to conserve.

  - Given the small size of the / partition, ext2fs is sufficient

  - ext2fs is the easiest filesystem to shrink/grow.  If you ever need
    to grow the / partition in future, you can take space from the swap
    partition.  Unless you're doing a suspend-to-swap, you can screw
    around with the swap partition with impunity.

  - partition 7 will require a (preferably journalling) filesystem that
    can handle a large partition.  I currently use reiserfs.  There are
    several competent filesystems.  The choice is yours.

mount /dev/sda5 /mnt/gentoo -o noatime
mkdir /mnt/gentoo/home
mount /dev/sda7 /mnt/gentoo/home -o noatime,notail

  The next 3 statements

  - mount partition 5 as /

  - create directory /home on partition 5

  - mount partition 7 as /home.  All physical partitions are now mounted.

mkdir /mnt/gentoo/tmp
chmod 1777 /mnt/gentoo/tmp
mkdir /mnt/gentoo/usr
chmod 755 /mnt/gentoo/usr
mkdir /mnt/gentoo/var
chmod 755 /mnt/gentoo/var

  The next 6 statements create /tmp, /usr, and /var, and set permissions.

mkdir /mnt/gentoo/home/bindmounts
mkdir /mnt/gentoo/home/bindmounts/tmp
chmod 1777 /mnt/gentoo/home/bindmounts/tmp
mkdir /mnt/gentoo/home/bindmounts/usr
chmod 755 /mnt/gentoo/home/bindmounts/usr
mkdir /mnt/gentoo/home/bindmounts/var
chmod 755 /mnt/gentoo/home/bindmounts/var

  The next 7 statements create /home/bindmounts/ on partition 7, and
then create mirrors of /tmp, /usr, and /var in /home/bindmounts, and set
permissions.

mount --bind /mnt/gentoo/home/bindmounts/tmp /mnt/gentoo/tmp
mount --bind /mnt/gentoo/home/bindmounts/usr /mnt/gentoo/usr
mount --bind /mnt/gentoo/home/bindmounts/var /mnt/gentoo/var

  And now, the connection between the directories in /home/bindmounts and
their equivalents on /, which makes the whole thing work.  If you ever
need to re-install Gentoo, or another linux distro, you can wipe the
contents of (*DO NOT* rmdir)...
/tmp
/usr
/var

  And then wipe everything in / except the 4 directories...
/home
/tmp
/usr
/var

  Step 3)

  OK, so you've set up the partitions and subdirectories.  There are
re-boots during the linux install process.  Ditto for installing a new
distro, or for doing rescue work.  Use the following script to mount the
directories...

#!/bin/bash
swapon /dev/sda6
mount /dev/sda5 /mnt/gentoo -o noatime
mount /dev/sda7 /mnt/gentoo/home -o noatime,notail
mount --bind /mnt/gentoo/home/bindmounts/tmp /mnt/gentoo/tmp
mount --bind /mnt/gentoo/home/bindmounts/usr /mnt/gentoo/usr
mount --bind /mnt/gentoo/home/bindmounts/var /mnt/gentoo/var



  The advantages of my setup...
  - a minimum of wasted disk space
  - you can create lots of files, and use almost the entire hard drive
    flexibly, because all the really variable stuff goes on the big
    partition
  - with a little care, you can wipe the OS files and keep your data,
    and re-install the same or another linux distro.

  Disadvantages...
  - "find" will show duplicate results if the target file physically
    exists in /home/bindmounts
  - in Gentoo, /etc/localtime is a physical file, not a symlink into
    /usr/share/zoneinfo.  If it is a symlink in your distro, scripts
    that execute early in the boot process might get confused about what
    time it is.

-- 
Walter Dnes <waltdnes@waltdnes.org> In linux /sbin/init is Job #1
Q. Mr. Ghandi, what do you think of Microsoft security?
A. I think it would be a good idea.
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [gentoo-user] 500 meg / partition (including /boot) *WITHOUT USING LVM*
  2007-09-02 14:32 [gentoo-user] 500 meg / partition (including /boot) *WITHOUT USING LVM* Walter Dnes
@ 2007-09-02 19:15 ` Neil Bothwick
  2007-09-02 20:00   ` Dirk Heinrichs
  0 siblings, 1 reply; 30+ messages in thread
From: Neil Bothwick @ 2007-09-02 19:15 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 730 bytes --]

Hello Walter Dnes,

>    Device Boot      Start         End      Blocks   Id  System
> /dev/sda1               1       60801   488384001    5  Extended
> /dev/sda5               1          62      497952   83  Linux
> /dev/sda6              63         549     3911796   82  Linux swap
> /dev/sda7             550       60801   483974158+  83  Linux

What's wrong with making sda7 an LVM partition? Then you can allocate
space to the various directories as you wish.

One disadvantage of your system that springs immediately to mind is that
if a user manages to fill /home, it will stop the whole system working
properly because /var is also full.


-- 
Neil Bothwick

Top Oxymorons Number 11: Terribly pleased

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [gentoo-user] 500 meg / partition (including /boot) *WITHOUT USING LVM*
  2007-09-02 19:15 ` Neil Bothwick
@ 2007-09-02 20:00   ` Dirk Heinrichs
  2007-09-02 23:20     ` Walter Dnes
  0 siblings, 1 reply; 30+ messages in thread
From: Dirk Heinrichs @ 2007-09-02 20:00 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1194 bytes --]

Am Sonntag, 2. September 2007 schrieb Neil Bothwick:
> Hello Walter Dnes,
>
> >    Device Boot      Start         End      Blocks   Id  System
> > /dev/sda1               1       60801   488384001    5  Extended
> > /dev/sda5               1          62      497952   83  Linux
> > /dev/sda6              63         549     3911796   82  Linux swap
> > /dev/sda7             550       60801   483974158+  83  Linux
>
> What's wrong with making sda7 an LVM partition? Then you can allocate
> space to the various directories as you wish.
>
> One disadvantage of your system that springs immediately to mind is that
> if a user manages to fill /home, it will stop the whole system working
> properly because /var is also full.

Another one is filesystem corruption, or even human error. Placing everything 
into one single filesystem is a Bad Thing (tm). I.e. you can't mount vital 
parts of the system ro to prevent accidental deletion, or keep data or home 
volumes safely unmounted until they are really needed/accessed (by use of the 
automounter), you can't use different filesystems for different purposes, 
etc.

Kids, don't try this at home :-)

Bye...

	Dirk

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [gentoo-user] 500 meg / partition (including /boot) *WITHOUT USING LVM*
  2007-09-02 20:00   ` Dirk Heinrichs
@ 2007-09-02 23:20     ` Walter Dnes
  2007-09-02 23:57       ` Neil Bothwick
  2007-09-03  6:08       ` [gentoo-user] " Dirk Heinrichs
  0 siblings, 2 replies; 30+ messages in thread
From: Walter Dnes @ 2007-09-02 23:20 UTC (permalink / raw
  To: gentoo-user

On Sun, Sep 02, 2007 at 10:00:50PM +0200, Dirk Heinrichs wrote
> Am Sonntag, 2. September 2007 schrieb Neil Bothwick:
> >
> > One disadvantage of your system that springs immediately to mind is
> > that if a user manages to fill /home, it will stop the whole system
> > working properly because /var is also full.

  This setup is for a desktop PC that has "a user" not "a bunch of
users".  I am *NOT* running a server with a bunch of users.  If I was,
I'd be using quotas to prevent the problem described above.

> Another one is filesystem corruption, or even human error. Placing
> everything into one single filesystem is a Bad Thing (tm). I.e. you
> can't mount vital parts of the system ro to prevent accidental
> deletion, or keep data or home volumes safely unmounted until they
> are really needed/accessed (by use of the automounter),

  a) I'm running a home desktop PC, not a corporate server.  If the
     "users" (i.e. me) can't co-ordinate with each other, then I've
     got a badly split personality<g>
  b) I have the system backed up on a 320 gig external USB drive
  c) "automount" problems seem to crop up often in this list
  d) more partitions means more things to go wrong

> you can't use different filesystems for different purposes, etc.

  You mean like ext2fs for a small rarely-written-to partition and
reiserfs for a gigantic partition with lots of files?

> Kids, don't try this at home :-)

  On the contrary, do this at home, but think twice before trying it on
a corporate server.

-- 
Walter Dnes <waltdnes@waltdnes.org> In linux /sbin/init is Job #1
Q. Mr. Ghandi, what do you think of Microsoft security?
A. I think it would be a good idea.
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [gentoo-user] 500 meg / partition (including /boot) *WITHOUT  USING LVM*
  2007-09-02 23:20     ` Walter Dnes
@ 2007-09-02 23:57       ` Neil Bothwick
  2007-09-04  8:30         ` [gentoo-user] " Remy Blank
  2007-09-03  6:08       ` [gentoo-user] " Dirk Heinrichs
  1 sibling, 1 reply; 30+ messages in thread
From: Neil Bothwick @ 2007-09-02 23:57 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1673 bytes --]

Hello Walter Dnes,

>   This setup is for a desktop PC that has "a user" not "a bunch of
> users".  I am *NOT* running a server with a bunch of users.  If I was,
> I'd be using quotas to prevent the problem described above.

It only takes one user to have a runaway process, or even just one that
uses more space than you expected, that fills /home. there are good
reasons for separating user and system filesystems.

>   d) more partitions means more things to go wrong

More partitions mean that when things go wrong, the effects are limited.

Why do you make such a big deal of not using LVM? It achieves everything
you want to, and more, without the compromises.

> > you can't use different filesystems for different purposes, etc.  
> 
>   You mean like ext2fs for a small rarely-written-to partition and
> reiserfs for a gigantic partition with lots of files?

How about ReiserFS for a general purpose partition or one that has a lot
of small files and XFS for a partition that has a small number of very
large files (XFS's performance is much better than Reiser's with
multi-gigabyte files). How about a separate partition for large temporary
files (think video processing and DVD authoring) so it doesn't fill up
your home or system directories.

There are many reasons to want to keep data on a separate filesystem,
which LVM achieves but your approach does not permit.

And what happens with 500GB is no longer enough and you want to add more
space. How do you resize your "partitions" to use space on the second
disk?


-- 
Neil Bothwick

There's more to life than sex, beer and computers.
Not a lot more admittedly...

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [gentoo-user] 500 meg / partition (including /boot) *WITHOUT USING LVM*
  2007-09-02 23:20     ` Walter Dnes
  2007-09-02 23:57       ` Neil Bothwick
@ 2007-09-03  6:08       ` Dirk Heinrichs
  1 sibling, 0 replies; 30+ messages in thread
From: Dirk Heinrichs @ 2007-09-03  6:08 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2158 bytes --]

Am Montag, 3. September 2007 schrieb ext Walter Dnes:

>   This setup is for a desktop PC that has "a user" not "a bunch of
> users".  I am *NOT* running a server with a bunch of users.  If I was,
> I'd be using quotas to prevent the problem described above.

To solve a problem that you otherwise wouldn't have?

> > Another one is filesystem corruption, or even human error. Placing
> > everything into one single filesystem is a Bad Thing (tm). I.e. you
> > can't mount vital parts of the system ro to prevent accidental
> > deletion, or keep data or home volumes safely unmounted until they
> > are really needed/accessed (by use of the automounter),
>
>   a) I'm running a home desktop PC, not a corporate server.  If the
>      "users" (i.e. me) can't co-ordinate with each other, then I've
>      got a badly split personality<g>

You didn't tell before.

>   b) I have the system backed up on a 320 gig external USB drive

And if your single big partition breaks, you waste a lot of time restoring 
everything.

>   c) "automount" problems seem to crop up often in this list

Which ones, with which automounter? I've never seen any with the kernel 
automounter. OTOH, what isn't mounted can't be corrupted/deleted.

>   d) more partitions means more things to go wrong

Which ones? Limiting possible damage can't ever be wrong.

> > you can't use different filesystems for different purposes, etc.
>
>   You mean like ext2fs for a small rarely-written-to partition and
> reiserfs for a gigantic partition with lots of files?

No. As Neil already wrote: The various Linux filesystems shine in different 
use cases (XFS has good large file performance, reiserfs is storage 
effective when it comes to small files while its delete performance is 
poor, etc.).

Bye...

	Dirk
-- 
Dirk Heinrichs          | Tel:  +49 (0)162 234 3408
Configuration Manager   | Fax:  +49 (0)211 47068 111
Capgemini Deutschland   | Mail: dirk.heinrichs@capgemini.com
Wanheimerstraße 68      | Web:  http://www.capgemini.com
D-40468 Düsseldorf      | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [gentoo-user]  Re: 500 meg / partition (including /boot) *WITHOUT    USING LVM*
  2007-09-02 23:57       ` Neil Bothwick
@ 2007-09-04  8:30         ` Remy Blank
  2007-09-04  8:45           ` Alan McKinnon
                             ` (3 more replies)
  0 siblings, 4 replies; 30+ messages in thread
From: Remy Blank @ 2007-09-04  8:30 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1609 bytes --]

Neil Bothwick wrote:
> Why do you make such a big deal of not using LVM? It achieves everything
> you want to, and more, without the compromises.

There's one thing that has prevented me from ever using LVM: the need to
have an initrd (or initramfs). From what I remember, this has always
required manually copying some utilities like the LVM tools to the
initrd (or writing a script that does it), and remembering to do it
every time I update one of the tools, and not to forget copying all
required libraries as well, and so on.

OTOH, I have stopped looking at solutions that need an initrd quite some
time ago, so things might be easier nowadays. How do you manage your
initrd? Do you even need one?

> And what happens with 500GB is no longer enough and you want to add more
> space. How do you resize your "partitions" to use space on the second
> disk?

Even though I have used resize2fs in the past, I have always thought
that this tool was kind of a hack. Doesn't the resizing operation carry
some risk? And if it goes wrong (e.g. a power outage), do you loose the
complete content of the partition?

And from what I remember, you can't resize a mounted ext3 partition, so
you have to boot to a rescue CD, hope that all your LVM tools are there
(they normally are, but what version?) and perform the resize operation
there.

But I'd love to be proven wrong on all the points above! This would
certainly motivate me to look into LVM seriously this time. It really
seems to be the right solution to the various problems I have seen with
static partitions.

-- Remy


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 187 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [gentoo-user]  Re: 500 meg / partition (including /boot) *WITHOUT    USING LVM*
  2007-09-04  8:30         ` [gentoo-user] " Remy Blank
@ 2007-09-04  8:45           ` Alan McKinnon
  2007-09-04  9:54             ` Remy Blank
  2007-09-04 22:08             ` Walter Dnes
  2007-09-04  9:25           ` Neil Bothwick
                             ` (2 subsequent siblings)
  3 siblings, 2 replies; 30+ messages in thread
From: Alan McKinnon @ 2007-09-04  8:45 UTC (permalink / raw
  To: gentoo-user

On Tuesday 04 September 2007, Remy Blank wrote:
> Neil Bothwick wrote:
> > Why do you make such a big deal of not using LVM? It achieves
> > everything you want to, and more, without the compromises.
>
> There's one thing that has prevented me from ever using LVM: the need
> to have an initrd (or initramfs). From what I remember, this has
> always required manually copying some utilities like the LVM tools to
> the initrd (or writing a script that does it), and remembering to do
> it every time I update one of the tools, and not to forget copying
> all required libraries as well, and so on.
>
> OTOH, I have stopped looking at solutions that need an initrd quite
> some time ago, so things might be easier nowadays. How do you manage
> your initrd? Do you even need one?

On Gentoo it's easy to get away with not using an initramfs. Everything 
is built from source and you roll your own kernel so we don't need to 
jump through the boot time hoops that a binary distro must to be able 
to support everything and boot.

You will always have a pretty good idea how much space / needs, it 
contains /bin, /sbin, /etc, /root and /lib. Unless oyu are in the habit 
of storing stuff in /root, 500M is plenty. So put / on a regular 
partition, everything else in LVM and your initramfs worries go away. 
The only case I can think of that *requires* initramfs right now is 
booting off a raid device

> > And what happens with 500GB is no longer enough and you want to add
> > more space. How do you resize your "partitions" to use space on the
> > second disk?
>
> Even though I have used resize2fs in the past, I have always thought
> that this tool was kind of a hack. Doesn't the resizing operation
> carry some risk? And if it goes wrong (e.g. a power outage), do you
> loose the complete content of the partition?
>
> And from what I remember, you can't resize a mounted ext3 partition,

balls. ext2online and resize2fs have been resizing ext3 partitions for 
ages. You can extend a mounted partition with ease and in safety.

What you can't do, and to my knowledge no regular fs can do, is to 
*reduce* a mounted partition

> so you have to boot to a rescue CD, hope that all your LVM tools are
> there (they normally are, but what version?) and perform the resize
> operation there.

Why would lvm not be on your rescue disk? That's just a silly excuse. 
What would you do with a reswcue disk that doesn't have fdisk on it? 
You'd throw it away and get a different one.

Versions don't have much impact on lvm. True, you can't use V1 tools on 
V2 volumes, but V1 hasn't seen much use since the days on kernel 2.4

> But I'd love to be proven wrong on all the points above! This would
> certainly motivate me to look into LVM seriously this time. It really
> seems to be the right solution to the various problems I have seen
> with static partitions.

You are imagining problems where none exist :-)

The only thing you need worry about is where are you going to get a 
decent howto that explains the concepts. You are dealing with three 
layers of stuff on top of physical partitions and some docs out there 
are ... confusing. Once you get the picture fully, it's as easy pie and 
makes perfect sense.

Really, LVM is the answer to all those prayers you have been sending up 
to $DEITY for years :-)

alan



-- 
Optimists say the glass is half full,
Pessimists say the glass is half empty,
Developers say wtf is the glass twice as big as it needs to be?

Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [gentoo-user]  Re: 500 meg / partition (including /boot) *WITHOUT    USING LVM*
  2007-09-04  8:30         ` [gentoo-user] " Remy Blank
  2007-09-04  8:45           ` Alan McKinnon
@ 2007-09-04  9:25           ` Neil Bothwick
  2007-09-04 10:05             ` Remy Blank
  2007-09-04  9:30           ` Dirk Heinrichs
  2007-09-04 22:40           ` Alexander Skwar
  3 siblings, 1 reply; 30+ messages in thread
From: Neil Bothwick @ 2007-09-04  9:25 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 683 bytes --]

On Tue, 04 Sep 2007 10:30:55 +0200, Remy Blank wrote:

> > Why do you make such a big deal of not using LVM? It achieves
> > everything you want to, and more, without the compromises.  
> 
> There's one thing that has prevented me from ever using LVM: the need to
> have an initrd (or initramfs).

Sshh! Don't tell the systems I've been running on LVM for years that they
need an initrd or they'll all want one!

Just use a 300MB root partition, no separate /boot and put everything
else on LVM. Then all the tools you need are in /, so no initrd needed.
See Alan's reply regarding FS resizing tools.


-- 
Neil Bothwick

Top Oxymorons Number 3: Working vacation

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [gentoo-user]  Re: 500 meg / partition (including /boot) *WITHOUT    USING LVM*
  2007-09-04  8:30         ` [gentoo-user] " Remy Blank
  2007-09-04  8:45           ` Alan McKinnon
  2007-09-04  9:25           ` Neil Bothwick
@ 2007-09-04  9:30           ` Dirk Heinrichs
  2007-09-04 10:14             ` Remy Blank
  2007-09-04 22:40           ` Alexander Skwar
  3 siblings, 1 reply; 30+ messages in thread
From: Dirk Heinrichs @ 2007-09-04  9:30 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2042 bytes --]

Am Dienstag, 4. September 2007 schrieb ext Remy Blank:
> Neil Bothwick wrote:
> > Why do you make such a big deal of not using LVM? It achieves
> > everything you want to, and more, without the compromises.
>
> There's one thing that has prevented me from ever using LVM: the need to
> have an initrd (or initramfs).

There is no need to have an initramfs unless you put / on an LV.

> From what I remember, this has always 
> required manually copying some utilities like the LVM tools to the
> initrd (or writing a script that does it), and remembering to do it
> every time I update one of the tools, and not to forget copying all
> required libraries as well, and so on.

I could send you a script. And no, it doesn't harm if you forget to update 
the stuff in the initramfs.

> OTOH, I have stopped looking at solutions that need an initrd quite some
> time ago, so things might be easier nowadays. How do you manage your
> initrd?

With a simple self written script that copies the needed tools to a 
directory used by the kernel build.

> Do you even need one? 

Yes, I do. Because I have / on a logical volume which may (in case of a 
laptop) also be encrypted.

> And from what I remember, you can't resize a mounted ext3 partition

You should refresh your memory, then :-) Those times are long over.

> But I'd love to be proven wrong on all the points above!

Done (partly) :-)

> This would 
> certainly motivate me to look into LVM seriously this time.

Do it right, then - use EVMS *SCNR*

> It really seems to be the right solution to the various problems I have
> seen with static partitions.

It doesn't just seem so. It is.

Bye...

	Dirk
-- 
Dirk Heinrichs          | Tel:  +49 (0)162 234 3408
Configuration Manager   | Fax:  +49 (0)211 47068 111
Capgemini Deutschland   | Mail: dirk.heinrichs@capgemini.com
Wanheimerstraße 68      | Web:  http://www.capgemini.com
D-40468 Düsseldorf      | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [gentoo-user]  Re: 500 meg / partition (including /boot) *WITHOUT    USING LVM*
  2007-09-04  8:45           ` Alan McKinnon
@ 2007-09-04  9:54             ` Remy Blank
  2007-09-04 10:00               ` Dirk Heinrichs
                                 ` (3 more replies)
  2007-09-04 22:08             ` Walter Dnes
  1 sibling, 4 replies; 30+ messages in thread
From: Remy Blank @ 2007-09-04  9:54 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2524 bytes --]

Alan McKinnon wrote:
> On Gentoo it's easy to get away with not using an initramfs. Everything 
> is built from source and you roll your own kernel so we don't need to 
> jump through the boot time hoops that a binary distro must to be able 
> to support everything and boot.
> 
> You will always have a pretty good idea how much space / needs, it 
> contains /bin, /sbin, /etc, /root and /lib. Unless oyu are in the habit 
> of storing stuff in /root, 500M is plenty. So put / on a regular 
> partition, everything else in LVM and your initramfs worries go away. 

Ok, I was suspecting that putting / outside of LVM might be the
solution. Thanks for confirming.

> The only case I can think of that *requires* initramfs right now is 
> booting off a raid device

Strangely enough, I am currently booting from a software raid device, so
you don't need an initramfs for that either.

>> And from what I remember, you can't resize a mounted ext3 partition,
> 
> balls. ext2online and resize2fs have been resizing ext3 partitions for 
> ages. You can extend a mounted partition with ease and in safety.

Have you ever tried pulling the plug while a resize operation was in
progress? I guess I'll have to test this myself, as my data is valuable
enough to me that I won't just believe what I read.

I wasn't aware of ext2online. Doesn't it require a kernel patch? Is it
integrated in gentoo-sources? The homepage seems to indicate that it
hasn't been updated since 2000.

> What you can't do, and to my knowledge no regular fs can do, is to 
> *reduce* a mounted partition

But who would want to do that? I always need *more* space, not less ;-)

> Why would lvm not be on your rescue disk? That's just a silly excuse. 
> What would you do with a reswcue disk that doesn't have fdisk on it? 
> You'd throw it away and get a different one.

Well, I haven't spent much time looking at rescue CDs, I have always
used Knoppix up to now and it has been good enough. I'll just check that
recent LVM tools are on it.

>> But I'd love to be proven wrong on all the points above! This would
>> certainly motivate me to look into LVM seriously this time. It really
>> seems to be the right solution to the various problems I have seen
>> with static partitions.
> 
> You are imagining problems where none exist :-)

Not quite. I have a memory of problems that have existed but thankfully
have been fixed since.

Anything special if I put the LVM over a software raid?

-- Remy


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 187 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [gentoo-user]  Re: 500 meg / partition (including /boot) *WITHOUT    USING LVM*
  2007-09-04  9:54             ` Remy Blank
@ 2007-09-04 10:00               ` Dirk Heinrichs
  2007-09-04 10:04                 ` Alan McKinnon
  2007-09-04 10:19               ` Alan McKinnon
                                 ` (2 subsequent siblings)
  3 siblings, 1 reply; 30+ messages in thread
From: Dirk Heinrichs @ 2007-09-04 10:00 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 517 bytes --]

Am Dienstag, 4. September 2007 schrieb ext Remy Blank:

> I wasn't aware of ext2online.

Then forget it again. Resizing ext2/3 is done with resize2fs nowadays.

Bye...

	Dirk
-- 
Dirk Heinrichs          | Tel:  +49 (0)162 234 3408
Configuration Manager   | Fax:  +49 (0)211 47068 111
Capgemini Deutschland   | Mail: dirk.heinrichs@capgemini.com
Wanheimerstraße 68      | Web:  http://www.capgemini.com
D-40468 Düsseldorf      | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [gentoo-user]  Re: 500 meg / partition (including /boot) *WITHOUT    USING LVM*
  2007-09-04 10:00               ` Dirk Heinrichs
@ 2007-09-04 10:04                 ` Alan McKinnon
  0 siblings, 0 replies; 30+ messages in thread
From: Alan McKinnon @ 2007-09-04 10:04 UTC (permalink / raw
  To: gentoo-user

On Tuesday 04 September 2007, Dirk Heinrichs wrote:
> Am Dienstag, 4. September 2007 schrieb ext Remy Blank:
> > I wasn't aware of ext2online.
>
> Then forget it again. Resizing ext2/3 is done with resize2fs
> nowadays.

Oops, my bad.

It comes from not using ext2/3 on my own personal machines, and many 
months of working with RHEL4 in my day job which shipped with 
ext2online

alan

-- 
Optimists say the glass is half full,
Pessimists say the glass is half empty,
Developers say wtf is the glass twice as big as it needs to be?

Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 30+ messages in thread

* [gentoo-user]  Re: 500 meg / partition (including /boot)   *WITHOUT    USING LVM*
  2007-09-04  9:25           ` Neil Bothwick
@ 2007-09-04 10:05             ` Remy Blank
  0 siblings, 0 replies; 30+ messages in thread
From: Remy Blank @ 2007-09-04 10:05 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 595 bytes --]

Neil Bothwick wrote:
> On Tue, 04 Sep 2007 10:30:55 +0200, Remy Blank wrote:
>> There's one thing that has prevented me from ever using LVM: the need to
>> have an initrd (or initramfs).
> 
> Sshh! Don't tell the systems I've been running on LVM for years that they
> need an initrd or they'll all want one!

Ha ha. I shouldn't have told mine, then they wouldn't have asked for one ;-)

> Just use a 300MB root partition, no separate /boot and put everything
> else on LVM. Then all the tools you need are in /, so no initrd needed.

Understood. Thanks for the reply.

-- Remy


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 187 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [gentoo-user]  Re: 500 meg / partition (including /boot) *WITHOUT    USING LVM*
  2007-09-04  9:30           ` Dirk Heinrichs
@ 2007-09-04 10:14             ` Remy Blank
  2007-09-04 12:01               ` Dirk Heinrichs
  2007-09-04 12:28               ` Neil Bothwick
  0 siblings, 2 replies; 30+ messages in thread
From: Remy Blank @ 2007-09-04 10:14 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1161 bytes --]

Dirk Heinrichs wrote:
>> Do you even need one? 
> 
> Yes, I do. Because I have / on a logical volume which may (in case of a 
> laptop) also be encrypted.

Right. I think I might have confused the necessity to have an initramfs
for LVM and the need to have it for an encrypted root.

OTOH, if you put /usr, /home, /var, /tmp and all the others on LVM, you
could just leave the root partition unencrypted, as it wouldn't contain
anything sensitive.

>> And from what I remember, you can't resize a mounted ext3 partition
> 
> You should refresh your memory, then :-) Those times are long over.

I have googled a bit but I couldn't find any recent references for that
except for a RedHat patch to 2.6.7. Specifically, e2fstools doesn't seem
to mention online resizing at all.

Could you give me a pointer?

>> But I'd love to be proven wrong on all the points above!
> 
> Done (partly) :-)

Thanks!

> Do it right, then - use EVMS *SCNR*

Any specific pros/contras? From the homepage it looks rather complicated
(although I haven't spent much time on it yet). I'll look into it more
in-depth.

Thanks for the reply.
-- Remy


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 187 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [gentoo-user]  Re: 500 meg / partition (including /boot) *WITHOUT    USING LVM*
  2007-09-04  9:54             ` Remy Blank
  2007-09-04 10:00               ` Dirk Heinrichs
@ 2007-09-04 10:19               ` Alan McKinnon
  2007-09-04 11:20                 ` Remy Blank
                                   ` (2 more replies)
  2007-09-04 12:29               ` Neil Bothwick
  2007-09-04 22:42               ` Alexander Skwar
  3 siblings, 3 replies; 30+ messages in thread
From: Alan McKinnon @ 2007-09-04 10:19 UTC (permalink / raw
  To: gentoo-user

On Tuesday 04 September 2007, Remy Blank wrote:
> Alan McKinnon wrote:
[snip]
> > The only case I can think of that *requires* initramfs right now is
> > booting off a raid device
>
> Strangely enough, I am currently booting from a software raid device,
> so you don't need an initramfs for that either.

You have software compiled in the kernel, not as a module the, right?

I would imagine you wouldn't need an initrd for that

> >> And from what I remember, you can't resize a mounted ext3
> >> partition,
> >
> > balls. ext2online and resize2fs have been resizing ext3 partitions
> > for ages. You can extend a mounted partition with ease and in
> > safety.
>
> Have you ever tried pulling the plug while a resize operation was in
> progress? I guess I'll have to test this myself, as my data is
> valuable enough to me that I won't just believe what I read.

An enlarge operation tends to be quite safe in my experience. At worst 
you get some new inodes that might not be accounted for, something that 
fsck will handle easily.

A reduce might be a different case altogether. BUT, it's not an 
especially different operation to a defrag on Windows, and I have yet 
to see a Windows admin debate whether he should defrag or not based on 
the possibility of losing power halfway through...

I can't comment too much on problems with reducing ext2/3, but I do 
reduce reiser3.6 filesystems often, once when the battery died, and it 
wasn't a problem when powered up. There was no feedback in the logs to 
speak of, so I assumed that the journal did what it was designed to do. 
This was in the first stages of the operation - moving blocks to the 
start of the volume, and I honestly have never done this test in the 
later stages - when inodes are removed from the superblock

[snip]

> > What you can't do, and to my knowledge no regular fs can do, is to
> > *reduce* a mounted partition
>
> But who would want to do that? I always need *more* space, not less
> ;-)

emerged openoffice lately? :-)

It pretty much always fails if you have <5G in /var/tmp/portage. On a 
laptop, that's 8% of my total disk space just sitting there free 
waiting for the day I emerge openoffice again. Umounting /var to reduce 
it is such a huge pita that I made /var/tmp/portage a separate volume 
and now reduce it at will.

But true enough, especially on server, you will enlarge volumes much 
more often the reduce them

[snip]

> Anything special if I put the LVM over a software raid?

Not in my experience. The only difficulty I ever had was persuading 
RHEL4 to install / like that - anaconda either doesn't support it or 
the button to click to do it is hidden in one of the magic cupboards at 
Hogwarts. But that's not a problem because:

1. this is gentoo
2. anaconda is these days less brain dead than it used to be

Performance wise, it does well. The LVM and mdamd layers do their work 
in a fraction of the time it takes to get the data on/off the disk 
platters. In fact, Linux software usually outperforms most of those 
stupid el-cheapo we-say-it's-hardware-raid-but-actually-isn't raid 
controllers in low end hardware

alan


-- 
Optimists say the glass is half full,
Pessimists say the glass is half empty,
Developers say wtf is the glass twice as big as it needs to be?

Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 30+ messages in thread

* [gentoo-user]  Re: 500 meg / partition (including /boot) *WITHOUT    USING LVM*
  2007-09-04 10:19               ` Alan McKinnon
@ 2007-09-04 11:20                 ` Remy Blank
  2007-09-04 12:27                 ` Neil Bothwick
  2007-09-04 22:16                 ` Walter Dnes
  2 siblings, 0 replies; 30+ messages in thread
From: Remy Blank @ 2007-09-04 11:20 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1246 bytes --]

Alan McKinnon wrote:
> You have software compiled in the kernel, not as a module the, right?

Correct.

> A reduce might be a different case altogether. BUT, it's not an 
> especially different operation to a defrag on Windows, and I have yet 
> to see a Windows admin debate whether he should defrag or not based on 
> the possibility of losing power halfway through...

I only ever defrag drives that are either on a laptop, or a server with
a UPS. You can't be too careful on Windows...

> emerged openoffice lately? :-)

Nope, only openoffice-bin. Can't see a reason to have the fan of my
laptop blow like hell for 12 hours in a row, when I can have it in a few
seconds :-)

The /var/tmp/portage argument is still a valid one, though.

> Performance wise, it does well. The LVM and mdamd layers do their work 
> in a fraction of the time it takes to get the data on/off the disk 
> platters. In fact, Linux software usually outperforms most of those 
> stupid el-cheapo we-say-it's-hardware-raid-but-actually-isn't raid 
> controllers in low end hardware

Thanks a lot for your feedback. I think you and Neil triggered yet
another server reorganization (but it seems like this will be the last one).

-- Remy


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 187 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [gentoo-user]  Re: 500 meg / partition (including /boot) *WITHOUT    USING LVM*
  2007-09-04 10:14             ` Remy Blank
@ 2007-09-04 12:01               ` Dirk Heinrichs
  2007-09-04 12:40                 ` Remy Blank
  2007-09-04 12:28               ` Neil Bothwick
  1 sibling, 1 reply; 30+ messages in thread
From: Dirk Heinrichs @ 2007-09-04 12:01 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2324 bytes --]

Am Dienstag, 4. September 2007 schrieb ext Remy Blank:
> Dirk Heinrichs wrote:
> >> Do you even need one?
> >
> > Yes, I do. Because I have / on a logical volume which may (in case of a
> > laptop) also be encrypted.
>
> Right. I think I might have confused the necessity to have an initramfs
> for LVM and the need to have it for an encrypted root.
>
> OTOH, if you put /usr, /home, /var, /tmp and all the others on LVM, you
> could just leave the root partition unencrypted, as it wouldn't contain
> anything sensitive.

I know it's not the safest thing to do, but I have the key for the other 
volumes on the root volume, so that this is the only one for which I need a 
passphrase. And no I can't put them on a USB stick, because USB is 
(physically) defective on this Laptop :-(

> >> And from what I remember, you can't resize a mounted ext3 partition
> >
> > You should refresh your memory, then :-) Those times are long over.
>
> I have googled a bit but I couldn't find any recent references for that
> except for a RedHat patch to 2.6.7. Specifically, e2fstools doesn't seem
> to mention online resizing at all.
>
> Could you give me a pointer?

Can't remember when e2fstools were dropped from Gentoo, but resize2fs is 
part of e2fsprogs.

> > Do it right, then - use EVMS *SCNR*
>
> Any specific pros/contras?

The only contra I know is that EVMS currently (still) can't handle online 
ext2/3 resize, but you can still do it manually as you would with pure LVM 
anyway. (Or use a different fs).

Other than that it IMHO has only pros. Be it partitioning, sw raid, logical 
volumes, fs creation, resizing, even mounting :-) - everything is done in 
one single tool.

> From the homepage it looks rather complicated 

Not more than LVM. The terminology is a bit different though, but once 
you're used to it it is much simpler. I switched from LVM (1) to EVMS its 
early stages (kernel 2.4) and never looked back.

Bye...

	Dirk
-- 
Dirk Heinrichs          | Tel:  +49 (0)162 234 3408
Configuration Manager   | Fax:  +49 (0)211 47068 111
Capgemini Deutschland   | Mail: dirk.heinrichs@capgemini.com
Wanheimerstraße 68      | Web:  http://www.capgemini.com
D-40468 Düsseldorf      | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [gentoo-user]  Re: 500 meg / partition (including /boot) *WITHOUT    USING LVM*
  2007-09-04 10:19               ` Alan McKinnon
  2007-09-04 11:20                 ` Remy Blank
@ 2007-09-04 12:27                 ` Neil Bothwick
  2007-09-04 22:16                 ` Walter Dnes
  2 siblings, 0 replies; 30+ messages in thread
From: Neil Bothwick @ 2007-09-04 12:27 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 731 bytes --]

On Tue, 4 Sep 2007 12:19:29 +0200, Alan McKinnon wrote:

> emerged openoffice lately? :-)
> 
> It pretty much always fails if you have <5G in /var/tmp/portage. On a 
> laptop, that's 8% of my total disk space just sitting there free 
> waiting for the day I emerge openoffice again. Umounting /var to reduce 
> it is such a huge pita that I made /var/tmp/portage a separate volume 
> and now reduce it at will.

Or point PORTAGE_TMPDIR to another partition. I have a partition that I
use for large temporary files, be they ISO images, video files or portage
build directories. That leaves /var free for important stuff.


-- 
Neil Bothwick

Never knock on Death's door. Ring the doorbell and run. He hates that.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [gentoo-user]  Re: 500 meg / partition (including /boot) *WITHOUT    USING LVM*
  2007-09-04 10:14             ` Remy Blank
  2007-09-04 12:01               ` Dirk Heinrichs
@ 2007-09-04 12:28               ` Neil Bothwick
  1 sibling, 0 replies; 30+ messages in thread
From: Neil Bothwick @ 2007-09-04 12:28 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 346 bytes --]

On Tue, 04 Sep 2007 12:14:12 +0200, Remy Blank wrote:

> OTOH, if you put /usr, /home, /var, /tmp and all the others on LVM, you
> could just leave the root partition unencrypted, as it wouldn't contain
> anything sensitive.

Apart from some contents of /etc.


-- 
Neil Bothwick

DANGER! DANGER! Computer store ahead...hide wallet.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [gentoo-user]  Re: 500 meg / partition (including /boot) *WITHOUT    USING LVM*
  2007-09-04  9:54             ` Remy Blank
  2007-09-04 10:00               ` Dirk Heinrichs
  2007-09-04 10:19               ` Alan McKinnon
@ 2007-09-04 12:29               ` Neil Bothwick
  2007-09-04 22:42               ` Alexander Skwar
  3 siblings, 0 replies; 30+ messages in thread
From: Neil Bothwick @ 2007-09-04 12:29 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 338 bytes --]

On Tue, 04 Sep 2007 11:54:44 +0200, Remy Blank wrote:

> Anything special if I put the LVM over a software raid?

No, that's what I do. / is on a RAID-1 partition, then I have an LVM
physical volume on a RAID-5 partition for /usr, /home et al.


-- 
Neil Bothwick

I wonder how much deeper would the ocean be without sponges.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [gentoo-user]  Re: 500 meg / partition (including /boot) *WITHOUT    USING LVM*
  2007-09-04 12:01               ` Dirk Heinrichs
@ 2007-09-04 12:40                 ` Remy Blank
  0 siblings, 0 replies; 30+ messages in thread
From: Remy Blank @ 2007-09-04 12:40 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 913 bytes --]

Dirk Heinrichs wrote:
> Am Dienstag, 4. September 2007 schrieb ext Remy Blank:
>> Could you give me a pointer?
> 
> Can't remember when e2fstools were dropped from Gentoo, but resize2fs is 
> part of e2fsprogs.

I actually meant e2fsprogs. Bad manual copy/paste operation.

But I was just looking for the wrong word ("online"). Looking for
"mounted" gives the following (yeah, I know, it's the top of the
description, I should just have read on):

 The resize2fs program will resize ext2 or ext3 file systems.  It can be
 used  to  enlarge or shrink an unmounted file system located on device.
 If the filesystem is mounted, it can be used to expand the size of  the
 mounted filesystem, assuming the kernel supports on-line resizing.  (As
 of this writing, the Linux  2.6  kernel  supports  on-line  resize  for
 filesystems mounted using ext3 only.).

So you're totally right.

-- Remy


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 187 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [gentoo-user]  Re: 500 meg / partition (including /boot) *WITHOUT USING LVM*
  2007-09-04  8:45           ` Alan McKinnon
  2007-09-04  9:54             ` Remy Blank
@ 2007-09-04 22:08             ` Walter Dnes
  2007-09-04 22:46               ` [gentoo-user] " Alexander Skwar
                                 ` (2 more replies)
  1 sibling, 3 replies; 30+ messages in thread
From: Walter Dnes @ 2007-09-04 22:08 UTC (permalink / raw
  To: gentoo-user

On Tue, Sep 04, 2007 at 10:45:15AM +0200, Alan McKinnon wrote

> You will always have a pretty good idea how much space / needs, it 
> contains /bin, /sbin, /etc, /root and /lib. Unless oyu are in the habit 
> of storing stuff in /root, 500M is plenty. So put / on a regular 
> partition, everything else in LVM and your initramfs worries go away.

s/LVM/a partition using the rest of the hard drive/

  This is how I started the whole thread.
 
> The only thing you need worry about is where are you going to get a 
> decent howto that explains the concepts. You are dealing with three 
> layers of stuff on top of physical partitions and some docs out there 
> are ... confusing. Once you get the picture fully, it's as easy pie and 
> makes perfect sense.

  Remove the LVM layer and things become even easier.

> Really, LVM is the answer to all those prayers you have been sending
> up to $DEITY for years :-)

  With few exceptions, it's an answer looking for a problem.

-- 
Walter Dnes <waltdnes@waltdnes.org> In linux /sbin/init is Job #1
Q. Mr. Ghandi, what do you think of Microsoft security?
A. I think it would be a good idea.
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [gentoo-user]  Re: 500 meg / partition (including /boot) *WITHOUT    USING LVM*
  2007-09-04 10:19               ` Alan McKinnon
  2007-09-04 11:20                 ` Remy Blank
  2007-09-04 12:27                 ` Neil Bothwick
@ 2007-09-04 22:16                 ` Walter Dnes
  2 siblings, 0 replies; 30+ messages in thread
From: Walter Dnes @ 2007-09-04 22:16 UTC (permalink / raw
  To: gentoo-user

On Tue, Sep 04, 2007 at 12:19:29PM +0200, Alan McKinnon wrote
> On Tuesday 04 September 2007, Remy Blank wrote:
> > Alan McKinnon wrote:
> 
> > > What you can't do, and to my knowledge no regular fs can do, is to
> > > *reduce* a mounted partition
> >
> > But who would want to do that? I always need *more* space, not less
> > ;-)
> 
> emerged openoffice lately? :-)
> 
> It pretty much always fails if you have <5G in /var/tmp/portage. On a 
> laptop, that's 8% of my total disk space just sitting there free 
> waiting for the day I emerge openoffice again. Umounting /var to reduce 
> it is such a huge pita that I made /var/tmp/portage a separate volume 
> and now reduce it at will.

  Drifting back onto the thread topic (is that allowed here<g>?) having
/var use part of a common pool (what's left over after swap and a 500
meg / partition) avoids that problem altogether, rather than band-aiding
it.

-- 
Walter Dnes <waltdnes@waltdnes.org> In linux /sbin/init is Job #1
Q. Mr. Ghandi, what do you think of Microsoft security?
A. I think it would be a good idea.
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 30+ messages in thread

* [gentoo-user]  Re: 500 meg / partition (including /boot) *WITHOUT    USING LVM*
  2007-09-04  8:30         ` [gentoo-user] " Remy Blank
                             ` (2 preceding siblings ...)
  2007-09-04  9:30           ` Dirk Heinrichs
@ 2007-09-04 22:40           ` Alexander Skwar
  3 siblings, 0 replies; 30+ messages in thread
From: Alexander Skwar @ 2007-09-04 22:40 UTC (permalink / raw
  To: gentoo-user

· Remy Blank <remy.blank@pobox.com>:

> There's one thing that has prevented me from ever using LVM: the need to
> have an initrd (or initramfs).

You only need an initrd, if you wish to have / on LVM. But if you put
/ (incl. /boot) on a normal partition, there's no need at all for an
initrd.

Alexander Skwar
-- 

Chuck Norris is not Politically Correct. He is just Correct. Always. 


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 30+ messages in thread

* [gentoo-user]  Re: 500 meg / partition (including /boot) *WITHOUT    USING LVM*
  2007-09-04  9:54             ` Remy Blank
                                 ` (2 preceding siblings ...)
  2007-09-04 12:29               ` Neil Bothwick
@ 2007-09-04 22:42               ` Alexander Skwar
  3 siblings, 0 replies; 30+ messages in thread
From: Alexander Skwar @ 2007-09-04 22:42 UTC (permalink / raw
  To: gentoo-user

· Remy Blank <remy.blank@pobox.com>:

> Well, I haven't spent much time looking at rescue CDs, I have always
> used Knoppix up to now and it has been good enough. I'll just check that
> recent LVM tools are on it.

Knoppix is *NOT* a rescue disc! It lacks some essential tools, eg.
LVM stuff.

I recommend GRML as a rescue disc.

Alexander Skwar
-- 
Promising costs nothing, it's the delivering that kills you.


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 30+ messages in thread

* [gentoo-user]  Re: Re: 500 meg / partition (including /boot) *WITHOUT USING LVM*
  2007-09-04 22:08             ` Walter Dnes
@ 2007-09-04 22:46               ` Alexander Skwar
  2007-09-04 23:23               ` [gentoo-user] " Neil Bothwick
  2007-09-05  6:56               ` Alan McKinnon
  2 siblings, 0 replies; 30+ messages in thread
From: Alexander Skwar @ 2007-09-04 22:46 UTC (permalink / raw
  To: gentoo-user

· Walter Dnes <waltdnes@waltdnes.org>:

> On Tue, Sep 04, 2007 at 10:45:15AM +0200, Alan McKinnon wrote
> 
>> You will always have a pretty good idea how much space / needs, it 
>> contains /bin, /sbin, /etc, /root and /lib. Unless oyu are in the habit 
>> of storing stuff in /root, 500M is plenty. So put / on a regular 
>> partition, everything else in LVM and your initramfs worries go away.
> 
> s/LVM/a partition using the rest of the hard drive/

No way. For sure not a partition of size ~500 G. That's something
you never ever do.

>> The only thing you need worry about is where are you going to get a 
>> decent howto that explains the concepts. You are dealing with three 
>> layers of stuff on top of physical partitions and some docs out there 
>> are ... confusing. Once you get the picture fully, it's as easy pie and 
>> makes perfect sense.
> 
>   Remove the LVM layer and things become even easier.

Does it? How do you have different filesystem types for different
directories? How do you minimize the effect of a corrupted filesystem?

>> Really, LVM is the answer to all those prayers you have been sending
>> up to $DEITY for years :-)

Exactly. I don't get why people try so hard to not use LVM.

Alexander Skwar
-- 
<Reed> It is important to note that the primary reason the Roman Empire
       fail is that they had no concept of zero... thus they could not
       test the success or failure of their C programs.


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [gentoo-user]  Re: 500 meg / partition (including /boot)  *WITHOUT USING LVM*
  2007-09-04 22:08             ` Walter Dnes
  2007-09-04 22:46               ` [gentoo-user] " Alexander Skwar
@ 2007-09-04 23:23               ` Neil Bothwick
  2007-09-05  6:56               ` Alan McKinnon
  2 siblings, 0 replies; 30+ messages in thread
From: Neil Bothwick @ 2007-09-04 23:23 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 699 bytes --]

On Tue, 4 Sep 2007 18:08:04 -0400, Walter Dnes wrote:

> > You will always have a pretty good idea how much space / needs, it 
> > contains /bin, /sbin, /etc, /root and /lib. Unless oyu are in the
> > habit of storing stuff in /root, 500M is plenty. So put / on a
> > regular partition, everything else in LVM and your initramfs worries
> > go away.  
> 
> s/LVM/a partition using the rest of the hard drive/

As I asked before, what happens when you need more space and want to add
another drive? With LVM, adding the space to your existing pool of space,
for use by any filesystem, is trivial.


-- 
Neil Bothwick

Those are my principles. If you don't like them I have others.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [gentoo-user]  Re: 500 meg / partition (including /boot) *WITHOUT USING LVM*
  2007-09-04 22:08             ` Walter Dnes
  2007-09-04 22:46               ` [gentoo-user] " Alexander Skwar
  2007-09-04 23:23               ` [gentoo-user] " Neil Bothwick
@ 2007-09-05  6:56               ` Alan McKinnon
  2007-09-08  1:29                 ` Walter Dnes
  2 siblings, 1 reply; 30+ messages in thread
From: Alan McKinnon @ 2007-09-05  6:56 UTC (permalink / raw
  To: gentoo-user

On Wednesday 05 September 2007, Walter Dnes wrote:
> On Tue, Sep 04, 2007 at 10:45:15AM +0200, Alan McKinnon wrote
>
> > You will always have a pretty good idea how much space / needs, it
> > contains /bin, /sbin, /etc, /root and /lib. Unless oyu are in the
> > habit of storing stuff in /root, 500M is plenty. So put / on a
> > regular partition, everything else in LVM and your initramfs
> > worries go away.
>
> s/LVM/a partition using the rest of the hard drive/

I disagree with your entire approach.

You are saying that you do not want to have to deal with LVM so your 
solution is to create one ginormous partition, stick everything on it 
and --bind mount directories from there to /usr, /var, etc. Sonow you 
have pieces of one big file system scattered all over your directory 
tree.

What have you gained? Nothing that I can see, so you are going to have 
to explain this in detail so we can all understand why you are even 
starting this at all.

From where I sit, you have gained nothing at all over one big filesystem 
mounted at /. You do not have the benfits of separate filesystems, you 
do not have the flexibility of LVM, you do not have the safety of 
separate mount points, you do not have the ability to mount various 
parts of the file system with different options. In fact, you have gone 
through several layers of symlinks to come back to the same place.

How is this better than a 500G filesystem mounted at /?
>
>   This is how I started the whole thread.
>
> > The only thing you need worry about is where are you going to get a
> > decent howto that explains the concepts. You are dealing with three
> > layers of stuff on top of physical partitions and some docs out
> > there are ... confusing. Once you get the picture fully, it's as
> > easy pie and makes perfect sense.
>
>   Remove the LVM layer and things become even easier.

Now I absolutely insist that you explain your reasoning and stop making 
assertions without backing them up. Give reasons, examples and numbers 
please.  

> > Really, LVM is the answer to all those prayers you have been
> > sending up to $DEITY for years :-)
>
>   With few exceptions, it's an answer looking for a problem.

Again, back this up please. If you assert that LVM is complex, then I 
will agree with you. Because guess what? kernels are complex, software 
is the most complex machine we humans have ever designed and admining a 
box IS rocket science. But if you say that LVM is useless without 
giving actual examples, then I'm afraid I'm going to have to call BS on 
that one. 

Tell you what, I'll go first:

1. What exactly are the few exceptions where LVM is not an answer 
looking for a problem, and actually is valid? Seeing as there are so 
few of them according to you, you should be able to rattle them off in 
a quick reply while asleep.

2. Please explain in detail how you will create a 4TB file system 
without LVM. This is NOT an edge case, this is a very real situation 
that occurs in data centres daily.

3. Take your proposal and explain to me in detail how you will prevent a 
backdoor or trojan from installing and executing scripts in /tmp 
and /var. Considering the massive problem that Windows has caused the 
world through an inability to do this, I would say this is a very 
important thing to be able to.

alan


-- 
Optimists say the glass is half full,
Pessimists say the glass is half empty,
Developers say wtf is the glass twice as big as it needs to be?

Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five
--
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [gentoo-user]  Re: 500 meg / partition (including /boot) *WITHOUT USING LVM*
  2007-09-05  6:56               ` Alan McKinnon
@ 2007-09-08  1:29                 ` Walter Dnes
  0 siblings, 0 replies; 30+ messages in thread
From: Walter Dnes @ 2007-09-08  1:29 UTC (permalink / raw
  To: gentoo-user

On Wed, Sep 05, 2007 at 08:56:09AM +0200, Alan McKinnon wrote

> How is this better than a 500G filesystem mounted at /?

  Try wiping the OS and re-installing (or installing a different distro
for that matter) with "a 500G filesystem mounted at /"... without
backing up your data and restoring afterwards.  With my setup, wipe all
files in the /partition and in the bindmounted directories, leaving the
empty directories, and do the install.

> 2. Please explain in detail how you will create a 4TB file system 
> without LVM. This is NOT an edge case, this is a very real situation 
> that occurs in data centres daily.

  I repeat again, I was talking about a 500 gig system on a home
machine.  I acknowledge that one size does not fit all, and an average
home machine solution does not necessarily work in a data centre.

> 3. Take your proposal and explain to me in detail how you will
> prevent a backdoor or trojan from installing and executing scripts
> in /tmp and /var. Considering the massive problem that Windows has
> caused the world through an inability to do this, I would say this
> is a very important thing to be able to.

  If a trojan can install stuff in a directory owned by root, it's
already too late.  And remember that a regular user account can run mail
to send spam, or ping or DNS lookups to take part in DDOS attacks.

-- 
Walter Dnes <waltdnes@waltdnes.org> In linux /sbin/init is Job #1
Q. Mr. Ghandi, what do you think of Microsoft security?
A. I think it would be a good idea.
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2007-09-08  1:38 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-02 14:32 [gentoo-user] 500 meg / partition (including /boot) *WITHOUT USING LVM* Walter Dnes
2007-09-02 19:15 ` Neil Bothwick
2007-09-02 20:00   ` Dirk Heinrichs
2007-09-02 23:20     ` Walter Dnes
2007-09-02 23:57       ` Neil Bothwick
2007-09-04  8:30         ` [gentoo-user] " Remy Blank
2007-09-04  8:45           ` Alan McKinnon
2007-09-04  9:54             ` Remy Blank
2007-09-04 10:00               ` Dirk Heinrichs
2007-09-04 10:04                 ` Alan McKinnon
2007-09-04 10:19               ` Alan McKinnon
2007-09-04 11:20                 ` Remy Blank
2007-09-04 12:27                 ` Neil Bothwick
2007-09-04 22:16                 ` Walter Dnes
2007-09-04 12:29               ` Neil Bothwick
2007-09-04 22:42               ` Alexander Skwar
2007-09-04 22:08             ` Walter Dnes
2007-09-04 22:46               ` [gentoo-user] " Alexander Skwar
2007-09-04 23:23               ` [gentoo-user] " Neil Bothwick
2007-09-05  6:56               ` Alan McKinnon
2007-09-08  1:29                 ` Walter Dnes
2007-09-04  9:25           ` Neil Bothwick
2007-09-04 10:05             ` Remy Blank
2007-09-04  9:30           ` Dirk Heinrichs
2007-09-04 10:14             ` Remy Blank
2007-09-04 12:01               ` Dirk Heinrichs
2007-09-04 12:40                 ` Remy Blank
2007-09-04 12:28               ` Neil Bothwick
2007-09-04 22:40           ` Alexander Skwar
2007-09-03  6:08       ` [gentoo-user] " Dirk Heinrichs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox