Below are examples of expanding an ISCSI Linux device partition. In this example /dev/vg01/lvol01 is the LVM volume and /mnt/iscsi is the mount point. The device partition is /dev/sdb
*It is recommended that you back up your data before making changes to a device or file system.
If using LVM:
[root@hostname ~]# umount /mnt/iscsi
# Use fsdisk to delete and recreate partition
[root@hostname ~]# fdisk /dev/sdb # (d, p, 1, default, default, t, 8e, p, w)
[root@hostname ~]# pvscan
[root@hostname ~]# pvresize /dev/sdb1
# (use vgdisplay to get the amount of free space in volume group)
[root@hostname ~]# lvextend [-l|-L] +[extents|size] /dev/vg01/lvol01
[root@hostname ~]# e2fsck -f /dev/vg01/lvol01
[root@hostname ~]# resize2fs /dev/vg01/lvol01
[root@hostname ~]# mount -t ext3 /dev/vg01/lvol01 /mnt/iscsi # (or mount -a if entry exists in /etc/fstab)
[root@hostname ~]# df –h
If NOT using LVM (delete partition, recreate partition, resize and mount)
[root@hostname ~]# umount /mnt/iscsi
[root@hostname ~]# fdisk /dev/sdb
Command (m for help): d
Selected partition 1
Command (m for help): n
Command action
e extended
p primary partition (1-4) p
Partition number (1-4): 1
Accept Default Values for first and last cylinder
Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 83
Command (m for help): p
Command (m for help): w
[root@hostname ~]# e2fsck /dev/sdb1
[root@hostname ~]# resize2fs /dev/sdb1
[root@hostname ~]# mount -t ext3 /dev/sdb1 /mnt/iscsi
[root@hostname ~]# df –h