Messages in this thread | | | Date | Thu, 25 Jun 1998 16:47:15 -0500 (CDT) | From | Shawn Leas <> | Subject | Everyone needs a Tutorial on LVM (to dispell some myths) |
| |
On Thu, 25 Jun 1998, Chris Siebenmann wrote:
> A number of desired LVM operations would change the filesystem block > numbering in the *middle* of a filesystem, and so require filesystem > cooperation to carry off. For example, consider replacing a disk in > the middle of a filesystem with a larger disk and wanting to use all > of the larger disk.
You are not familiar enough with LVM. You simply could not do it the way you want to. If you could, it would break the whole idea of abstraction that LVM has fundamentally. You cannot have an FS that "stretches" itself to fit a weird volume that grows and shrinks in any damn way it wants to. (No, you can't do it with Veritas's VXFS and their LVM, either.) It is, well, unreasonable. Good system management requires that you at least resign yourself to *some* sort of logical restrictions... In the case of a Logical Volume Manager, you MUST restrict the movements of an LV so that it is painless for an FS. This is the idea of the whole concept, and it's NOT a tradeoff.
Let's say you have a VG (Volume Group) with three disks, 2 gig each in a RAID0 configuration. If you wanted to remove the middle disk and replace it with a 3 gig disk, I *think* you could only *move* that PV (physical volume) to a similar PV. (Maybe a 2 gig partition on that disk.) Then, you would create a 1 gig PV out of what's left, and extend the LV with the new 1 gig PV. _______________________________________________________________________ | _____________________________VG01__________________________________ | | | ___________________________LV01_______________________________ | | | | | | | | | | | | | | DISK1 PV1 | NEW DISK PV1 | DISK3 PV1 | NEW DISK | | | | | | | | | PV2 | | | | | --------------------------------------------------------------- | | | ------------------------------------------------------------------- | | __________________ | | | DISK2 PV1 | | | | *removed* | | | ------------------ | -----------------------------------------------------------------------
In this case, the FS is still the same size, and thinks that the LV is exactly the same LV as it was before, even though it is now 1 gig larger. It won't know about the other 1 gig PV until you entend it.
When you "moved" the PV (the old 2 gig disk) to the new PV (the 2 gig partition on the 3 gig disk), it did these things...
1) mirrored the old one. 2) simply used the mirror copy, and threw away the old one. 3) you're done!
You may now do an extendfs on the ext3fs... That is, if you didn't just want to do a dump and restore and make the LV right in the first place, with contiguous physical extents.
Giving the LVM the functionality you claim it has breaks the abstraction it has fundamentally, and the functionality is not desired by me, at least.
-Shawn
> --- > "I shall clasp my hands together and bow to the corners of the world." > Number Ten Ox, "Bridge of Birds" > cks@utcc.toronto.edu utgpu!cks >
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |