Just take out the drives first and do a factory reset from within the UI. The DNS-323 is now "as bought" (except newer firmware), means all user/groups, FTP, Itunes and SMB settings are gone.
I don't know if this clears any AddOn modules and their settings too.
Oh, I don't know if your next NAS would use the already-filled HD's as they are or if it has to re-format them. So before you take the HD's out, make a backup. You might not be able to do that later.
//HSishi