pp_disk: generate_rand function implemented