public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed: Invalid argument
@ 2009-05-23 15:01 Richard Ems
  2009-05-23 15:50 ` Eric Sandeen
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Ems @ 2009-05-23 15:01 UTC (permalink / raw)
  To: xfs

Hi list,

I'm getting the error "xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed:
Invalid argument" while trying to grow an XFS partition.

This is on openSUSE 11.1 64 bit, with xfsprogs-2.10.2-3.1 from
http://download.opensuse.org/repositories/filesystems/openSUSE_11.1/x86_64/xfsprogs-2.10.2-3.1.x86_64.rpm
.

This error is the same or looks similar to the one reported some months
ago at http://oss.sgi.com/archives/xfs/2009-02/msg00028.html .

There is apparently a fix for it, see
http://oss.sgi.com/archives/xfs/2008-12/msg01794.html :

*********************************************************
commit 471d59103167c84f17b9bcfee22ed10b44ff206e
Author: sandeen@xxxxxxxxxxx <sandeen@xxxxxxxxxxx>
Date:   Tue Nov 25 21:20:10 2008 -0600

    [XFS] Add compat handlers for data & rt growfs ioctls

    The args for XFS_IOC_FSGROWFSDATA and XFS_IOC_FSGROWFSRTA
    have padding on the end on intel, so add arg copyin functions,
    and then just call the growfs ioctl helpers.

    Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxxx>
    Reviewed-by: Christoph Hellwig <hch@xxxxxx>
    Signed-off-by: Lachlan McIlroy <lachlan@xxxxxxx>
*********************************************************

I tried different 2.6.27 versions, one 2.6.29 and one 2.6.30-rc6
version, all gave the same error, check
https://bugzilla.novell.com/show_bug.cgi?id=506361 for the different
kernel versions and errors.

Is this fix still not included in Linus / openSUSE trees?

Or am I hitting another error?

Thanks, Richard


-- 
Richard Ems       mail: Richard.Ems@Cape-Horn-Eng.com

Cape Horn Engineering S.L.
C/ Dr. J.J. Dómine 1, 5º piso
46011 Valencia
Tel : +34 96 3242923 / Fax 924
http://www.cape-horn-eng.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed: Invalid argument
  2009-05-23 15:01 xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed: Invalid argument Richard Ems
@ 2009-05-23 15:50 ` Eric Sandeen
  2009-05-23 16:07   ` richard.ems
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Sandeen @ 2009-05-23 15:50 UTC (permalink / raw)
  To: Richard Ems; +Cc: xfs

Richard Ems wrote:
> Hi list,
> 
> I'm getting the error "xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed:
> Invalid argument" while trying to grow an XFS partition.
> 
> This is on openSUSE 11.1 64 bit, with xfsprogs-2.10.2-3.1 from
> http://download.opensuse.org/repositories/filesystems/openSUSE_11.1/x86_64/xfsprogs-2.10.2-3.1.x86_64.rpm

The compat handlers should only matter if you're using 32 bit userspace
with a 64 bit kernel...

Are you certain that your xfsprogs userspace is 64-bit?

> 
> This error is the same or looks similar to the one reported some months
> ago at http://oss.sgi.com/archives/xfs/2009-02/msg00028.html .
> 
> There is apparently a fix for it, see
> http://oss.sgi.com/archives/xfs/2008-12/msg01794.html :
> 
> *********************************************************
> commit 471d59103167c84f17b9bcfee22ed10b44ff206e
> Author: sandeen@xxxxxxxxxxx <sandeen@xxxxxxxxxxx>
> Date:   Tue Nov 25 21:20:10 2008 -0600
> 
>     [XFS] Add compat handlers for data & rt growfs ioctls
> 
>     The args for XFS_IOC_FSGROWFSDATA and XFS_IOC_FSGROWFSRTA
>     have padding on the end on intel, so add arg copyin functions,
>     and then just call the growfs ioctl helpers.
> 
>     Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxxx>
>     Reviewed-by: Christoph Hellwig <hch@xxxxxx>
>     Signed-off-by: Lachlan McIlroy <lachlan@xxxxxxx>
> *********************************************************
> 
> I tried different 2.6.27 versions, one 2.6.29 and one 2.6.30-rc6
> version, all gave the same error, check
> https://bugzilla.novell.com/show_bug.cgi?id=506361 for the different
> kernel versions and errors.

I don't see in that bug where you tested .29 or .30, or what the results
were...


> Is this fix still not included in Linus / openSUSE trees?

As for Linus' tree, AFAIK everything works; I can't speak to what SuSE has.

-Eric

> Or am I hitting another error?
> 
> Thanks, Richard
> 
> 

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed: Invalid argument
  2009-05-23 15:50 ` Eric Sandeen
@ 2009-05-23 16:07   ` richard.ems
  2009-05-23 17:35     ` Eric Sandeen
  0 siblings, 1 reply; 9+ messages in thread
From: richard.ems @ 2009-05-23 16:07 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs


Quoting Eric Sandeen <sandeen@sandeen.net>:

> Richard Ems wrote:
>> Hi list,
>>
>> I'm getting the error "xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed:
>> Invalid argument" while trying to grow an XFS partition.
>>
>> This is on openSUSE 11.1 64 bit, with xfsprogs-2.10.2-3.1 from
>> http://download.opensuse.org/repositories/filesystems/openSUSE_11.1/x86_64/xfsprogs-2.10.2-3.1.x86_64.rpm
>
> The compat handlers should only matter if you're using 32 bit userspace
> with a 64 bit kernel...
>
> Are you certain that your xfsprogs userspace is 64-bit?

Yes.

c3m:~ # type -a xfs_growfs
xfs_growfs is /usr/sbin/xfs_growfs

c3m:~ # file /usr/sbin/xfs_growfs
/usr/sbin/xfs_growfs: ELF 64-bit LSB executable, x86-64, version 1  
(SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs),  
not stripped

>
>>
>> This error is the same or looks similar to the one reported some months
>> ago at http://oss.sgi.com/archives/xfs/2009-02/msg00028.html .
>>
>> There is apparently a fix for it, see
>> http://oss.sgi.com/archives/xfs/2008-12/msg01794.html :
>>
>> *********************************************************
>> commit 471d59103167c84f17b9bcfee22ed10b44ff206e
>> Author: sandeen@xxxxxxxxxxx <sandeen@xxxxxxxxxxx>
>> Date:   Tue Nov 25 21:20:10 2008 -0600
>>
>>     [XFS] Add compat handlers for data & rt growfs ioctls
>>
>>     The args for XFS_IOC_FSGROWFSDATA and XFS_IOC_FSGROWFSRTA
>>     have padding on the end on intel, so add arg copyin functions,
>>     and then just call the growfs ioctl helpers.
>>
>>     Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxxx>
>>     Reviewed-by: Christoph Hellwig <hch@xxxxxx>
>>     Signed-off-by: Lachlan McIlroy <lachlan@xxxxxxx>
>> *********************************************************
>>
>> I tried different 2.6.27 versions, one 2.6.29 and one 2.6.30-rc6
>> version, all gave the same error, check
>> https://bugzilla.novell.com/show_bug.cgi?id=506361 for the different
>> kernel versions and errors.
>
> I don't see in that bug where you tested .29 or .30, or what the results
> were...

Sorry, I wrote a 2nd comment into bugzilla but forgot to submit it 8( .
Now it's there, please check again (  
https://bugzilla.novell.com/show_bug.cgi?id=506361#c1 ) .

>
>
>> Is this fix still not included in Linus / openSUSE trees?
>
> As for Linus' tree, AFAIK everything works; I can't speak to what SuSE has.

So the Vanilla kernel I tried should have this fix included, is it  
then a new bug?

Thanks, Richard

--
Richard Ems       mail: Richard.Ems@Cape-Horn-Eng.com

Cape Horn Engineering S.L.
C/ Dr. J.J. Dómine 1, 5º piso
46011 Valencia
Tel : +34 96 3242923 / Fax 924
http://www.cape-horn-eng.com


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed: Invalid argument
  2009-05-23 16:07   ` richard.ems
@ 2009-05-23 17:35     ` Eric Sandeen
  2009-05-23 17:45       ` richard.ems
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Sandeen @ 2009-05-23 17:35 UTC (permalink / raw)
  To: richard.ems; +Cc: xfs

richard.ems@cape-horn-eng.com wrote:
> Quoting Eric Sandeen <sandeen@sandeen.net>:
> 
>> Richard Ems wrote:

...

>>> I tried different 2.6.27 versions, one 2.6.29 and one 2.6.30-rc6
>>> version, all gave the same error, check
>>> https://bugzilla.novell.com/show_bug.cgi?id=506361 for the different
>>> kernel versions and errors.
>> I don't see in that bug where you tested .29 or .30, or what the results
>> were...
> 
> Sorry, I wrote a 2nd comment into bugzilla but forgot to submit it 8( .
> Now it's there, please check again (  
> https://bugzilla.novell.com/show_bug.cgi?id=506361#c1 ) .
> 
>>
>>> Is this fix still not included in Linus / openSUSE trees?
>> As for Linus' tree, AFAIK everything works; I can't speak to what SuSE has.
> 
> So the Vanilla kernel I tried should have this fix included, is it  
> then a new bug?

Not sure ... how big is the current fs and how big is the device?  Can
you provide:

# xfs_info /mnt
# grep sda1 /proc/partitions

-Eric

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed: Invalid argument
  2009-05-23 17:35     ` Eric Sandeen
@ 2009-05-23 17:45       ` richard.ems
  2009-05-23 18:47         ` Eric Sandeen
  0 siblings, 1 reply; 9+ messages in thread
From: richard.ems @ 2009-05-23 17:45 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs


Quoting Eric Sandeen <sandeen@sandeen.net>:
> Not sure ... how big is the current fs and how big is the device?  Can
> you provide:
>
> # xfs_info /mnt
> # grep sda1 /proc/partitions

It is a 16TB FS, and I add 4 x 1 TB HDDs to the RAID 6 array, so the  
device went from 16 TB to 20 TB.

c3m:~ # xfs_info /backup/IFT
meta-data=/dev/sda1              isize=256    agcount=52, agsize=76288719 blks
          =                       sectsz=512   attr=1
data     =                       bsize=4096   blocks=3905982455, imaxpct=25
          =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =internal               bsize=4096   blocks=32768, version=1
          =                       sectsz=512   sunit=0 blks, lazy-count=0
realtime =none                   extsz=4096   blocks=0, rtextents=0


c3m:~ # grep sda1 /proc/partitions
    8     1 19529912286 sda1


c3m:~ # parted /dev/sda print
Model: IFT A24U-G2421 (scsi)
Disk /dev/sda: 20.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
  1      17.4kB  20.0TB  20.0TB  xfs          LD01  , , , , , , , , , , ,



thanks, Richard




-- 
Richard Ems       mail: Richard.Ems@Cape-Horn-Eng.com

Cape Horn Engineering S.L.
C/ Dr. J.J. Dómine 1, 5º piso
46011 Valencia
Tel : +34 96 3242923 / Fax 924
http://www.cape-horn-eng.com


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed: Invalid argument
  2009-05-23 17:45       ` richard.ems
@ 2009-05-23 18:47         ` Eric Sandeen
  2009-05-23 19:25           ` Eric Sandeen
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Sandeen @ 2009-05-23 18:47 UTC (permalink / raw)
  To: richard.ems; +Cc: xfs

richard.ems@cape-horn-eng.com wrote:
> Quoting Eric Sandeen <sandeen@sandeen.net>:
>> Not sure ... how big is the current fs and how big is the device?  Can
>> you provide:
>>
>> # xfs_info /mnt
>> # grep sda1 /proc/partitions
> 
> It is a 16TB FS, and I add 4 x 1 TB HDDs to the RAID 6 array, so the  
> device went from 16 TB to 20 TB.
> 
> c3m:~ # xfs_info /backup/IFT
> meta-data=/dev/sda1              isize=256    agcount=52, agsize=76288719 blks
>           =                       sectsz=512   attr=1
> data     =                       bsize=4096   blocks=3905982455, imaxpct=25
>           =                       sunit=0      swidth=0 blks
> naming   =version 2              bsize=4096   ascii-ci=0
> log      =internal               bsize=4096   blocks=32768, version=1
>           =                       sectsz=512   sunit=0 blks, lazy-count=0
> realtime =none                   extsz=4096   blocks=0, rtextents=0
> 
> 
> c3m:~ # grep sda1 /proc/partitions
>     8     1 19529912286 sda1

thanks, with that info I can reproduce it, I'll look into it soon... but
not today.

# xfs_io -f -c "truncate 19998630180864" fsfile
# mkfs.xfs -f -bsize=4096 -dagsize=76288719b,size=3905982455b fsfile
# mount -o loop fsfile mnt/
# xfs_growfs mnt/
meta-data=/dev/loop0             isize=256    agcount=52,
agsize=76288719 blks
         =                       sectsz=512   attr=2
data     =                       bsize=4096   blocks=3905982455, imaxpct=5
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =internal               bsize=4096   blocks=32768, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=0
realtime =none                   extsz=4096   blocks=0, rtextents=0
xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed: Invalid argument


-Eric

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed: Invalid argument
  2009-05-23 18:47         ` Eric Sandeen
@ 2009-05-23 19:25           ` Eric Sandeen
  2009-05-25  9:54             ` Richard Ems
  2009-06-01 14:32             ` Richard Ems
  0 siblings, 2 replies; 9+ messages in thread
From: Eric Sandeen @ 2009-05-23 19:25 UTC (permalink / raw)
  To: richard.ems; +Cc: xfs

Eric Sandeen wrote:
> richard.ems@cape-horn-eng.com wrote:
>> Quoting Eric Sandeen <sandeen@sandeen.net>:
>>> Not sure ... how big is the current fs and how big is the device?  Can
>>> you provide:
>>>
>>> # xfs_info /mnt
>>> # grep sda1 /proc/partitions
>> It is a 16TB FS, and I add 4 x 1 TB HDDs to the RAID 6 array, so the  
>> device went from 16 TB to 20 TB.
>>
>> c3m:~ # xfs_info /backup/IFT
>> meta-data=/dev/sda1              isize=256    agcount=52, agsize=76288719 blks
>>           =                       sectsz=512   attr=1
>> data     =                       bsize=4096   blocks=3905982455, imaxpct=25
>>           =                       sunit=0      swidth=0 blks
>> naming   =version 2              bsize=4096   ascii-ci=0
>> log      =internal               bsize=4096   blocks=32768, version=1
>>           =                       sectsz=512   sunit=0 blks, lazy-count=0
>> realtime =none                   extsz=4096   blocks=0, rtextents=0
>>
>>
>> c3m:~ # grep sda1 /proc/partitions
>>     8     1 19529912286 sda1
> 
> thanks, with that info I can reproduce it, I'll look into it soon... but
> not today.

Actually I lied, I looked at it ;)

if you growfs to a nr of blocks that is about 55 blocks less than the
actual device size, it should succeed for you.  There's a case where the
last AG would be too small and it tries to compensate but there's an
overflow, I'll send a patch.

-Eric

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed: Invalid argument
  2009-05-23 19:25           ` Eric Sandeen
@ 2009-05-25  9:54             ` Richard Ems
  2009-06-01 14:32             ` Richard Ems
  1 sibling, 0 replies; 9+ messages in thread
From: Richard Ems @ 2009-05-25  9:54 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs

Eric Sandeen wrote:
> if you growfs to a nr of blocks that is about 55 blocks less than the
> actual device size, it should succeed for you.  There's a case where the
> last AG would be too small and it tries to compensate but there's an
> overflow, I'll send a patch.

Many thanks Eric for looking, finding and fixing it! 8)

I will try to growfs to less than 55 blocks than the device as you proposed.

Thanks again, Richard


-- 
Richard Ems       mail: Richard.Ems@Cape-Horn-Eng.com

Cape Horn Engineering S.L.
C/ Dr. J.J. Dómine 1, 5º piso
46011 Valencia
Tel : +34 96 3242923 / Fax 924
http://www.cape-horn-eng.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed: Invalid argument
  2009-05-23 19:25           ` Eric Sandeen
  2009-05-25  9:54             ` Richard Ems
@ 2009-06-01 14:32             ` Richard Ems
  1 sibling, 0 replies; 9+ messages in thread
From: Richard Ems @ 2009-06-01 14:32 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs

Eric Sandeen wrote:
> if you growfs to a nr of blocks that is about 55 blocks less than the
> actual device size, it should succeed for you.  There's a case where the
> last AG would be too small and it tries to compensate but there's an
> overflow, I'll send a patch.

Yes, it worked growing to a smaller size.

Thanks again, Richard

-- 
Richard Ems       mail: Richard.Ems@Cape-Horn-Eng.com

Cape Horn Engineering S.L.
C/ Dr. J.J. Dómine 1, 5º piso
46011 Valencia
Tel : +34 96 3242923 / Fax 924
http://www.cape-horn-eng.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-06-01 14:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-23 15:01 xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed: Invalid argument Richard Ems
2009-05-23 15:50 ` Eric Sandeen
2009-05-23 16:07   ` richard.ems
2009-05-23 17:35     ` Eric Sandeen
2009-05-23 17:45       ` richard.ems
2009-05-23 18:47         ` Eric Sandeen
2009-05-23 19:25           ` Eric Sandeen
2009-05-25  9:54             ` Richard Ems
2009-06-01 14:32             ` Richard Ems

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox