resize2fs: bad magic number in super-block

After extending a virtual drive on VMWare, I had to add the additional disk space to the logical volume.

After adding adding the space, you need to resize the file system. On the infrastructure I was working on, I usually use resize2fs command but this time it didn’t work:

[root@washingmashine ~]# resize2fs /dev/mapper/data-archive
resize2fs 1.44.6 (5-Mar-2019)
resize2fs: Bad magic number in super-block while trying to open
/dev/mapper/data-archive
Couldn't find valid filesystem superblock.

The resize2fs program will resize ext2, ext3, or ext4 file systems; I took for granted that LVM was using a ext4 fs but I was wrong:

[root@washingmashine ~]# mount | grep data-archive
/dev/mapper/data-archive on / type xfs (rw,relatime,...

XFS fs has its own command set; in this case I had to use the xfs_growfs command:

[root@washingmashine ~]# xfs_growfs /dev/mapper/data-archive

File system resized!