1)NAS stands for Network Attached storage which is a file-level computer data storage server connected to a computer network providing network access to heterogeneous group of clients
HDFS stands for Hadoop distributed file system which is a java based file system that provides scalable and reliable data storage and is designed to span large clusters of commodity hardware.
2)In HDFS data blocks are distributed across the local drives of all machines in a cluster whereas in NAS data is stored on a dedicated server.
3)HDFS includes commodity hardware which will be cost-effective, but NAS is a high-end storage device which is expensive.
4)It includes features like rack-awarenessHDFS, data locality which makes it more scalable and effective then NAS.