* [gentoo-user] extending /usr partition...
@ 2009-03-21 18:05 Jarry
2009-03-21 18:12 ` Alan McKinnon
2009-03-21 18:16 ` [gentoo-user] " Dirk Heinrichs
0 siblings, 2 replies; 25+ messages in thread
From: Jarry @ 2009-03-21 18:05 UTC (permalink / raw
To: gentoo-user
Hi,
I found out my /usr is getting full pretty fast, so I want
to increase it before it happens a real problem. I have:
/dev/md4 (sda5+sdb5), ~5GB size, used for /var, nearly empty
/dev/md5 (sda6+sdb6), ~5GB size, used for /usr, nearly full (90%)
And I have /backup on separate partition (hda1), big enough
What I think of is this procedure: First I copy /var and /usr:
cp -a /var /backup
cp -a /usr /backup
Then I intend to reboot with install-cd, repartition sda/sdb
(make sda5/sdb5 smaller and sda6/sdb6 bigger), create new
/dev/md4 and /dev/md5, mount them, and copy the content back.
cp -a /mnt/gentoo/backup/var /mnt/gentoo/var
cp -a /mnt/gentoo/backup/usr /mnt/gentoo/usr
Is it a correct procedure? All partitions are ext3 type, no lvm2,
moreover on /dev/md so I can not extend/shrink them while using...
Jarry
--
_______________________________________________________________
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [gentoo-user] extending /usr partition...
2009-03-21 18:05 [gentoo-user] extending /usr partition Jarry
@ 2009-03-21 18:12 ` Alan McKinnon
2009-03-21 18:20 ` Dirk Heinrichs
` (2 more replies)
2009-03-21 18:16 ` [gentoo-user] " Dirk Heinrichs
1 sibling, 3 replies; 25+ messages in thread
From: Alan McKinnon @ 2009-03-21 18:12 UTC (permalink / raw
To: gentoo-user
On Saturday 21 March 2009 20:05:42 Jarry wrote:
> Hi,
>
> I found out my /usr is getting full pretty fast, so I want
> to increase it before it happens a real problem. I have:
>
> /dev/md4 (sda5+sdb5), ~5GB size, used for /var, nearly empty
> /dev/md5 (sda6+sdb6), ~5GB size, used for /usr, nearly full (90%)
> And I have /backup on separate partition (hda1), big enough
>
> What I think of is this procedure: First I copy /var and /usr:
> cp -a /var /backup
> cp -a /usr /backup
Yes
> Then I intend to reboot with install-cd, repartition sda/sdb
> (make sda5/sdb5 smaller and sda6/sdb6 bigger), create new
> /dev/md4 and /dev/md5, mount them, and copy the content back.
Yes
> cp -a /mnt/gentoo/backup/var /mnt/gentoo/var
> cp -a /mnt/gentoo/backup/usr /mnt/gentoo/usr
Um, no. This gives you new usr and var directories like so:
/usr/usr/
/var/var
You want:
cp -a /mnt/gentoo/backup/var /mnt/gentoo/
cp -a /mnt/gentoo/backup/usr /mnt/gentoo/
> Is it a correct procedure? All partitions are ext3 type, no lvm2,
> moreover on /dev/md so I can not extend/shrink them while using...
It's correct, and it also highlights just what a PITA it is to manipulate
traditional disk partitions. With lvm, this becomes a breeze. With ZFS (we
might see it one day) this becomes invisible.
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [gentoo-user] extending /usr partition...
2009-03-21 18:05 [gentoo-user] extending /usr partition Jarry
2009-03-21 18:12 ` Alan McKinnon
@ 2009-03-21 18:16 ` Dirk Heinrichs
1 sibling, 0 replies; 25+ messages in thread
From: Dirk Heinrichs @ 2009-03-21 18:16 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1277 bytes --]
Am Samstag, 21. März 2009 19:05:42 schrieb Jarry:
> I found out my /usr is getting full pretty fast, so I want
> to increase it before it happens a real problem. I have:
>
> /dev/md4 (sda5+sdb5), ~5GB size, used for /var, nearly empty
> /dev/md5 (sda6+sdb6), ~5GB size, used for /usr, nearly full (90%)
> And I have /backup on separate partition (hda1), big enough
>
> What I think of is this procedure: First I copy /var and /usr:
> cp -a /var /backup
> cp -a /usr /backup
Yes.
> Then I intend to reboot with install-cd, repartition sda/sdb
> (make sda5/sdb5 smaller and sda6/sdb6 bigger), create new
> /dev/md4 and /dev/md5, mount them, and copy the content back.
No. Do it right this time and create only one md device and use lvm on top of
it to avoid such problems in the future.
BTW: Speaking of md4 and md5, is there also md[123]? If yes, you should think
about adding their space to that large md device, too.
> cp -a /mnt/gentoo/backup/var /mnt/gentoo/var
> cp -a /mnt/gentoo/backup/usr /mnt/gentoo/usr
Yes.
> Is it a correct procedure? All partitions are ext3 type, no lvm2,
> moreover on /dev/md so I can not extend/shrink them while using...
And that's the reason why it's not the correct procedure.
HTH...
Dirk
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [gentoo-user] extending /usr partition...
2009-03-21 18:12 ` Alan McKinnon
@ 2009-03-21 18:20 ` Dirk Heinrichs
2009-03-21 18:39 ` Jarry
2009-03-22 6:39 ` [gentoo-user] " Francesco Talamona
2 siblings, 0 replies; 25+ messages in thread
From: Dirk Heinrichs @ 2009-03-21 18:20 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 866 bytes --]
Am Samstag, 21. März 2009 19:12:56 schrieb Alan McKinnon:
> > cp -a /mnt/gentoo/backup/var /mnt/gentoo/var
> > cp -a /mnt/gentoo/backup/usr /mnt/gentoo/usr
>
> Um, no. This gives you new usr and var directories like so:
>
> /usr/usr/
> /var/var
>
> You want:
>
> cp -a /mnt/gentoo/backup/var /mnt/gentoo/
> cp -a /mnt/gentoo/backup/usr /mnt/gentoo/
Oh, you're right on that, I just wrote "Yes" ;-)
> > Is it a correct procedure? All partitions are ext3 type, no lvm2,
> > moreover on /dev/md so I can not extend/shrink them while using...
>
> It's correct, and it also highlights just what a PITA it is to manipulate
> traditional disk partitions. With lvm, this becomes a breeze. With ZFS (we
> might see it one day) this becomes invisible.
btrfs will be there in .29 (maybe not stable yet, but it looks promising).
Bye...
Dirk
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [gentoo-user] extending /usr partition...
2009-03-21 18:12 ` Alan McKinnon
2009-03-21 18:20 ` Dirk Heinrichs
@ 2009-03-21 18:39 ` Jarry
2009-03-21 18:53 ` Alan McKinnon
` (4 more replies)
2009-03-22 6:39 ` [gentoo-user] " Francesco Talamona
2 siblings, 5 replies; 25+ messages in thread
From: Jarry @ 2009-03-21 18:39 UTC (permalink / raw
To: gentoo-user
Alan McKinnon wrote:
>> cp -a /mnt/gentoo/backup/var /mnt/gentoo/var
>> cp -a /mnt/gentoo/backup/usr /mnt/gentoo/usr
>
> Um, no. This gives you new usr and var directories like so:
> /usr/usr/
> /var/var
>
> You want:
> cp -a /mnt/gentoo/backup/var /mnt/gentoo/
> cp -a /mnt/gentoo/backup/usr /mnt/gentoo/
Thanks for correction!
> With lvm, this becomes a breeze.
I remember having lvm2 a few years ago, and despite of that I could not
extend any partition, which was being used. What is then lvm2 good for,
if I can not extend partitions on-the-fly? I can not unmount /usr before
extending...
And one more counter-argument: with traditional partitions I can select
where a certain partition is (physically). Those partitions accessed
frequently I put to the beginning of the disk with higher transfer-rate.
In my case, it makes quite difference:
obelix ~ # hdparm -t /dev/md2
Timing buffered disk reads: 252 MB in 3.02 seconds = 83.23 MB/sec
obelix ~ # hdparm -t /dev/md9
Timing buffered disk reads: 150 MB in 3.02 seconds = 49.72 MB/sec
Jarry
--
_______________________________________________________________
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [gentoo-user] extending /usr partition...
2009-03-21 18:39 ` Jarry
@ 2009-03-21 18:53 ` Alan McKinnon
2009-03-21 19:37 ` Daniel Troeder
` (3 subsequent siblings)
4 siblings, 0 replies; 25+ messages in thread
From: Alan McKinnon @ 2009-03-21 18:53 UTC (permalink / raw
To: gentoo-user
On Saturday 21 March 2009 20:39:08 Jarry wrote:
> Alan McKinnon wrote:
> >> cp -a /mnt/gentoo/backup/var /mnt/gentoo/var
> >> cp -a /mnt/gentoo/backup/usr /mnt/gentoo/usr
> >
> > Um, no. This gives you new usr and var directories like so:
> > /usr/usr/
> > /var/var
> >
> > You want:
> > cp -a /mnt/gentoo/backup/var /mnt/gentoo/
> > cp -a /mnt/gentoo/backup/usr /mnt/gentoo/
>
> Thanks for correction!
>
> > With lvm, this becomes a breeze.
>
> I remember having lvm2 a few years ago, and despite of that I could not
> extend any partition, which was being used. What is then lvm2 good for,
> if I can not extend partitions on-the-fly? I can not unmount /usr before
> extending...
That is not lvm's fault, it is the fault of the OS.
/usr is not a filesystem that changes much anyway. If you look at a few
similar machines, you can guess quite accurately what it's size is going to
be.
/var, database directories, home directories - these are the things you can
change on the fly. These are also the things that you do want to change on the
fly.
> And one more counter-argument: with traditional partitions I can select
> where a certain partition is (physically). Those partitions accessed
> frequently I put to the beginning of the disk with higher transfer-rate.
> In my case, it makes quite difference:
>
> obelix ~ # hdparm -t /dev/md2
> Timing buffered disk reads: 252 MB in 3.02 seconds = 83.23 MB/sec
>
> obelix ~ # hdparm -t /dev/md9
> Timing buffered disk reads: 150 MB in 3.02 seconds = 49.72 MB/sec
You have no guarantee whatsoever that the data resides on the part of the disk
you think it resides on, so this entire argument becomes moot. Today, by happy
coincidence, it is. Tomorrow with another drive it might not be. You also have
to deal with the effect of disk caching. And you didn't do the only real test
the remotely means anything at all - random writes. Throughout measurements
are meaningless as the thing you measure hardly ever happens in real life.
It's a lot like determining the suitability of a future wife by measuring her
foot size: a perfectly correct measure, and also a perfectly useless one.
It's this kind of thinking that keeps people trapped in circumstance and
unable to take advantage of new ideas. In the IT industry, it is rife.
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [gentoo-user] extending /usr partition...
2009-03-21 18:39 ` Jarry
2009-03-21 18:53 ` Alan McKinnon
@ 2009-03-21 19:37 ` Daniel Troeder
2009-03-21 20:57 ` Neil Bothwick
` (2 subsequent siblings)
4 siblings, 0 replies; 25+ messages in thread
From: Daniel Troeder @ 2009-03-21 19:37 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1156 bytes --]
On Sat, 2009-03-21 at 19:39 +0100, Jarry wrote:
> I remember having lvm2 a few years ago, and despite of that I could not
> extend any partition, which was being used. What is then lvm2 good for,
> if I can not extend partitions on-the-fly? I can not unmount /usr before
> extending...
This is filesystem (and OS) dependent. I use XFS for all my partitions,
because one of the nice thing about it is, that it can grow filesystems
when they are mounted. I think this is possible with ext3 too, but I did
not test it.
Even under heavy load it is a matter of seconds to grow a XFS FS in a
LVM.
> And one more counter-argument: with traditional partitions I can select
> where a certain partition is (physically). Those partitions accessed
> frequently I put to the beginning of the disk with higher transfer-rate.
> In my case, it makes quite difference:
In my experience more (human and up-) time is lost in
backup-reboot-repartition-format-restore-reboot than in some iowait.
Bye,
Daniel
--
PGP key @ http://pgpkeys.pca.dfn.de/pks/lookup?search=0xBB9D4887&op=get
# gpg --recv-keys --keyserver hkp://subkeys.pgp.net 0xBB9D4887
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [gentoo-user] extending /usr partition...
2009-03-21 18:39 ` Jarry
2009-03-21 18:53 ` Alan McKinnon
2009-03-21 19:37 ` Daniel Troeder
@ 2009-03-21 20:57 ` Neil Bothwick
2009-03-21 21:13 ` BRM
2009-03-22 9:32 ` Dirk Heinrichs
2009-03-22 10:37 ` Dirk Heinrichs
4 siblings, 1 reply; 25+ messages in thread
From: Neil Bothwick @ 2009-03-21 20:57 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 770 bytes --]
On Sat, 21 Mar 2009 19:39:08 +0100, Jarry wrote:
> I remember having lvm2 a few years ago, and despite of that I could not
> extend any partition, which was being used. What is then lvm2 good for,
> if I can not extend partitions on-the-fly? I can not unmount /usr before
> extending...
You can extend partitions on the fly with LVM2, and have always been able
to, provided you have free space in its volume group. Was it the partition
you had trouble resizing or the filesystem? That's a separate step and is
dependent on the tools available for the particular filesystem on use. It
is certainly possible to extend a mounted ext3 filesystem now, but that
may not have always been the case.
--
Neil Bothwick
Can vegetarians eat animal crackers?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [gentoo-user] extending /usr partition...
2009-03-21 20:57 ` Neil Bothwick
@ 2009-03-21 21:13 ` BRM
2009-03-21 23:39 ` Neil Bothwick
` (2 more replies)
0 siblings, 3 replies; 25+ messages in thread
From: BRM @ 2009-03-21 21:13 UTC (permalink / raw
To: gentoo-user
With all the words of LVM2 going on, I feel it is only appropriate to also mention the risk.
On a desktop I had installed LVM2 considering that I did need to upgrade partitions every now and then and my previous solution was add another drive/partition and cross mount - e.g. like done with /usr/local under /usr, which worked fairly well. LVM2 worked great - until one of the drives crashed and I was trying to figure out what was on it. From that pov, volume management is a pain. I did figure out what I had mounted to it - but only after deconstructing the LVM configuration file to match it up with what I had put there. (And no, I had not yet gotten to doing an LVM soft-RAID solution to map a single LVM partition to two drives, which would certainly have helped.) I got my system working by adding a new drive that was not part of the volume group, and removing the old drives from the volume group. Fortunately, I had my volume setup so that they one partition was not made up of non-overlaping partitions on different drives. (e.g. partition A =
sda1 + sda2 instead of sda1 + sdb1.)
So, unless you are looking to use LVM in a soft-RAID solution between multiple physical drives, not multiple partitions on the same drive, (e.g. partition A = sda1 + sda2, with mirror on sdb1+sdb2), then I would not suggest it as should anything happen, it'll make data recovery that much harder.
Just 2 cents for the pot.
Ben
----- Original Message ----
From: Neil Bothwick <neil@digimed.co.uk>
To: gentoo-user@lists.gentoo.org
Sent: Saturday, March 21, 2009 4:57:55 PM
Subject: Re: [gentoo-user] extending /usr partition...
On Sat, 21 Mar 2009 19:39:08 +0100, Jarry wrote:
> I remember having lvm2 a few years ago, and despite of that I could not
> extend any partition, which was being used. What is then lvm2 good for,
> if I can not extend partitions on-the-fly? I can not unmount /usr before
> extending...
You can extend partitions on the fly with LVM2, and have always been able
to, provided you have free space in its volume group. Was it the partition
you had trouble resizing or the filesystem? That's a separate step and is
dependent on the tools available for the particular filesystem on use. It
is certainly possible to extend a mounted ext3 filesystem now, but that
may not have always been the case.
--
Neil Bothwick
Can vegetarians eat animal crackers?
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [gentoo-user] extending /usr partition...
2009-03-21 21:13 ` BRM
@ 2009-03-21 23:39 ` Neil Bothwick
2009-03-22 2:46 ` Albert Hopkins
2009-03-22 8:42 ` [gentoo-user] " Alan McKinnon
2 siblings, 0 replies; 25+ messages in thread
From: Neil Bothwick @ 2009-03-21 23:39 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 702 bytes --]
On Sat, 21 Mar 2009 14:13:49 -0700 (PDT), BRM wrote:
> So, unless you are looking to use LVM in a soft-RAID solution between
> multiple physical drives, not multiple partitions on the same drive,
> (e.g. partition A = sda1 + sda2, with mirror on sdb1+sdb2), then I
> would not suggest it as should anything happen, it'll make data
> recovery that much harder.
If your data was valuable enough for you to spend that much time
recovering it, it was valuable enough to backup in the first place.
Having said that, RAID does provide added security against mechanical
failure.
--
Neil Bothwick
Biology is the only science in which multiplication means the same thing
as division.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [gentoo-user] extending /usr partition...
2009-03-21 21:13 ` BRM
2009-03-21 23:39 ` Neil Bothwick
@ 2009-03-22 2:46 ` Albert Hopkins
2009-03-22 6:36 ` [gentoo-user] " Francesco Talamona
2009-03-22 8:42 ` [gentoo-user] " Alan McKinnon
2 siblings, 1 reply; 25+ messages in thread
From: Albert Hopkins @ 2009-03-22 2:46 UTC (permalink / raw
To: gentoo-user
On Sat, 2009-03-21 at 14:13 -0700, BRM wrote:
> With all the words of LVM2 going on, I feel it is only appropriate to also mention the risk.
>
> On a desktop I had installed LVM2 considering that I did need to upgrade partitions every now and then and my previous solution was add another drive/partition and cross mount - e.g. like done with /usr/local under /usr, which worked fairly well. LVM2 worked great - until one of the drives crashed and I was trying to figure out what was on it. From that pov, volume management is a pain. I did figure out what I had mounted to it - but only after deconstructing the LVM configuration file to match it up with what I had put there. (And no, I had not yet gotten to doing an LVM soft-RAID solution to map a single LVM partition to two drives, which would certainly have helped.) I got my system working by adding a new drive that was not part of the volume group, and removing the old drives from the volume group. Fortunately, I had my volume setup so that they one partition was not made up of non-overlaping partitions on different drives. (e.g. partition A =
> sda1 + sda2 instead of sda1 + sdb1.)
>
> So, unless you are looking to use LVM in a soft-RAID solution between multiple physical drives, not multiple partitions on the same drive, (e.g. partition A = sda1 + sda2, with mirror on sdb1+sdb2), then I would not suggest it as should anything happen, it'll make data recovery that much harder.
>
> Just 2 cents for the pot.
With or without LVM if you lose a drive then you've lost the data on it.
LVM does have the capability of assembling a partially damaged volume
group just not a partially damaged logical volume which, when you think
about it, makes sense.
And you can also throw in the standard warning about backing up your
data.
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-user] Re: extending /usr partition...
2009-03-22 2:46 ` Albert Hopkins
@ 2009-03-22 6:36 ` Francesco Talamona
2009-03-22 7:16 ` Philip Webb
` (2 more replies)
0 siblings, 3 replies; 25+ messages in thread
From: Francesco Talamona @ 2009-03-22 6:36 UTC (permalink / raw
To: gentoo-user
On Sunday 22 March 2009, Albert Hopkins wrote:
> On Sat, 2009-03-21 at 14:13 -0700, BRM wrote:
> > With all the words of LVM2 going on, I feel it is only appropriate
> > to also mention the risk.
> >
> > On a desktop I had installed LVM2 considering that I did need to
> > upgrade partitions every now and then and my previous solution was
> > add another drive/partition and cross mount - e.g. like done with
> > /usr/local under /usr, which worked fairly well. LVM2 worked great
> > - until one of the drives crashed and I was trying to figure out
> > what was on it. From that pov, volume management is a pain. I did
> > figure out what I had mounted to it - but only after deconstructing
> > the LVM configuration file to match it up with what I had put
> > there. (And no, I had not yet gotten to doing an LVM soft-RAID
> > solution to map a single LVM partition to two drives, which would
> > certainly have helped.) I got my system working by adding a new
> > drive that was not part of the volume group, and removing the old
> > drives from the volume group. Fortunately, I had my volume setup so
> > that they one partition was not made up of non-overlaping
> > partitions on different drives. (e.g. partition A = sda1 + sda2
> > instead of sda1 + sdb1.)
> >
> > So, unless you are looking to use LVM in a soft-RAID solution
> > between multiple physical drives, not multiple partitions on the
> > same drive, (e.g. partition A = sda1 + sda2, with mirror on
> > sdb1+sdb2), then I would not suggest it as should anything happen,
> > it'll make data recovery that much harder.
> >
> > Just 2 cents for the pot.
>
> With or without LVM if you lose a drive then you've lost the data on
> it. LVM does have the capability of assembling a partially damaged
> volume group just not a partially damaged logical volume which, when
> you think about it, makes sense.
>
> And you can also throw in the standard warning about backing up your
> data.
The point is that LVM adds an extra layer of complexity.
I used LVM paired with soft RAID, and when I needed to boot from a
liveCD I discovered that I had to rebuild the setup by hand.
When you're in trouble it is pristine to have a quick way out instead of
being "swamped". I had my notes and managed to reckon the configuration
(cold sweating!), but at the first occasion I reverted my system to
plain RAID.
Never used LVM for the few Gentoo server I manage.
That said backup+RAID is the way to go.
Cheers
Francesco
--
Linux Version 2.6.28-gentoo-r3, Compiled #1 SMP PREEMPT Sun Mar 8
12:38:59 CET 2009
Two 1GHz AMD Athlon 64 Processors, 4GB RAM, 4018.04 Bogomips Total
aemaeth
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-user] Re: extending /usr partition...
2009-03-21 18:12 ` Alan McKinnon
2009-03-21 18:20 ` Dirk Heinrichs
2009-03-21 18:39 ` Jarry
@ 2009-03-22 6:39 ` Francesco Talamona
2009-03-22 8:32 ` Alan McKinnon
2 siblings, 1 reply; 25+ messages in thread
From: Francesco Talamona @ 2009-03-22 6:39 UTC (permalink / raw
To: gentoo-user
On Saturday 21 March 2009, Alan McKinnon wrote:
> It's correct, and it also highlights just what a PITA it is to
> manipulate traditional disk partitions. With lvm, this becomes a
> breeze. With ZFS (we might see it one day) this becomes invisible.
I thought it was already there:
sys-fs/zfs-fuse
Ciao
Francesco
--
Linux Version 2.6.28-gentoo-r3, Compiled #1 SMP PREEMPT Sun Mar 8
12:38:59 CET 2009
Two 1GHz AMD Athlon 64 Processors, 4GB RAM, 4018.04 Bogomips Total
aemaeth
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [gentoo-user] Re: extending /usr partition...
2009-03-22 6:36 ` [gentoo-user] " Francesco Talamona
@ 2009-03-22 7:16 ` Philip Webb
2009-03-22 8:44 ` Alan McKinnon
2009-03-22 11:12 ` Albert Hopkins
2 siblings, 0 replies; 25+ messages in thread
From: Philip Webb @ 2009-03-22 7:16 UTC (permalink / raw
To: gentoo-user
090322 Francesco Talamona wrote:
> I used LVM paired with soft RAID & when I needed to boot from a liveCD
> I discovered that I had to rebuild the setup by hand.
I recently had a small problem with start-up caused by a PPP glitch
& accessed the box with System Rescue 1.1.0 on a CD.
I was surprised that it recognised my LVM set-up without any problem,
which allowed me to mount the volume containing /etc & fix the PPP set-up.
I installed LVM when I built the machine 0710
& have had no problem of any kind with it so far.
My CAD 0,02 ...
--
========================,,============================================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [gentoo-user] Re: extending /usr partition...
2009-03-22 6:39 ` [gentoo-user] " Francesco Talamona
@ 2009-03-22 8:32 ` Alan McKinnon
0 siblings, 0 replies; 25+ messages in thread
From: Alan McKinnon @ 2009-03-22 8:32 UTC (permalink / raw
To: gentoo-user
On Sunday 22 March 2009 08:39:20 Francesco Talamona wrote:
> On Saturday 21 March 2009, Alan McKinnon wrote:
> > It's correct, and it also highlights just what a PITA it is to
> > manipulate traditional disk partitions. With lvm, this becomes a
> > breeze. With ZFS (we might see it one day) this becomes invisible.
>
> I thought it was already there:
> sys-fs/zfs-fuse
Yes, there is a fuse module. I meant in-kernel
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [gentoo-user] extending /usr partition...
2009-03-21 21:13 ` BRM
2009-03-21 23:39 ` Neil Bothwick
2009-03-22 2:46 ` Albert Hopkins
@ 2009-03-22 8:42 ` Alan McKinnon
2009-03-23 12:44 ` BRM
2 siblings, 1 reply; 25+ messages in thread
From: Alan McKinnon @ 2009-03-22 8:42 UTC (permalink / raw
To: gentoo-user
On Saturday 21 March 2009 23:13:49 BRM wrote:
> So, unless you are looking to use LVM in a soft-RAID solution between
> multiple physical drives, not multiple partitions on the same drive, (e.g.
> partition A = sda1 + sda2, with mirror on sdb1+sdb2), then I would not
> suggest it as should anything happen, it'll make data recovery that much
> harder.
LVM does not and should not provide data integrity features.
You lost a drive. The data on it goes away. What did you expect would happen?
That the data on it would magically reconstruct itself?
In a situation like that, losing a drive with LVM is only slightly more
inconvenient (one or two more steps) than losing the same drive without LVM
(which is horribly inconvenient by itself).
Please don't blame LVM for what is actually a user error.
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [gentoo-user] Re: extending /usr partition...
2009-03-22 6:36 ` [gentoo-user] " Francesco Talamona
2009-03-22 7:16 ` Philip Webb
@ 2009-03-22 8:44 ` Alan McKinnon
2009-03-22 11:12 ` Albert Hopkins
2 siblings, 0 replies; 25+ messages in thread
From: Alan McKinnon @ 2009-03-22 8:44 UTC (permalink / raw
To: gentoo-user
On Sunday 22 March 2009 08:36:31 Francesco Talamona wrote:
> > With or without LVM if you lose a drive then you've lost the data on
> > it. LVM does have the capability of assembling a partially damaged
> > volume group just not a partially damaged logical volume which, when
> > you think about it, makes sense.
> >
> > And you can also throw in the standard warning about backing up your
> > data.
>
> The point is that LVM adds an extra layer of complexity.
Apparently you have not considered the enormous complexity inside the drive
itself. The added complexity of LVM is tiny in comparison to what goes on
there.
LVM adds flexibility at the cost of one more thing to think about. You should
already be performing backups and have redundancy plans (keeping in mind that
it is a sheer miracle of modern science that the drive even works at all) For
the occasional case where LVM does fail you.
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [gentoo-user] extending /usr partition...
2009-03-21 18:39 ` Jarry
` (2 preceding siblings ...)
2009-03-21 20:57 ` Neil Bothwick
@ 2009-03-22 9:32 ` Dirk Heinrichs
2009-03-22 10:59 ` Jarry
2009-03-22 10:37 ` Dirk Heinrichs
4 siblings, 1 reply; 25+ messages in thread
From: Dirk Heinrichs @ 2009-03-22 9:32 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 440 bytes --]
Am Samstag, 21. März 2009 19:39:08 schrieb Jarry:
> I remember having lvm2 a few years ago, and despite of that I could not
> extend any partition, which was being used. What is then lvm2 good for,
> if I can not extend partitions on-the-fly? I can not unmount /usr before
> extending...
The filesystem has to support resizing. A few years ago ext3 only supported
offline resize. That has changed meanwhile.
Bye...
Dirk
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [gentoo-user] extending /usr partition...
2009-03-21 18:39 ` Jarry
` (3 preceding siblings ...)
2009-03-22 9:32 ` Dirk Heinrichs
@ 2009-03-22 10:37 ` Dirk Heinrichs
4 siblings, 0 replies; 25+ messages in thread
From: Dirk Heinrichs @ 2009-03-22 10:37 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1076 bytes --]
Am Samstag, 21. März 2009 19:39:08 schrieb Jarry:
> And one more counter-argument: with traditional partitions I can select
> where a certain partition is (physically). Those partitions accessed
> frequently I put to the beginning of the disk with higher transfer-rate.
> In my case, it makes quite difference:
>
> obelix ~ # hdparm -t /dev/md2
> Timing buffered disk reads: 252 MB in 3.02 seconds = 83.23 MB/sec
>
> obelix ~ # hdparm -t /dev/md9
> Timing buffered disk reads: 150 MB in 3.02 seconds = 49.72 MB/sec
Who says you'd loose that ability with LVM? You could
1) Create two md devices and put one volume group on top of each calling them
vg-fast and vg-slow, then put your logical volumes into either VG.
2) Keep your setup with 9 md devices and put one large VG on top, then for
each LV tell LVM on which physical volume (PV) it should reside (don't know
wether that really works, though. Just guessing that this is what the
"PhysicalVolumePath" in lvcreate is meant for, the man page leaves it open).
Bye...
Dirk
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [gentoo-user] extending /usr partition...
2009-03-22 9:32 ` Dirk Heinrichs
@ 2009-03-22 10:59 ` Jarry
2009-03-22 11:45 ` Alan McKinnon
0 siblings, 1 reply; 25+ messages in thread
From: Jarry @ 2009-03-22 10:59 UTC (permalink / raw
To: gentoo-user
Dirk Heinrichs wrote:
>> I remember having lvm2 a few years ago, and despite of that I could not
>> extend any partition, which was being used. What is then lvm2 good for,
>> if I can not extend partitions on-the-fly? I can not unmount /usr before
>> extending...
>
> The filesystem has to support resizing. A few years ago ext3 only supported
> offline resize. That has changed meanwhile.
Are you sure? man resize2fs says:
"...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..."
If I understand correctly, you can only extend ext3-partition
with it. But shrinking must be done off-line, on unmounted fs...
Concerning resizing, I was wrong with blaming lvm2 for not being
able to resize fs online. It is really problem of filesystem which
might (or not) support it. I'm using ext3 because it is one of two
linux-supported fs I have some experience with (the other is
reiserfs, and I have some serious doubts about its future)...
Jarry
--
_______________________________________________________________
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [gentoo-user] Re: extending /usr partition...
2009-03-22 6:36 ` [gentoo-user] " Francesco Talamona
2009-03-22 7:16 ` Philip Webb
2009-03-22 8:44 ` Alan McKinnon
@ 2009-03-22 11:12 ` Albert Hopkins
2009-03-22 12:53 ` Francesco Talamona
2 siblings, 1 reply; 25+ messages in thread
From: Albert Hopkins @ 2009-03-22 11:12 UTC (permalink / raw
To: gentoo-user
[...]
> The point is that LVM adds an extra layer of complexity.
>
> I used LVM paired with soft RAID, and when I needed to boot from a
> liveCD I discovered that I had to rebuild the setup by hand.
You mean the 1 extra command that's needed to assemble a VG?
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [gentoo-user] extending /usr partition...
2009-03-22 10:59 ` Jarry
@ 2009-03-22 11:45 ` Alan McKinnon
0 siblings, 0 replies; 25+ messages in thread
From: Alan McKinnon @ 2009-03-22 11:45 UTC (permalink / raw
To: gentoo-user
On Sunday 22 March 2009 12:59:15 Jarry wrote:
> Are you sure? man resize2fs says:
>
> "...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..."
>
> If I understand correctly, you can only extend ext3-partition
> with it. But shrinking must be done off-line, on unmounted fs...
Yes, and this is true for *any* filesystem. Some mature filesystems out there
don't support resizing at all in any form.
Enlarging a filesystems on line is easy. Make the device holding it bigger,
add new inodes, add inodes to the inode tree and Hey Presto! filesystem is
bigger. It's quick as you are *guaranteed* that the new inodes are not in use
until the resize ends.
Reducing is entirely different. You have to take inodes in use at the end of
the filesystem, move them to somewhere else, fix the pointers in other inodes
that point to them, repeat for all other inodes that will have to go away
after the resize. Yuck. Tricky code :-)
You are going to have this problem with any inode-based filesystem, not just
ext3.
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-user] Re: extending /usr partition...
2009-03-22 11:12 ` Albert Hopkins
@ 2009-03-22 12:53 ` Francesco Talamona
2009-03-22 15:06 ` Albert Hopkins
0 siblings, 1 reply; 25+ messages in thread
From: Francesco Talamona @ 2009-03-22 12:53 UTC (permalink / raw
To: gentoo-user
On Sunday 22 March 2009, Albert Hopkins wrote:
> [...]
>
> > The point is that LVM adds an extra layer of complexity.
> >
> > I used LVM paired with soft RAID, and when I needed to boot from a
> > liveCD I discovered that I had to rebuild the setup by hand.
>
> You mean the 1 extra command that's needed to assemble a VG?
It wasn't that easy, that's what I did in the end:
1) vgchange -a n
2) vgexport -a
3) vgimport -a
4) vgscan --mknodes
5) vgchange -a y
Maybe 4) and 5) alone would do the trick... I don't remember which
livecd I used then, except for the fact that I had to reboot
with "dolvm2" option; now I have a tested "first aid kit" with notes on
paper (all my notes were on those discs at the time) with well known
and proven liveCDs.
When I have to resize/redesign my partitions I simply find easier rsync
plus a reboot.
I rsync the live system while I use it, than reboot to a liveCD to rsync
the file changed meanwhile (to minimize downtime). So I shortly tossed
LVM and since I live happily without.
Ciao
Francesco
--
Linux Version 2.6.28-gentoo-r3, Compiled #1 SMP PREEMPT Sun Mar 8
12:38:59 CET 2009
Two 1GHz AMD Athlon 64 Processors, 4GB RAM, 4018.04 Bogomips Total
aemaeth
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [gentoo-user] Re: extending /usr partition...
2009-03-22 12:53 ` Francesco Talamona
@ 2009-03-22 15:06 ` Albert Hopkins
0 siblings, 0 replies; 25+ messages in thread
From: Albert Hopkins @ 2009-03-22 15:06 UTC (permalink / raw
To: gentoo-user
On Sun, 2009-03-22 at 13:53 +0100, Francesco Talamona wrote:
> > You mean the 1 extra command that's needed to assemble a VG?
>
> It wasn't that easy, that's what I did in the end:
> 1) vgchange -a n
> 2) vgexport -a
> 3) vgimport -a
> 4) vgscan --mknodes
> 5) vgchange -a y
#5 is all I've ever had to do. The first 3 look pointless to me. #5
takes care of #4 for you.
> Maybe 4) and 5) alone would do the trick... I don't remember which
> livecd I used then, except for the fact that I had to reboot
> with "dolvm2" option; now I have a tested "first aid kit" with notes
> on
> paper (all my notes were on those discs at the time) with well known
> and proven liveCDs.
I've never had to dolvm2 either. I'm guessing that's a Gentoo live cd
thing. I rarely use the Gentoo live cds because they always seem out of
date (although I understand they build daily snapshots now).
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [gentoo-user] extending /usr partition...
2009-03-22 8:42 ` [gentoo-user] " Alan McKinnon
@ 2009-03-23 12:44 ` BRM
0 siblings, 0 replies; 25+ messages in thread
From: BRM @ 2009-03-23 12:44 UTC (permalink / raw
To: gentoo-user
I never said LVM would do data recovery or provide Data Integrity - thats the job of the soft-RAID - though even that won't prevent PEBKAC errors (e.g. delete file).
And LVM adds more than a 'little' complexity.
If I had just lost the drive, I would have known exactly what I had lost as I would have known exactly what partitions were lost and what they mapped to by simply looking at /etc/fstab.
However, with LVM, I had to deconstruct the VG to figure out what partitions were lost and see if any remaining partitions were only partially there - and do it all by hand at that. That's more than a slight inconvenience, and takes a lot more time.
I'm not blaming LVM for a "user error". I am, however, pointing out a weakness of using VGs.
Ben
----- Original Message ----
From: Alan McKinnon <alan.mckinnon@gmail.com>
To: gentoo-user@lists.gentoo.org
Sent: Sunday, March 22, 2009 4:42:12 AM
Subject: Re: [gentoo-user] extending /usr partition...
On Saturday 21 March 2009 23:13:49 BRM wrote:
> So, unless you are looking to use LVM in a soft-RAID solution between
> multiple physical drives, not multiple partitions on the same drive, (e.g.
> partition A = sda1 + sda2, with mirror on sdb1+sdb2), then I would not
> suggest it as should anything happen, it'll make data recovery that much
> harder.
LVM does not and should not provide data integrity features.
You lost a drive. The data on it goes away. What did you expect would happen?
That the data on it would magically reconstruct itself?
In a situation like that, losing a drive with LVM is only slightly more
inconvenient (one or two more steps) than losing the same drive without LVM
(which is horribly inconvenient by itself).
Please don't blame LVM for what is actually a user error.
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2009-03-23 12:44 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-21 18:05 [gentoo-user] extending /usr partition Jarry
2009-03-21 18:12 ` Alan McKinnon
2009-03-21 18:20 ` Dirk Heinrichs
2009-03-21 18:39 ` Jarry
2009-03-21 18:53 ` Alan McKinnon
2009-03-21 19:37 ` Daniel Troeder
2009-03-21 20:57 ` Neil Bothwick
2009-03-21 21:13 ` BRM
2009-03-21 23:39 ` Neil Bothwick
2009-03-22 2:46 ` Albert Hopkins
2009-03-22 6:36 ` [gentoo-user] " Francesco Talamona
2009-03-22 7:16 ` Philip Webb
2009-03-22 8:44 ` Alan McKinnon
2009-03-22 11:12 ` Albert Hopkins
2009-03-22 12:53 ` Francesco Talamona
2009-03-22 15:06 ` Albert Hopkins
2009-03-22 8:42 ` [gentoo-user] " Alan McKinnon
2009-03-23 12:44 ` BRM
2009-03-22 9:32 ` Dirk Heinrichs
2009-03-22 10:59 ` Jarry
2009-03-22 11:45 ` Alan McKinnon
2009-03-22 10:37 ` Dirk Heinrichs
2009-03-22 6:39 ` [gentoo-user] " Francesco Talamona
2009-03-22 8:32 ` Alan McKinnon
2009-03-21 18:16 ` [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