#1909 Issue closed: Can we change /boot partition size

Labels: support / question, fixed / solved / done

samurdhi opened issue at 2018-09-06 13:23:

Relax-and-Recover (ReaR) Issue Template

Fill in the following items before submitting a new issue
(quick response is not guaranteed with free support):

  • ReaR version ("/usr/sbin/rear -V"):
    Relax-and-Recover 2.4 / 2018-06-21

  • OS version ("cat /etc/rear/os.conf" or "lsb_release -a" or "cat /etc/os-release"):
    RHEL 7.4

  • Description of the issue (ideally so that others can reproduce it):

In the following server, by mistakenly we have given the wrong size(128M) for the boot partition. Now we unable to update the OS because of not enough space left in the boot partition. Please let me know , Can we change boot partition size with REAR?

[root@srv1~]# lsblk 
NAME               MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                  8:0    0 558.9G  0 disk 
├─sda1               8:1    0   128M  0 part /boot
└─sda2               8:2    0   430G  0 part 
  ├─systemvg-root  253:0    0    40G  0 lvm  /
  ├─systemvg-swap  253:1    0    40G  0 lvm  [SWAP]
  ├─systemvg-home  253:2    0    10G  0 lvm  /home
  ├─systemvg-var   253:3    0    40G  0 lvm  /var
  ├─systemvg-inet  253:4    0   200G  0 lvm  /inet
  ├─systemvg-opt   253:5    0    20G  0 lvm  /opt
  └─systemvg-spare 253:6    0    80G  0 lvm  /spare
sr0                 11:0    1  1024M  0 rom  
[root@srv1 ~]# df -kh /boot/
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       120M  113M     0 100% /boot
[root@srv1 ~]# 
[root@srv1 ~]# pvs
  PV         VG       Fmt  Attr PSize   PFree
  /dev/sda2  systemvg lvm2 a--  430.00g    0 
[root@srv1 ~]#

gdha commented at 2018-09-13 06:17:

Yes it is possible, but it is not straightforward as the /var/lib/rear/layout/disklayout.conf needs to be modified, but also later on the sizes of the different VGs and Lvols.
Perhaps it is easier to manually re-partition the disk and restore manual the content from the backup.tar.gz file after recreating the VGs and Lvols and mount these under /mnt/local

gdha commented at 2018-10-29 15:43:

@samurdhi Has your question been answered sufficient? Sorry, ReaR cannot do everything.

samurdhi commented at 2018-10-29 18:13:

@gdha,

Thanks a lot for your support, Yes I have successfully changed the size of a boot partition of this servers.
After restoring, everything works fine.
I have extended existing /boot from 128M to 1GB.

[root@srv ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 558.9G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 430G 0 part
├─systemvg-root 253:0 0 40G 0 lvm /
├─systemvg-swap 253:1 0 40G 0 lvm [SWAP]
├─systemvg-home 253:2 0 10G 0 lvm /home
├─systemvg-var 253:3 0 40G 0 lvm /var
├─systemvg-inet 253:4 0 200G 0 lvm /inet
├─systemvg-opt 253:5 0 20G 0 lvm /opt
└─systemvg-spare 253:6 0 80G 0 lvm /spare
sr0 11:0 1 1024M 0 rom
[root@srv ~]$
[root@srv ~]$ df -kh /boot/
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 928M 148M 736M 17% /boot
[root@srv ~]$

Thanks,
Samurdhi

gdha commented at 2018-10-30 07:51:

Great news indeed and glad ReaR did the job (and you of course :-)


[Export of Github issue for rear/rear.]