-   Linux - General (
-   -   A question about deleting partitions - LVM related (

Jongi 01-11-2007 02:55 AM

A question about deleting partitions - LVM related
I have one drive partitioned like this


  Device Boot      Start        End      Blocks  Id  System
/dev/sda1              1      30401  244196001    5  Extended
/dev/sda5  *          1        2611    20972794+  83  Linux
/dev/sda6            2612        5222    20972826  83  Linux
/dev/sda7            5223        7180    15727603+  83  Linux
/dev/sda8            7181        9138    15727603+  83  Linux
/dev/sda9            9139      11096    15727603+  83  Linux
/dev/sda10          11097      13054    15727603+  83  Linux
/dev/sda11          13055      16971    31463271    7  HPFS/NTFS
/dev/sda12          16972      22192    41937651  8e  Linux LVM
/dev/sda13          22193      26108    31455238+  8e  Linux LVM
/dev/sda14          26109      30401    34483491  8e  Linux LVM

I was quite ambitious at the time about how many distros I would load. I now want to basically kill partitions sda6 to sda11 and repartition that space differently. Instead of the 6 partitions I will have fewer.

My concern is that this will change the partition numbers of the partitions currently 12, 13 and 14. As can be seen these currently form part of LVM partitions. If the partition numbers change eg sda12 to sda10, my concern is whether LVM will adjust accordingly? Or is there a command I will have to run once I have re-partitioned? The LVM partitions are all reiserfs.

syg00 01-11-2007 08:32 PM

Mmmm - not a LVM user, but I think a vgscan will accomodate this.
I assume all LVM systems do this at startup.

Jongi 01-12-2007 01:03 AM

syg00: I'll have a read up on vgscan. I like your signature.

Jongi 01-12-2007 01:52 AM

It seems I should be safe according to this:


4.1.10. How resilient is LVM to a sudden renumbering of physical hard disks?

It's fine - LVM identifies PVs by UUID, not by device name.

Each disk (PV) is labeled with a UUID, which uniquely identifies it to the system. 'vgscan' identifies this after a new disk is added that changes your drive numbering. Most distros run vgscan in the lvm startup scripts to cope with this on reboot after a hardware addition. If you're doing a hot-add, you'll have to run this by hand I think. On the other hand, if your vg is activated and being used, the renumbering should not affect it at all. It's only the activation that needs the identifier, and the worst case scenario is that the activation will fail without a vgscan with a complaint about a missing PV.


The failure or removal of a drive that LVM is currently using will cause problems with current use and future activations of the VG that was using it.

ss12345_6 03-30-2007 04:10 AM

hi Jongi i think you bring out a very good question. when i saw it ,i couldn't figure out how the sqeuence will be, so i decided to try it in my virtual machine ,under the same situation with u then i delete a partion before all the lvm partion,after that ,and then reboot my computer ,but didn't catch any problems.
i've checked it for about half an hour.i think u just need to concern about that your /etc/fstab ,it maybe cause some problems and it must be a troubeshrooting work. by the way ,my distribution is redhat el4.

ss12345_6 03-30-2007 04:16 AM

my msn: I am a linux-beginner and linux-lover so i want to make friends here who have the same interest in linux and we can exchange our options . be pleasure !

Jongi 04-16-2007 03:45 AM

ss12345_6: The only problem with fstab would be if there were non-LVM partitions that I wasn't going to delete that would need to be mounted. Their referencing would most certainly change. If using a program like gparted you would be able to see that a partition reference had changed and be able to fix fstab and menu.lst (should it be a partition with another OS it).

All times are GMT -5. The time now is 08:17 AM.