Couple of comments 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Svoboda, Michael Steven
> Sent: Wednesday, September 05, 2007 9:03 AM
> To: veritas-vx@mailman.eng.auburn.edu
> Subject: [Veritas-vx] does fsadm defragmentation require 
> additional storageto run?
> 
> We are looking at implementing fsadm to perform extent and 
> directory defragmentation across our VxFS file systems.  
> During the defragmentation process, does fsadm require extra 
> space in the filesystem to perform its work?  Is data copied 
> to RAM instead while the extent reorganization is being executed?  

The reorg is persistant, so that if you crash during the reorg, all your
data is still on-disk. That means each move consists of a copy
(read-write), then a release of the original data. But, the space
required is just a single extent. 

> 
> I know fsadm will actually reduce the filesystem size after 
> its run; 

Not by much; the file data is the same before and after. Some small
amount of file system metadata may be saved, if you have an indirect
addressing block, for example, that can be freed up. But that's pretty
speculative and small.

but what happens during the run?
> 
> What we are concerned about is if a file system is at, say, 
> 89.9%, fsadm runs and pushes it to 90%, we don't want our 
> monitoring software to report on that full filesystem; if 
> after the call-out the space is reduced to say 87% and 
> doesn't require intervention.

Given the size of the individual moves, this seems theoretically
possible but unlikely in practice to happen often.
> 
> It appears to run successfully on 100% filesystems with 0k 
> free.  The only reason why I ask this question is that the 
> VxFS 5.0 Administrators Guide has the following text:
> 
> Reorganizing a file system
>               You can reorganize or compact a fragmented file 
> system using fsadm, even while
>               the file system is mounted. This may help 
> shrink a file system that could not
>               previously be decreased.
> 
>               Note: If a file system is full or busy, the 
> reorg operation may fail.


The file system frees up each redundant extent immediately after each
individual copy operation completes. It doesn't wait until all copy
operations are done. So, if the file system didn't have a single block
free, you couldn't reorg.

> 
> 99% run
> # df -h .
> Filesystem             size   used  avail capacity  Mounted on
> /dev/vx/dsk/testdg/vol1
>                        100M    99M   1.0M    99%    /testdg/vol1
> 
> # /usr/lib/fs/vxfs/fsadm -v -e -d /testdg/vol1/ UX:vxfs 
> fsadm: INFO: V-3-20287: using device /dev/vx/rdsk/testdg/vol1 
> UX:vxfs fsadm: INFO: V-3-20223: directory reorganization 
> complete UX:vxfs fsadm: INFO: V-3-20261: extent reorg pass 1
> AU: aun =   2, tfree =  16641, sfree =      9
> AU: aun =   0, tfree =     36, sfree =     36
> UX:vxfs fsadm: INFO: V-3-20262: extent reorg complete
> 
> 100% run with 9k free.
> # df -k .
> Filesystem            kbytes    used   avail capacity  Mounted on
> /dev/vx/dsk/testdg/vol1
>                       102400  102391       9   100%    /testdg/vol1
> 
> # /usr/lib/fs/vxfs/fsadm -v -e -d /testdg/vol1/ UX:vxfs 
> fsadm: INFO: V-3-20287: using device /dev/vx/rdsk/testdg/vol1 
> UX:vxfs fsadm: INFO: V-3-20223: directory reorganization 
> complete UX:vxfs fsadm: INFO: V-3-20261: extent reorg pass 1
> AU: aun =   2, tfree =  16641, sfree =      9
> AU: aun =   0, tfree =     36, sfree =     36
> UX:vxfs fsadm: INFO: V-3-20262: extent reorg complete
> 
> After the defrag, it gave me 16k free.
> 
> # df -k .
> Filesystem            kbytes    used   avail capacity  Mounted on
> /dev/vx/dsk/testdg/vol1
>                       102400  102384      16   100%    /testdg/vol1
> 
> 
> # mkfile 16k all-used-up
> 
> # df -k .
> Filesystem            kbytes    used   avail capacity  Mounted on
> /dev/vx/dsk/testdg/vol1
>                       102400  102400       0   100%    /testdg/vol1
> 
> 
> # /usr/lib/fs/vxfs/fsadm -v -e -d /testdg/vol1/ UX:vxfs 
> fsadm: INFO: V-3-20287: using device /dev/vx/rdsk/testdg/vol1 
> UX:vxfs fsadm: INFO: V-3-20223: directory reorganization 
> complete UX:vxfs fsadm: INFO: V-3-20261: extent reorg pass 1
> AU: aun =   2, tfree =  16641, sfree =      9
> AU: aun =   0, tfree =     36, sfree =     36
> UX:vxfs fsadm: INFO: V-3-20262: extent reorg complete
> 
> # df -k .
> Filesystem            kbytes    used   avail capacity  Mounted on
> /dev/vx/dsk/testdg/vol1
>                       102400  102400       0   100%    /testdg/vol1
> 
> 
> Thanks!
> 
> Mike 
> 
> 
> 
> 
> _______________________________________________
> Veritas-vx maillist  -  Veritas-vx@mailman.eng.auburn.edu 
> http://mailman.eng.auburn.edu/mailman/listinfo/veritas-vx
> 

_______________________________________________
Veritas-vx maillist  -  Veritas-vx@mailman.eng.auburn.edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-vx

Reply via email to