1

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
Kreker
  • 478
  • 4
  • 10
  • 22
  • You've expanded the partition, now you need to expand the filesystem - not sure which exact linux you're on but usually the resize2fs command is your friend. – Chopper3 Feb 26 '19 at 09:57

1 Answers1

2

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 resize /dev/disk/by-uuid/166030333DFC9F33

fsadm supports a couple popular file system types, but not ntfs as you have. Same task, different tool:

ntfsresize /dev/disk/by-uuid/166030333DFC9F33
John Mahowald
  • 33,256
  • 2
  • 21
  • 39