Resize iSCSI partition


Lets have a practical scenario. A disk box, with iSCSI LUN, which is used by a linux box.
LUN fills up, and is resized on that disk box.

On linux side, lets rescan session, to get updated target size visible:
iscsiadm -m session -R

Lets assume, the partition is plain ext4 and available as /dev/sde1

parted /dev/sde

Parted should detect disk size update and notify about it
Warning: Not all of the space available to /dev/sde appears to be used, you can fix the GPT to use all of the space
(an extra 2147483648 blocks) or continue with the current setting?
Fix/Ignore? fix

resize partition 1
resizepart 1

Then use resize2fs to resize the partition and mount it.
resize2fs /dev/sde1
resize2fs 1.42.10 (18-May-2014)
Please run 'e2fsck -f /dev/sde1' first.

Just a ‘small’ sidestep – e2fsck 8T of data.

Remount it back afterwards.

Leave a comment

Your email address will not be published. Required fields are marked *