2018-04-12

growing partitions in linux

Situation:

  • Linux Virtual Machine
  • Disk is to small
  • Growing the virtual disk online is possible
  • How do you get to use the additional space in linux?


Solution:

  • Find out which scsi address to use ls /sys/class/scsi_disk
  • force a rescan of the device echo 1 > /sys/class/scsi/1\:0\:0\:0/device/rescan
  • grow the partition growpart /dev/sdb 1
  • grow the filesystem i.e. xfs_growfs /mnt/data