Resize LVM to Expands /boot

General support questions
weyderfs
Posts: 4
Joined: 2018/02/07 22:08:07

Resize LVM to Expands /boot

Postby weyderfs » 2018/02/07 22:25:27

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? :?: :?:
LPIC-1 Linux Administrator - IT Enthusiast

User avatar
TrevorH
Forum Moderator
Posts: 21727
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Resize LVM to Expands /boot

Postby TrevorH » 2018/02/07 23:12:39

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.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

User avatar
WhatsHisName
Posts: 1537
Joined: 2005/12/19 20:21:43
Location: /earth/usa/nj

Re: Resize LVM to Expands /boot

Postby WhatsHisName » 2018/02/08 02:43:25

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).

hunter86_bg
Posts: 894
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Resize LVM to Expands /boot

Postby hunter86_bg » 2018/02/08 05:22:38

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.

weyderfs
Posts: 4
Joined: 2018/02/07 22:08:07

Re: Resize LVM to Expands /boot

Postby weyderfs » 2018/02/08 10:20:40

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.
LPIC-1 Linux Administrator - IT Enthusiast

weyderfs
Posts: 4
Joined: 2018/02/07 22:08:07

(VM) Migrating /boot to other disk

Postby weyderfs » 2018/02/08 12:15:13

Hello everyone,
Recently I do this post: https://www.centos.org/forums/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?
LPIC-1 Linux Administrator - IT Enthusiast

User avatar
TrevorH
Forum Moderator
Posts: 21727
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Resize LVM to Expands /boot

Postby TrevorH » 2018/02/08 14:23:53

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.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

weyderfs
Posts: 4
Joined: 2018/02/07 22:08:07

Re: Resize LVM to Expands /boot

Postby weyderfs » 2018/02/08 16:08:22

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.
LPIC-1 Linux Administrator - IT Enthusiast