From: Carl W. S. <ch...@re...> - 2004-10-13 20:25:19
|
On 10/13 03:58 , Kanwar Ranbir Sandhu wrote: > I tried out du earlier, but with a slight variation: > > # du -schl pc/* > 8.0K pc/archivecdr > 12G pc/djwrk001 > 1.6G pc/hciwrk001 > 2.0G pc/niswrk001 > 16K pc/peswt001 > 16K pc/pihrs001 > 1.1G pc/sabroncaw001 > 16G total > > I also tried this: > > # du -sch pc/* > 8.0K pc/archivecdr > 9.6G pc/djwrk001 > 1.1G pc/hciwrk001 > 1.8G pc/niswrk001 > 16K pc/peswt001 > 16K pc/pihrs001 > 398M pc/sabroncaw001 > 13G total > > As you can see, the totals reported are different. I think the first > result (i.e. du -schl) is the correct one, since the "-l" switch takes > into account hardlinks. But, I'm still not sure if that's right. no, the second one is correct. from the 'du' man page: -l, --count-links count sizes many times if hard linked so the first one is more likely correct on a per-host basis, but gives an incorrect picture overall; the second one creates a correct picture overall, but is incorrect on a per-host basis. > Anyway, I don't know what to make of this. Are you suggesting that I > should use "du" to see how much space a host is consuming? yes. look at each host's disk usage with individual runs of 'du' to see how much space they're using; but keep in mind that deleting that host will not free up all the space, because other hosts are using those same files as well. include the pool and cpool directory if you want to see how much space is being used there as well. if you cause the pool and cpool directories to be scanned first (du -sch pool/ cpool/ pc/*); the space taken should be allocated correctly to the pool and cpool directories in the output. (so you'll see how much space you'd gain by deleting a directory). that's just a theory, I haven't tried it. -- Carl Soderstrom Systems Administrator Real-Time Enterprises www.real-time.com |