* [linux-lvm] Sanity check: newbie wants strange LVM configuration
@ 2001-01-02 19:24 Chris Worley
0 siblings, 0 replies; 6+ messages in thread
From: Chris Worley @ 2001-01-02 19:24 UTC (permalink / raw)
To: linux-lvm
I've got two disk drives, 12 & 16 GB IDE. I'm adding a third 40GB
drive. Time to start using LVM...
I want to get better performance, so, I'll put the 40GB drive on one
IDE controller, the other two drives on the second controller. I'll
make two partitions on the 40GB drive that match the disk sizes of the
existing drives, and stripe each with it's match on the 40GB drive,
creating two raid0 arrays (one 12+12, and the other 16+16). By
placing the dual-partitioned 40GB drive stand-alone on one IDE
controller, each striped with a partition/drive on the other
controller, any given file will only be striped across one partition
on each controller, so I should see the performance benefit of
striping (on IDE).
Should I use LVM or MD to do the striping (they both can do it, I was
just wondering which would be a better choice)?
Even if I use MD to stripe, I'd use LVM to append the two drives together.
Before appending the drives, I'd make a temporary partition on the
40GB drive, and copy the current contents of the 16GB (/home) drive to
the temporary partition. Then, I'd make the 16+16 raid0 a logical
volume, create a reiserfs on it, and copy the information back from
the temporary partition, to the new reiserfs.
Since the 12GB drive is the current root partition, it's a bit
trickier to copy. I'd copy it's contents to a temporary partition on
the 40GB drive, boot from that temporary partition, then create the
second 12+12 raid0, and add it to the first logical volume, then
expand the reiserfs to cover both, copy the root file system from the
temporary partition to the new logical volume, and setup a reiserfs
root and boot.
Is this the correct approach for upgrading?
Finally, I'll have ~10GB unallocated on the 40GB drive. I was
thinking of adding this to the end of the current logical volume (and,
again, expand the reiserfs to cover the additional space).
Since any file system looses performance when more than 90% full, this
final non-striped partition would be in a position where performance
would degrade anyway, and keep the raid0's in a position for full
performance.
Is that correct?
Sort of off-topic (not LVM related)...
I've got an IDE CDROM drive that I want to put on the same controller
as the 40GB drive. I've been told that new UDMA drives do not have
the PIO performance hit associated with CDROM drives, so I should be
able to get full performance from my 40GB drive, even with a CDROM on
the same IDE controller.
Is that correct (or should I junk the IDE CDROM)?
Thanks,
Chris
^ permalink raw reply [flat|nested] 6+ messages in thread
* [linux-lvm] Sanity check: newbie wants strange LVM configuration
@ 2001-01-03 5:22 Chris Worley
2001-01-03 9:33 ` Joe Thornber
0 siblings, 1 reply; 6+ messages in thread
From: Chris Worley @ 2001-01-03 5:22 UTC (permalink / raw)
To: linux-lvm
I've got two disk drives, 12 & 16 GB IDE. I'm adding a third 40GB
drive. Time to start using LVM...
I want to get better performance, so, I'll put the 40GB drive on one
IDE controller, the other two drives on the second controller. I'll
make two partitions on the 40GB drive that match the disk sizes of the
existing drives, and stripe each with it's match on the 40GB drive,
creating two raid0 arrays (one 12+12, and the other 16+16). By
placing the dual-partitioned 40GB drive stand-alone on one IDE
controller, each striped with a partition/drive on the other
controller, any given file will only be striped across one partition
on each controller, so I should see the performance benefit of
striping (on IDE).
Should I use LVM or MD to do the striping (they both can do it, I was
just wondering which would be a better choice)?
Even if I use MD to stripe, I'd use LVM to append the two drives
together.
Before appending the drives, I'd make a temporary partition on the
40GB drive, and copy the current contents of the 16GB (/home) drive to
the temporary partition. Then, I'd make the 16+16 raid0 a logical
volume, create a reiserfs on it, and copy the information back from
the temporary partition, to the new reiserfs.
Since the 12GB drive is the current root partition, it's a bit
trickier to copy. I'd copy it's contents to a temporary partition on
the 40GB drive, boot from that temporary partition, then create the
second 12+12 raid0, and add it to the first logical volume, then
expand the reiserfs to cover both, copy the root file system from the
temporary partition to the new logical volume, and setup a reiserfs
root and boot.
Is this the correct approach for upgrading?
Finally, I'll have ~10GB unallocated on the 40GB drive. I was
thinking of adding this to the end of the current logical volume (and,
again, expand the reiserfs to cover the additional space).
Since any file system looses performance when more than 90% full, this
final non-striped partition would be in a position where performance
would degrade anyway, and keep the raid0's in a position for full
performance.
Is that correct?
Sort of off-topic (not LVM related)...
I've got an IDE CDROM drive that I want to put on the same controller
as the 40GB drive. I've been told that new UDMA drives do not have
the PIO performance hit associated with CDROM drives, so I should be
able to get full performance from my 40GB drive, even with a CDROM on
the same IDE controller.
Is that correct (or should I junk the IDE CDROM)?
Thanks,
Chris
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] Sanity check: newbie wants strange LVM configuration
2001-01-03 5:22 [linux-lvm] Sanity check: newbie wants strange LVM configuration Chris Worley
@ 2001-01-03 9:33 ` Joe Thornber
2001-01-03 16:40 ` Chris Worley
0 siblings, 1 reply; 6+ messages in thread
From: Joe Thornber @ 2001-01-03 9:33 UTC (permalink / raw)
To: linux-lvm
Chris,
First of all wait and see what other people say in response to this
message, I haven't had as much practical experience with LVM as others
and they may think of simpler ways of doing it. Also I've just
realised I haven't addressed the fact that your root filesystem is on
the 12G drive, the FAQ for this is at
http://www.the-infinite.org/archive/docs/lvm/howto-boot-off-root-lv.txt,
again I'm sure other people can help.
I would use LVM to do the striping, you don't need MD unless you want
redundancy (raid-0 will not give you redundancy).
Check the relative speeds/throughput of the drives, I bought a 30 IBM
drive recently and it was *so* much faster than the old 6G drive, I
think things would slow down if I striped.
I don't think you need to partition the 40G drive at all (except for
the small /boot partition):
1) Turn the whole of 40G into a PV.
2) create a volume group.
3) create a logical volume big enough for your 12G drive
4) copy filesystem across from 12 to new logical volume
5) check you copied it OK
6) turn the 12G drive into a PV
7) extend the volume group with the new PV
8) create a striped logical volume big enough to hold the 12G
9) copy the linear logical volume into the striped volume
10) check you copied it OK
11) remove the linear logical volume
OK so you should now have (40 - 6)G free on the big disk, and (12 -6)G
free on the smallest disk.
12) create a linear logical volume for the 16G drive
13) copy data from 16G
14) check you copied
15) turn 16G drive into a PV
17) extend VG with new PV
16) create a 16G striped LV
17) copy from the linear 16G into the striped 16G
18) check copy
19) remove linear 16G
You now have a striped LV 12G, a striped LV 16G + lots of left over
extents that can be added when needed.
- Joe
On Tue, Jan 02, 2001 at 10:22:34PM -0700, Chris Worley wrote:
> I've got two disk drives, 12 & 16 GB IDE. I'm adding a third 40GB
> drive. Time to start using LVM...
>
> I want to get better performance, so, I'll put the 40GB drive on one
> IDE controller, the other two drives on the second controller. I'll
> make two partitions on the 40GB drive that match the disk sizes of the
> existing drives, and stripe each with it's match on the 40GB drive,
> creating two raid0 arrays (one 12+12, and the other 16+16). By
> placing the dual-partitioned 40GB drive stand-alone on one IDE
> controller, each striped with a partition/drive on the other
> controller, any given file will only be striped across one partition
> on each controller, so I should see the performance benefit of
> striping (on IDE).
>
> Should I use LVM or MD to do the striping (they both can do it, I was
> just wondering which would be a better choice)?
>
> Even if I use MD to stripe, I'd use LVM to append the two drives
> together.
>
> Before appending the drives, I'd make a temporary partition on the
> 40GB drive, and copy the current contents of the 16GB (/home) drive to
> the temporary partition. Then, I'd make the 16+16 raid0 a logical
> volume, create a reiserfs on it, and copy the information back from
> the temporary partition, to the new reiserfs.
>
> Since the 12GB drive is the current root partition, it's a bit
> trickier to copy. I'd copy it's contents to a temporary partition on
> the 40GB drive, boot from that temporary partition, then create the
> second 12+12 raid0, and add it to the first logical volume, then
> expand the reiserfs to cover both, copy the root file system from the
> temporary partition to the new logical volume, and setup a reiserfs
> root and boot.
>
> Is this the correct approach for upgrading?
>
> Finally, I'll have ~10GB unallocated on the 40GB drive. I was
> thinking of adding this to the end of the current logical volume (and,
> again, expand the reiserfs to cover the additional space).
>
> Since any file system looses performance when more than 90% full, this
> final non-striped partition would be in a position where performance
> would degrade anyway, and keep the raid0's in a position for full
> performance.
>
> Is that correct?
>
> Sort of off-topic (not LVM related)...
>
> I've got an IDE CDROM drive that I want to put on the same controller
> as the 40GB drive. I've been told that new UDMA drives do not have
> the PIO performance hit associated with CDROM drives, so I should be
> able to get full performance from my 40GB drive, even with a CDROM on
> the same IDE controller.
>
> Is that correct (or should I junk the IDE CDROM)?
>
> Thanks,
>
> Chris
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] Sanity check: newbie wants strange LVM configuration
2001-01-03 9:33 ` Joe Thornber
@ 2001-01-03 16:40 ` Chris Worley
[not found] ` <20010103183937.A2027@66bassett.freeserve.co.uk>
0 siblings, 1 reply; 6+ messages in thread
From: Chris Worley @ 2001-01-03 16:40 UTC (permalink / raw)
To: linux-lvm; +Cc: joe
Joe,
Good plan, but I have some questions...
Joe Thornber wrote:
> 6) turn the 12G drive into a PV
> 7) extend the volume group with the new PV
> 8) create a striped logical volume big enough to hold the 12G
And LVM knows automagically to grab 12GB from the 40GB drive to stripe
together into a 24GB drive?
> OK so you should now have (40 - 6)G free on the big disk, and (12 -6)G
> free on the smallest disk.
Why don't I have 40-12 and 12-12 (nothing free on the smaller disk)
resulting in a 24G raid0?
Also, I think it would be better to do the 16G first, then the 12G.
Is there any reason why you did the 12G first, or is this interchangeable?
> 16) create a 16G striped LV
Shouldn't this be a 32G striped LV (16G from the 16G drive, another
16G from the 40G drive)?
> You now have a striped LV 12G, a striped LV 16G + lots of left over
> extents that can be added when needed.
Wouldn't that be a 24G striped LV and a 32G striped LV that I can
append together into a 56G LV (and lots of non-striped extents that I
can add to the end of that)?
Thanks for your help,
Chris
> On Tue, Jan 02, 2001 at 10:22:34PM -0700, Chris Worley wrote:
>
>> I've got two disk drives, 12 & 16 GB IDE. I'm adding a third 40GB
>> drive. Time to start using LVM...
>>
>> I want to get better performance, so, I'll put the 40GB drive on one
>> IDE controller, the other two drives on the second controller. I'll
>> make two partitions on the 40GB drive that match the disk sizes of the
>> existing drives, and stripe each with it's match on the 40GB drive,
>> creating two raid0 arrays (one 12+12, and the other 16+16). By
>> placing the dual-partitioned 40GB drive stand-alone on one IDE
>> controller, each striped with a partition/drive on the other
>> controller, any given file will only be striped across one partition
>> on each controller, so I should see the performance benefit of
>> striping (on IDE).
>>
>> Should I use LVM or MD to do the striping (they both can do it, I was
>> just wondering which would be a better choice)?
>>
>> Even if I use MD to stripe, I'd use LVM to append the two drives
>> together.
>>
>> Before appending the drives, I'd make a temporary partition on the
>> 40GB drive, and copy the current contents of the 16GB (/home) drive to
>> the temporary partition. Then, I'd make the 16+16 raid0 a logical
>> volume, create a reiserfs on it, and copy the information back from
>> the temporary partition, to the new reiserfs.
>>
>> Since the 12GB drive is the current root partition, it's a bit
>> trickier to copy. I'd copy it's contents to a temporary partition on
>> the 40GB drive, boot from that temporary partition, then create the
>> second 12+12 raid0, and add it to the first logical volume, then
>> expand the reiserfs to cover both, copy the root file system from the
>> temporary partition to the new logical volume, and setup a reiserfs
>> root and boot.
>>
>> Is this the correct approach for upgrading?
>>
>> Finally, I'll have ~10GB unallocated on the 40GB drive. I was
>> thinking of adding this to the end of the current logical volume (and,
>> again, expand the reiserfs to cover the additional space).
>>
>> Since any file system looses performance when more than 90% full, this
>> final non-striped partition would be in a position where performance
>> would degrade anyway, and keep the raid0's in a position for full
>> performance.
>>
>> Is that correct?
>>
>> Sort of off-topic (not LVM related)...
>>
>> I've got an IDE CDROM drive that I want to put on the same controller
>> as the 40GB drive. I've been told that new UDMA drives do not have
>> the PIO performance hit associated with CDROM drives, so I should be
>> able to get full performance from my 40GB drive, even with a CDROM on
>> the same IDE controller.
>>
>> Is that correct (or should I junk the IDE CDROM)?
>>
>> Thanks,
>>
>> Chris
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] Sanity check: newbie wants strange LVM configuration
[not found] ` <20010104094004.A386@66bassett.freeserve.co.uk>
@ 2001-01-09 16:31 ` Chris Worley
2001-01-10 22:26 ` Luca Berra
0 siblings, 1 reply; 6+ messages in thread
From: Chris Worley @ 2001-01-09 16:31 UTC (permalink / raw)
To: Joe Thornber, lvm
Joe,
"2 Day air" took a week to deliver... but I have my 40GB HD and have
started the crossover.
The first thing I missed was that fdisk only sees up to 64K cylinders
(and this disk has 77K), so it said I only had 12K... and it wasn't
until I created the first lv that I realized the problem. I was able
to back-out the LV with lvreduce. vgreduce was not as kind: it
wouldn't let me remove the last PV from the VG. So, I repartitioned
using cfdisk (which could see more than 64K cylinders), and every
lv/vg command from that point on would say that the configuration file
and the kernel representation were out of sync, and to run vgscan to
get them to jibe. But, vgscan wouldn't correct the problem: I had to
reboot. I still can't create a new VG with the same name as that
first one I created (so I created one with a different name). Is
deleting the VG as simple as just deleting the device file with the
name of the VG?
Anyway, I made my first temporary 12GB Reiserfs from an LV, and have
copied the data from my system drive (this is the first step in
converting the current system over to LVM: copy the system drive to a
temporary LV... next, I'll boot from the temporary LV and make the old
system drive part of the LV, copy the data back, and boot from the new
LV).
I used bonnie++ to test the different disk's speed: they're all about
the same: 1.6MB/sec character I/O, 5MB/sec block I/O (the file I/O was
significantly faster with the new disk running the reiserfs -- I
figured this was the reiserfs and not the disk). I thought hanging
the new disk on the same controller as the cdrom would effect it,
since my IDE controller doesn't do UDMA. No effect. I bought the
cheapest disks, they're as expected: slow. Time for software to speed
them up.
Now that I've got the system backed up, and am ready to try booting
from the lv (as per the booting from lv root instructions), I do have
another question: the lv, which is basically on hdc3, is about to move
to hda3 (the new bootable partition is on this 40GB drive). "pvmove"
doesn't seem to be the right way to do this, since I don't want to
copy data from one disk to another. Will vgscan automagically figure
out the cabling change at boot?
Joe Thornber wrote:
> ...
> LVM is a bit more flexible in it's striping than MD. You will create
> physical volumes, each physical volume will be split into physical
> extents (4M by default), it's only when you come to create a logical
> volume that you tell it whether you want to stripe or not. At this
> point the extent allocator trys to allocate extents from different
> PV's. So there is no need to create a 24G striped volume for only 12G
> of data.
So, in the end I'll have 3 PV's (40GB, 16GB, and 12GB) in a 2-way
striped LV. Does lvm automagically know to stripe the 12GB and 16GB
with the 40GB, and not with each other (I'll be cabling my IDE
controllers for this configuration)? With MD, I'd specify which disks
are striped together, in lvm, I don't see a way to do this.
Furthermore, I want the last 12GB of the 40GB drive (that has no
matching disk to be striped with) to be linearly appended to the end
of the resulting lv. MD's can be made of other MD's -- so I could
specify two raid0's (comprised of: the 12GB drive + 12GB from the 40GB
drive and: the 16GB drive + 16GB from the 40GB drive) then linearly
append them together in a third MD with the leftover 12GB (unstriped)
from the 40GB drive at the end.
But, VG's can't be comprised of other VG's -- and LV's are either
striped or not.
How does LVM accomplish this same task? What am I not understanding
about LVM?
>
> Let me know how you get on, writing a decent HOWTO is on my todo list so
> these sort of problems are useful to me.
You wanted the strange questions. I got 'em ;)
Chris
P.S. I'm having a hard time sending email from this address to the LVM
list server... I'm on the mailing list from another address, and when
I send from this address I get a reply that the admin will review my
email before posting, but it never happens. Feel free to post your
reply (and copy my stuff) to the list server. I don't mean for this
to be a private post, but I don't want to subscribe to the list for
every email address I use.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] Sanity check: newbie wants strange LVM configuration
2001-01-09 16:31 ` Chris Worley
@ 2001-01-10 22:26 ` Luca Berra
0 siblings, 0 replies; 6+ messages in thread
From: Luca Berra @ 2001-01-10 22:26 UTC (permalink / raw)
To: lvm
On Tue, Jan 09, 2001 at 09:31:14AM -0700, Chris Worley wrote:
> until I created the first lv that I realized the problem. I was able
> to back-out the LV with lvreduce. vgreduce was not as kind: it
> wouldn't let me remove the last PV from the VG. So, I repartitioned
you must use vgremove for that.
> Anyway, I made my first temporary 12GB Reiserfs from an LV, and have
> copied the data from my system drive (this is the first step in
> converting the current system over to LVM: copy the system drive to a
> temporary LV... next, I'll boot from the temporary LV and make the old
> system drive part of the LV, copy the data back, and boot from the new
> LV).
Aargh, be careful with LVM terminology, it is tricky :)
> copy data from one disk to another. Will vgscan automagically figure
> out the cabling change at boot?
yes
> How does LVM accomplish this same task? What am I not understanding
> about LVM?
i believe you have to learn a lot about lvm, please forget all you
know about md, they don't have anithing in common.
now
A PV means physical volume (i.e. a single disk). with linux lvm
it can also be a partition.
The act of creating a PV means writing a header on the disk.
You can create a VG (volume group) which is a collection of PV, you can
have as many PV as you wish in a single VG, but a single PV cannot be part
of more than one VG.
When you create a VG each PV is divided in small (4M default) chunks we call PE
(physical extents), all PE in a PV are numbered starting from 0.
At this point just forget for a while about disks, a VG is to you just
a collection of PE.
You can group some of those PE in something that is called an LV (logical
volume)
An LV is a collection of LE (logical extents), an LE is just a PE, but they
are numbered in the order that they are added to the LV.
let's say for example that you have 4 PV with 1078 PE each
you create VG named vgFOO from these
then you create a 10GB LV from vgFOO
the LV would be structured this way
LE PV PE
0 0 0
.... .... ....
1077 0 1077
.... .... ....
1078 1 0
.... .... ....
2155 1 1078
.... .... ....
2156 2 0
.... .... ....
2559 2 403
LV do not need to be built of contigous, ordered or in any way related PE.
you can extend, reduce an LV or even move some LE from a PV to another.
Now striping, (i hate it, it is illogical, it has nothing to do with the well ordered structure described above).
when you stripe an LV you tell it on how many different PV you would like
to stripe and how big each stripe is.
striping acts as follow.
1 take the first free PE from the first free PV,
2 take the first free PE from the next free PV,
3 stripe data btw those two pe
4 reiterate from 1 until you cannot find a pair of PE from different PVs.
you can make it do tricks based on which order you pick PE from PVs to
create your LV
Regards,
L.
--
Luca Berra -- bluca@comedia.it
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-01-10 22:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-03 5:22 [linux-lvm] Sanity check: newbie wants strange LVM configuration Chris Worley
2001-01-03 9:33 ` Joe Thornber
2001-01-03 16:40 ` Chris Worley
[not found] ` <20010103183937.A2027@66bassett.freeserve.co.uk>
[not found] ` <3A537FB6.4090408@liberate.com>
[not found] ` <20010104094004.A386@66bassett.freeserve.co.uk>
2001-01-09 16:31 ` Chris Worley
2001-01-10 22:26 ` Luca Berra
-- strict thread matches above, loose matches on Subject: below --
2001-01-02 19:24 Chris Worley
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.