From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079085416475.tru64-unix-managers.marc@archive.invalid> From: Grant Ward Date: Tue, 30 Nov 1999 09:22:01 +0000 To: tru64-unix-managers Subject: Defragmenting a UFS partition ? X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079085416475 Hi all, Short version (executive summary :) I was wondering if anyone knew of an easy way to defragment a UFS partition (on DU4.0D, PWS500au) other than backing up, newfs'ing and restoring (there's ~4.5Gb in 240,000 files so this method would be rather lengthy). Long version : One of my users has discovered that their data disk says it is full even though it isn't (it still had ~700Mb free when the command failed) while he is creating a large tar file. Even root couldn't use any more space (ie. not a min free space issue either). There are thousands of inodes left too. I suspect the problem is related to the high fragmentation on the partition which I noticed during the fsck a few weeks ago when the machine was rebooting after a crash. It was in double digits (>10%) and in all my years administering Unix boxes, I've rarely seen more than a couple of percent and normally under 1% - the same is the case for a couple of local colleagues I checked my sanity with (Berkeley FFS rules OK :) We deleted a large quantity of data files (tens of 1000's of 4kb files) and then tried creating the large tar file again. As we deleted more files, we were able to get further and further. At the end of this, fsck reports the fragmentation is down to 8.3%, and we can create our large tar file until it fails (write failed, file system is full), and this time we now have only ~400Mb free space available instead of failing at 700Mb free. Still not satisfactory, but we can "get to" 300Mb more of the space. So I'm wondering if I could do even better if I could reduce the fragmentation back to a reasonable level, or have I just missed something incredibly obvious (easy to believe with all the other things going through my mind at the moment) ? Many thanks in advance. Cheers, Grant. Grant Ward ( Grant.Ward@cssip.edu.au ) Ph: +61 8 8302 3927 Mobile: +61 414 727 747 Fax: +61 8 8302 3124 Pager: 61414727747@sms.on.net