These are some guides for various use.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.1 KiB

  1. # Disk Management
  2. ## Grow non-LVM ext4 partition
  3. ATTENTION: Please note that the partition to enlarge has to be the last one with the free space after it.
  4. SSH into the VM.
  5. - run `lsblk` check if the disk size has changed
  6. - if not `reboot` the virtual machine
  7. In the following it is assumed that the partition to enlarge is `/dev/sda2`
  8. - change the size of the partition with `parted /dev/sda`
  9. - inside of parted run `print free` and check where the free space after your partition ends
  10. - run `resizepart` and follow the instructions; End is the number you checked in the last step
  11. - `quit` parted
  12. Now you need to resize the filesystem with `resize2fs /dev/sda2`.
  13. ## Error solving
  14. ### sudo: unable to open ... Read-only file system
  15. source: [https://askubuntu.com/questions/197459/how-to-fix-sudo-unable-to-open-read-only-file-system]
  16. Ususally the filesystem will go into read-only mode whe the system is running and there is a consistency error.
  17. To fix it run:
  18. - `sudo fsck -Af -M` - check all filesystems
  19. If `fsck` gets stuck after its version banner:
  20. `fsck from util-linux 2.20.1`
  21. you may want to try using the ext4-specific fsck:
  22. - `fsck.ext4 -f /dev/sda1`