This repository was archived by the owner on Jan 16, 2024. It is now read-only.
  
  
  
  
  
Description
Identified problems:
- Proc mounts doesn't contain valid root volume device:
# cat /etc/mtab | grep ' / ' | grep -v '^rootfs'
/dev/root / ext4 rw,relatime,data=ordered 0 0
# ls -la /dev/root
ls: cannot access '/dev/root': No such file or directory
It would be good to start using findmnt instead, e.g.:
# findmnt -ln -o SOURCE,FSTYPE /
/dev/vda1 ext4
# findmnt -ln -o SOURCE,FSTYPE /
/dev/mapper/centos_nessos-root xfs
- Non-LVM device name always stripped
This part:
  
  
    
        
          |  | DISK=$(echo "$DEVICE" | sed 's/.$//') | 
    
   
 
always removes last character from the device name, no matter if it is a partition number or not. Should strip only all trailing number. Error from log:
Jul 12 10:02:55 ubuntu one-contextd[457]: Script loc-05-grow-rootfs: Starting ...
Jul 12 10:02:55 ubuntu one-contextd[486]: Script loc-05-grow-rootfs output: FAILED: /dev/roo: does not exist
Jul 12 10:02:55 ubuntu one-contextd[486]: resize2fs 1.42.13 (17-May-2015)
Jul 12 10:02:55 ubuntu one-contextd[486]: open: No such file or directory while opening /dev/root
Jul 12 10:02:55 ubuntu one-contextd[487]: Script loc-05-grow-rootfs: Finished with exit code 1