[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f73f7ab80907281136k2d7797bat2526d1798aba2f85@mail.gmail.com>
Date: Tue, 28 Jul 2009 14:36:31 -0400
From: Kyle Moffett <kyle@...fetthome.net>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Alan Cox <alan@...rguk.ukuu.org.uk>,
Zachary Amsden <zamsden@...hat.com>, Tejun Heo <tj@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
linux-kernel@...r.kernel.org, axboe@...nel.dk, hch@...radead.org,
akpm@...ux-foundation.org, Paul.Clements@...eleye.com,
tytso@....edu, miklos <miklos@...redi.hu>
Subject: Re: [PATCH] Allow userspace block device implementation
On Tue, Jul 28, 2009 at 12:00, Linus
Torvalds<torvalds@...ux-foundation.org> wrote:
> The fact that some distributions already go too far, and use DM whether it
> makes sense or not is only inconveniencing real users. It makes things
> like data portability much harder. I have had real-life cases where I
> wanted to move a disk from one machine to another, only to notice that the
> crazy default for the distro I had used was to make it impossible, because
> all the filesystems crossed disks.
>
> I've since learnt to not use DM (and instead doing a very inconvenient
> "partition everything by hand because the install tool doesn't allow for
> any simple automated way to make a sane install"), and to just put /home
> on one disk and / on the other, and then I can way more easily just move
> my /home disk around, for example.
That's not so much an argument against LVM as it is an argument for
fixing those distro installer tools... Using device-mapper to map
standard Linux partition-tables has the following benefits:
(1) The ability to rearrange, resize, and restructure
partition-tables on the fly. The existing "re-read partition tables"
infrastructure does not safely and reasonably handle changes to the
partition-table while partitions are mounted. Using device-mapper you
can shrink the mapped space associated with a partition then insert
and map a new partition in that gap... all without rebooting.
(2) If you use DM via LVM and you have a bit of unallocated space,
you can create block-level snapshots. This is useful for *much* more
than just a datacenter, it makes home backup tools much easier and
safer too.
(3) Again, using LVM you can shrink one partition (/) and grow
another (/home), even if you didn't guess right in your initial
allocations.
Personally I am also extremely fond of running commands like "mke2fs
-j /dev/mapper/ares-tempdata" instead of "mke2fs -j /dev/sdb4"... err,
shoot, I meant /dev/sda4, there goes my /home partition...
Even when you are moving hard drives from one computer into another,
it makes it much easier keep track of them if you use the server name
in the "volume group" name. When plug both backup drives into my
desktop, they're easily distinguished as /dev/mapper/ares_bkup-home
and /dev/mapper/philyra_bkup-home.
Admittedly there are some pretty crappy tools out there... I've had
problems with a few which could not reliably do partition math. (if
the partitioner tells you that you have a 10240MB disk, and you tell
it to put 5120MB on one partition and 5120MB on the other, it should
not tell you that you over-allocated the disk by 1MB, even if it might
need that for metadata).
Perhaps what we need is a really minimal klibc toolkit built (by
default) as part of the kernel and embedded into the kernel image. If
the bootloader specifies an external initrd then the in-kernel one
would either be ignored and discarded; otherwise it would provide
clean backwards-compatibility for any boot-time features and arguments
that have been removed from the kernel proper.
Cheers,
Kyle Moffett
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists