#edit: re-formulation of my question, original post below
I have a LVM setup with 5 physical volumes, each inside a logical partition. The logical partitions reside inside an extended partition that spans the whole disk. At the beginning of the extended partition, there's an unused logical partition.
I plan to remove the extended partition, create a primary partition inside the space that was previously occupied by the empty logical partition and an extended partition inside the remaining space. I will recreate the 5 logical partitions containing the physical volumes at exactly the same places.
After this step, the partitions housing the physical volumes will have decreased their numbers by one. For example /dev/sda5 will start at the place where /dev/sda6 used to be and so on.
My question is: Will LVM still work after this conversion or will it be confused by the changed partition numbers?
In other words: does LVM save the partition numbers somewhere and will therefore e.g.:
look for a PV inside sda10, which will no longer exist at this point of time or
ignore the first PV inside sda5 because sda6 was the first PV earlier?
This is no duplicate of https://bbs.archlinux.org/viewtopic.php?id=159542. The former thread treated the question whether the partition table conversion itself can be achieved without data loss. This thread is about whether LVM will be able to cope with it.
I hope that I now managed to pose my question unambiguous and want to apologize to everybody who felt I wasted their time. That was not my intention. Additionally, I want to plea for your patience, I'm not around here every day so the absence of an answer for some time does not mean I'm ignoring you but instead that I haven't read yours yet. I did wrong, I'm sorry, will you pardon me?
P.S.: LVM works on my machine without setting the partition type to 8e (Linux LVM)
# original post
I have one extended partition spanning the whole disk. It is subdivided in multiple logical partitions.
Disposit. Inicio Comienzo Fin Bloques Id Sistema /dev/sda1 2048 976773167 488385560 5 Extendida /dev/sda5 4096 167776255 83886080 83 Linux /dev/sda6 167778304 335550463 83886080 83 Linux /dev/sda7 335552512 503324671 83886080 83 Linux /dev/sda8 503326720 671098879 83886080 83 Linux /dev/sda9 671100928 838873087 83886080 83 Linux /dev/sda10 838875136 976773167 68949016 83 Linux
Each one of these is a physical volume. I need a second primary partition, so I moved the PV on /dev/sda5.
PV VG Fmt Attr PSize PFree /dev/sda10 linux lvm2 a-- 65,75g 0 /dev/sda6 linux lvm2 a-- 80,00g 0 /dev/sda7 linux lvm2 a-- 80,00g 0 /dev/sda8 linux lvm2 a-- 80,00g 0 /dev/sda9 linux lvm2 a-- 80,00g 0
If I now rebuild the partition table like follows:
1. an empty primary partition at the beginning of the disk
2. the extended partition
3. the logical partitions with exactly the same starting points
Disposit. Inicio Comienzo Fin Bloques Id Sistema /dev/sda1 2048 167774208 83886080+ 83 Linux /dev/sda2 167776256 976773167 404498456 5 Extendida /dev/sda5 167778304 335550463 83886080 83 Linux /dev/sda6 335552512 503324671 83886080 83 Linux /dev/sda7 503326720 671098879 83886080 83 Linux /dev/sda8 671100928 838873087 83886080 83 Linux /dev/sda9 838875136 976773167 68949016 83 Linux
All that would have changed to before is the partition numbers. The former /dev/sda6 will be named /dev/sda5 and so on.
Will LVM work like before or is it affected by partition number changes? Or in other words: Does LVM store the partition numbers in its physical volume metadata?
Thanks in advance,
Last edited by crispin (2013-03-22 15:10:54)
You don't seem to be using LVM. You are referring to logical partitions contained within an extended partition in a MBR partition table, right? You might want to change your thread title if so and edit your post appropriately.
This is the third thread of yours that seems to keep including the same information with basically the same question over and over again. I would say that this constitutes cross posting.
Also I seem to recall that srs5694 gave you a pretty damn good answer that you apparently chose to ignore.
OP is not ignoring it. Just cross-posted everywhere and then didn't bother to mark additional threads as solved thus creating a bunch more work for the mods etc. I think we need a forum function allowing us to keep personal black lists so that if you go to answer a thread, it will flag up if you have previously wasted your time answering already solved threads for the same user due to cross-posting.
crispin, this sort of selfishness is not tolerated here. Please desist.
Closing --for deletion.
# edit: reopened upon appeal: OP will edit the first post to clarify their question...
After backing up my MBR and actually altering the partition table, I came to the conclusion that LVM is not affected by this change. Works like a charm.