Page 1 of 1

Resize LVM to Expands /boot

Posted: 2018/02/07 22:25:27
by weyderfs
HI,

SCENARIO

LVM: On /dev/sda1 > vg_group/root and other vg_group/swap
/dev/sda1 > /boot

I would like if possible reduce the LVM and use this space to increase on /boot? :?: :?:

Re: Resize LVM to Expands /boot

Posted: 2018/02/07 23:12:39
by TrevorH
Almost certainly impossible - by which I mean more trouble than it's worth if you are sufficiently technically capable to do it. But post the output from the commands

fdisk -lu /dev/sd[a-z]
pvs
vgs
lvs

All need to be run as root.

Re: Resize LVM to Expands /boot

Posted: 2018/02/08 02:43:25
by WhatsHisName
GParted-Live ( https://gparted.org/livecd.php ) "recently" became LVM2 aware ( https://gparted.org/features.php ).

If you are working with a non-mdraid installation, then it is worth a look.

GParted-Live can detect mdraids, but cannot manipulate them (yet).

Re: Resize LVM to Expands /boot

Posted: 2018/02/08 05:22:38
by hunter86_bg
You can make the following:
1.Add a new disk larger or equal of your systems one (same VG as the migrated LVs)
2.Move the data online via 'pvmove'
3.'pvremove /dev/sda2' (the one you have just migrated)
4.Remove /dev/sda2 and resize your /boot via fdisk and resize your file system.
5.The smaller now /dev/sda2 can be added to the system VG
6.IF your system LVs are small enough, you can pvmove back the data to /dev/sda2.

As you can see, linear logical volumes are always shrunk from the last sectors, which will prevent easy expansion.

Re: Resize LVM to Expands /boot

Posted: 2018/02/08 10:20:40
by weyderfs
Hello guys,
Thanks to feedback. But yesterday after post this topic I continue searching (and trying simulate on VM) about this trouble on Web and really not it's possible.

The /boot not work with LVM then...same that reduce/resize the LVM can't possible allocate this null space on /boot.

I think that better solution it's format the server.

(VM) Migrating /boot to other disk

Posted: 2018/02/08 12:15:13
by weyderfs
Hello everyone,
Recently I do this post: viewtopic.php?f=47&t=65980 and discover that can't possible solve the problem. (The ambient it's all virtual with LVM on /root and /swap.)

How new solution I think in migrate to /boot to other virtual disk and I would like if can possible migrate the /boot (XFS file system) to other Virtual disk?

Re: Resize LVM to Expands /boot

Posted: 2018/02/08 14:23:53
by TrevorH
As said it's "almost" certainly impossible but that doesn't mean it is impossible, hence the request for more info.

If you just set this system up then it's almost certainly going to be easier to reinstall it and get the size correct to start with.

Re: Resize LVM to Expands /boot

Posted: 2018/02/08 16:08:22
by weyderfs
TrevorH wrote:As said it's "almost" certainly impossible but that doesn't mean it is impossible, hence the request for more info.

If you just set this system up then it's almost certainly going to be easier to reinstall it and get the size correct to start with.
Thank you so much. I will schedule a re-installation with customer.