Use the check option of the srv4 volume command to check the integrity of a volume - i.e. check if all the files referenced in the database exist and have the expected size and also checks that the volumes directories do not contain files that are not refrerenced in the database.
Example
c:\tera\gn4\main\dbin>srv4 volume videos -check
Srv4 version 1.2.1026.0 debug
GN4 Server Configuration Utility
Copyright © 2006 - 2011 Tera Digital Publishing
Language en-US
Checking integrity of volume 'videos'
Reading directories ........ done
Checking files
Missing files:
Data id Object id Path
954 2696 0/0/Copy_of_VIDEO_002_data_1.mp4
Files with the wrong size:
Data id Object id Size File size Path
3531 3732 560,439 44,153 0/0/Another_VIDEO_002_data.mp4
Files in the volume directories but not referenced:
file:///c:/g/gn4/data/videos/0/0/200h.jpg
Notes
•For the description of the volume command, see volume.
•For additional information, see the discussion on Tera forum in http://forum.teradp.com/topic.asp?TOPIC_ID=737.