Closing --for deletion.
# edit: reopened upon appeal: OP will edit the first post to clarify their question...
]]>Also I seem to recall that srs5694 gave you a pretty damn good answer that you apparently chose to ignore.
]]>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
Hi there
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,
Crispin