Skip to contentSkip to conversation

can I shrink an xfs?

DISCUSSION Louis-David Mitterrand 4 participants 4 messages Mar 11, 2008 – Mar 12, 2008

lore
Share & tools
lore
#0 lore raw

Hi,

Is it possible to shrink an xfs? I tried using xfs_growfs to no avail.

	zenon:~# xfs_growfs -D 650000000 /backup
	meta-data=/dev/md2               isize=256    agcount=32, agsize=20539552 blks
			 =                       sectsz=4096  attr=1
	data     =                       bsize=4096   blocks=657265248, imaxpct=25
			 =                       sunit=16     swidth=48 blks
	naming   =version 2              bsize=4096  
	log      =internal               bsize=4096   blocks=32768, version=2
			 =                       sectsz=4096  sunit=1 blks, lazy-count=0
	realtime =none                   extsz=196608 blocks=0, rtextents=0
	data size 650000000 too small, old size is 657265248

... even though the fs is 80% full only.

Thanks,

#1 lore raw
Quoted 3 lines · Louis-David Mitterrand

Hi,

Is it possible to shrink an xfs? I tried using xfs_growfs to no avail.

There's no official/supported way to do it. There might be some tool to do it, but I'm not aware of any.

Dave, et. al.: why not support shrinking? I know, inode numbers and whatnot, but that's already being messed up (at least to a degree) with the noikeep mount option. I think that shrinking would be useful to have - even if you have to pass it --i-know-what-i-am-doing kind of option. Maybe a offline shrink via repair would be more viable?

Josef 'Jeff' Sipek.

Signature · 2 lines
Hegh QaQ law'
quvHa'ghach QaQ puS
#2 lore raw
Quoted 5 lines · Josef 'Jeff' Sipek
Quoted 3 lines · Louis-David Mitterrand

Hi,

Is it possible to shrink an xfs? I tried using xfs_growfs to no avail.

Quoted 8 lines

There's no official/supported way to do it. There might be some tool to do it, but I'm not aware of any.

Dave, et. al.: why not support shrinking? I know, inode numbers and whatnot, but that's already being messed up (at least to a degree) with the noikeep mount option. I think that shrinking would be useful to have - even if you have to pass it --i-know-what-i-am-doing kind of option. Maybe a offline shrink via repair would be more viable?

It's being worked on - have a look in the achives at what Ruben Porras has been doing (and the patches he recently sent). Shrinking involves a lot of bits to come together sucessful, and we're slowly getting them together. If you want to get it done faster - help Ruben ;)

Cheers,

Dave.

Signature · 3 lines
Dave Chinner
Principal Engineer
SGI Australian Software Group
#3 lore raw
In reply to Louis-David Mitterrand
Quoted 3 lines · Louis-David Mitterrand

Hi,

Is it possible to shrink an xfs? I tried using xfs_growfs to no avail.

Nope.

http://oss.sgi.com/projects/xfs/faq.html#resize

-Eric

Quoted 16 lines
	zenon:~# xfs_growfs -D 650000000 /backup
	meta-data=/dev/md2               isize=256    agcount=32, agsize=20539552 blks
			 =                       sectsz=4096  attr=1
	data     =                       bsize=4096   blocks=657265248, imaxpct=25
			 =                       sunit=16     swidth=48 blks
	naming   =version 2              bsize=4096  
	log      =internal               bsize=4096   blocks=32768, version=2
			 =                       sectsz=4096  sunit=1 blks, lazy-count=0
	realtime =none                   extsz=196608 blocks=0, rtextents=0
	data size 650000000 too small, old size is 657265248

... even though the fs is 80% full only.

Thanks,