[linux-lvm] How exactly does LVM's get written?
Kevin_Richard at bellsouth.net
Fri Nov 5 23:45:17 UTC 2004
That's basically what I gathered from what I had been reading also... is
there any way to "defrag" so to speak the data, so say I end up deleting
data from 300mb of PE's on disk1 then when I write 600mb or data, I don't
want 300mb to go to disk1 and 300mb to disk2 cause after any bit of time has
passed on a fairly used system it will no longer really be linear at all! I
guess I'm asking a lot for this system :(
Cheap is a relative term ;) I just got the two 80gigs and only because
there was a $60 rebate on each of them from Bestbuy so I got to fudge one of
my rebate forms to be sent to someone else to get my $120 for both drives ;)
----- Original Message -----
From: "Clint Byrum" <cbyrum at spamaps.org>
To: "LVM general discussion and development" <linux-lvm at redhat.com>
Sent: Friday, November 05, 2004 5:37 PM
Subject: Re: [linux-lvm] How exactly does LVM's get written?
> On Fri, 2004-11-05 at 17:16 -0600, Kevin Richard wrote:
> > I have searched many topics in archive and even randomly scanned for any
> > info related to this but have only come away with a "I think it works
> > way" feeling.
> > I set up two 80gig drives as one 160gig VG /dev/VG1/LV1 I then
> > to copy about 93 gigs of data from a 100gig drive that I will hopefully
> > to the LV to make it 260gigs.
> > My questions are:
> > 1. Is this a "spill over" type of write method where it will fill up
> > (first 80gig) and then move to hdf1 (other 80gig) and then of coarse on
> > hdg1 (100gig)? Which would allow me the convenience of having one HUGE
> > mount and thus not having to constantly monitor and move data to 3
> > drives as space is needed. Yet it keeps the data somewhat separated
> > for the "spill over" that might get wrote to two drives at some point)
> > I lose a hard drive I only lose what is on that drive and can just
> > the drive and recreate the VG and salvage all the data on the other two
> > drives. Is this a correct assumption? I am trying to avoid the
> > a Raid 0 type of system where if you lose one drive you have lost all 3
> > drives!
> I'm no LVM expert, but I see this question a lot. I think its because of
> a misunderstanding of the seperation of filesystem from block device.
> Each volume group has a number of physical volumes in it. When you add a
> logical volume, the PE's in each PV are allocated in a pretty much
> linear fashion, unless you specify striping. So if you allocate 90G from
> your original 160G VG, you'll get 80G on the first disk, and then 10G
> from the second. The idea behind LVM is that you don't care which drives
> the PE's come from, they're just there and available with your data on
> > 2. Is there any way to tell what PE's contain what data? or to see how
> > volumes are filling up? This would essentially allow me to answer my
> > first question and also verify that it is doing as I want it to do. To
> > clarify, I would be able to tell that Datafile.X which is a 1gig file is
> > written to PE's stored on hde1 or hde1 AND hdf1.
> My first inclination would be "no". LVM thinks the PE's are "filled"
> when they're allocated. It doesn't really care what is writing to each
> PE, and whether or not its data, journal, new filesystem, etc.
> This is why I personally think its a really bad idea to use LVM without
> some sort of disk redundancy. Even if "I can lose the data and it won't
> matter", how much is your time worth? They're so darn cheap now... just
> use RAID5 and you'll be much happier.
> Clint Byrum <cbyrum at spamaps.org>
> linux-lvm mailing list
> linux-lvm at redhat.com
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
More information about the linux-lvm