Skip to content
This repository was archived by the owner on Jan 16, 2024. It is now read-only.
This repository was archived by the owner on Jan 16, 2024. It is now read-only.

Growing root volume doesn't work on Minimal Ubuntu #116

@vholer

Description

@vholer

Identified problems:

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions