In the HDFS architecture the Name Node gets the meta data from the edit logs and the Fs image.Name node stores the Meta data in both disk and in memory.
Fs image stores the complete snapshot of the file system. All the details regarding a file i.e. path,owner,block size,permission,replication Factor etc. consist of meta data and all these details are maintained in Fs image.
Any changes to the file done i.e. creation,deletion etc are not directly updated in Fs image immediately it is stored in Edit logs.
Upon restarting, the edit logs are copied to the FS image and these details are then fetched by name node from disk to the memory.