Issue when changing default data and log directory

It is working when I change the log and data location to /var file system.