Moving a hard disk with PostgreSQL data folder to another server
Yes, that is no problem, as long as


you are using the same major version of PostgreSQL on the new machine
PostgreSQL was built in the same way
both machines have the same architecture and operating system version (the version is relevant because it might affect the collations, changing versions requires a REINDEX)


Running PostgreSQL on a NAS file system is dangerous, because many NAS implementations are not reliable.