qubes.ResizeDisk 439 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. read -r disk_name
  3. set -e
  4. case $disk_name in
  5. private)
  6. # force some read to refresh device size
  7. head /dev/xvdb > /dev/null
  8. resize2fs /dev/xvdb
  9. ;;
  10. root)
  11. # force some read to refresh device size
  12. head /dev/xvda > /dev/null
  13. /usr/lib/qubes/resize-rootfs
  14. ;;
  15. *)
  16. echo "Automatic resize of '$disk_name' not supported" >&2
  17. exit 1
  18. ;;
  19. esac