From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-f47.google.com ([209.85.166.47]:36452 "EHLO mail-io1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726475AbeLJE3L (ORCPT ); Sun, 9 Dec 2018 23:29:11 -0500 Received: by mail-io1-f47.google.com with SMTP id m19so7730283ioh.3 for ; Sun, 09 Dec 2018 20:29:11 -0800 (PST) Received: from localhost (ip-24-156-181-89.user.start.ca. [24.156.181.89]) by smtp.gmail.com with ESMTPSA id r63sm4134956ita.2.2018.12.09.20.29.09 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 09 Dec 2018 20:29:09 -0800 (PST) Date: Sun, 9 Dec 2018 23:29:04 -0500 From: Nick Bowler Subject: Enlarging w/ xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed: Inappropriate ioctl for device Message-ID: <20181210042842.GA16286@draconx.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: linux-xfs@vger.kernel.org Hello, I'm a bit new to using XFS and I ran into some errors trying to enlarge a filesystem. This setup uses dmcrypt on top of md raid and I just reshaped the array to add additional storage. The underlying block device reflects the new size, but the filesystem hasn't been enlarged yet: # blockdev --report /dev/mapper/data RO RA SSZ BSZ StartSec Size Device rw 4096 512 4096 0 20001386921984 /dev/mapper/data # findmnt /dev/mapper/data TARGET SOURCE FSTYPE OPTIONS /mnt/data /dev/mapper/data xfs rw,relatime,attr2,inode64,sunit=1024,swidth=2048,noquota # df -h /mnt/data Filesystem Size Used Avail Use% Mounted on /dev/mapper/data 9.1T 8.5T 649G 94% /mnt/data So I read the manpage and it seems all I should need to do is run xfs_growfs on the mounted filesystem but... # xfs_growfs /mnt/data meta-data=/dev/mapper/data isize=512 agcount=32, agsize=76299136 blks = sectsz=4096 attr=2, projid32bit=1 = crc=1 finobt=1, sparse=1, rmapbt=0 = reflink=0 data = bsize=4096 blocks=2441572352, imaxpct=5 = sunit=128 swidth=256 blks naming =version 2 bsize=4096 ascii-ci=0, ftype=1 log =internal log bsize=4096 blocks=521728, version=2 = sectsz=4096 sunit=1 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed: Inappropriate ioctl for device xfs_growfs: XFS_IOC_FSGEOMETRY xfsctl failed: Inappropriate ioctl for device ... and the filesystem is not enlarged. Looking at strace output, the failing ioctls seem to be: openat(AT_FDCWD, "/mnt/data", O_RDONLY) = 3 [...] ioctl(3, _IOC(_IOC_WRITE, 0x58, 0x6e, 0x10), 0xffcc9a80) = -1 ENOTTY (Inappropriate ioctl for device) [...] ioctl(3, _IOC(_IOC_READ, 0x58, 0x64, 0x70), 0xffcc9ba0) = -1 ENOTTY (Inappropriate ioctl for device) Kernel version is 4.14.82 with xfsprogs 4.17.0, although I tried also with xfsprogs 4.19.0 and received the same errors. Am I missing something obvious here? What further steps should I take to help solve this? Thanks, Nick