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.

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