I have a Linux workstation with an iSCSI LUN mapped on the directory /mnt/nas509
the LUN is on /dev/sdb
and with a partition /dev/sdb1
I expand it by the NAS Web Interface, and execute this command on the linux workstation:
sudo growpart /dev/sdb 1
Now the partition seems correctly expanded but I keep seeing 1.0 TB instead of 1.5TB.
fdisk /dev/sdb
with command F (show unallocated space) shows 0.
fdisk -l
Disk /dev/sdb: 1.5 TiB, 1610612736000 bytes, 3145728000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 1048576 bytes / 1048576 bytes
Disklabel type: dos
Disk identifier: 0xe6af84e5
/etc/fstab
UUID=166030333DFC9F33 /mnt/nas509 ntfs _netdev 0 0
df -h
Filesystem Size Used Avail Use% Mounted on
udev 974M 0 974M 0% /dev
tmpfs 200M 972K 199M 1% /run
/dev/mapper/urbackup--vg-root 29G 5.6G 22G 21% /
tmpfs 996M 0 996M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 996M 0 996M 0% /sys/fs/cgroup
/dev/sda1 472M 130M 319M 29% /boot
/dev/sdb1 1000G 216G 785G 22% /mnt/nas509
You have only changed the size of the LUN, plus the partition of that disk. (Some tools do this in one step but definitely not
growpart
.) Extend the file system.fsadm
supports a couple popular file system types, but not ntfs as you have. Same task, different tool: