Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #190620

Re: How to relocate LVM pv to make room for grub install

From Pascal Hambourg <pascal@plouf.fr.eu.org>
Newsgroups linux.debian.user
Subject Re: How to relocate LVM pv to make room for grub install
Date 2018-01-03 20:40 +0100
Message-ID <v3X3k-34l-1@gated-at.bofh.it> (permalink)
References <v3zkm-4ir-27@gated-at.bofh.it> <v3MAV-4Cz-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Le 03/01/2018 à 09:10, Tom Dial a écrit :
> On 01/02/2018 11:14 AM, Pascal Hambourg wrote:
>>
>> This is one of the many possible plans.
> 
> But it is uncomplicated and simple to execute using available or easily
> obtained tools. The total outage time was around 2 hours and, as pointed
> out below, could have been much less if I had moved only the partitions
> on the current boot disk.

IMO, moving partitions is complicated, tedious, and dangerous. I avoid 
doing it as much as possible.
Complicated because it requires running Gparted, in a graphic 
environment, without the partition being in use.
Tedious because it requires moving (=reading and writing) each data 
block around, which can take a long time with big partitions.
Dangerous because if anything interrupts the process before completion 
(system crash, power loss, or maybe even read/write error), the 
partition and its contents is lost.

This is why I suggested alternatives.

> Overall, it went fairly well, and in particular, there were no boot
> issues or data corruption. The only issue is that the first partition on
> the boot drive was resized, but the PV it contains apparently was not,
> so now is larger than the partition.

This is not good. The partition should not have been reduced. If it had 
happened to a plain ext4 partition without reducing the filesystem 
first, the kernel would refust to mount it.
You can try to resize the PV with pvresize, in hope that the missing 
extents were not allocated to any LV.

> I suspect this happened because the
> PV was fully allocated to LVs. It has not caused any apparent problems,
> probably because the file systems on the LVs are not very full. I will
> need to fix it, though.

If the PV was fully allocated, then I'm afraid you experience trouble 
sooner or later. You can check with pvdisplay.

Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

How to relocate LVM pv to make room for grub install Tom Dial <tddial@comcast.net> - 2018-01-01 07:10 +0100
  Re: How to relocate LVM pv to make room for grub install Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-01-01 10:50 +0100
    Re: How to relocate LVM pv to make room for grub install Tom Dial <tddial@comcast.net> - 2018-01-02 01:20 +0100
      Re: How to relocate LVM pv to make room for grub install Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-01-02 19:20 +0100
        Re: How to relocate LVM pv to make room for grub install Tom Dial <tddial@comcast.net> - 2018-01-03 09:30 +0100
          Re: How to relocate LVM pv to make room for grub install Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-01-03 20:40 +0100

csiph-web