Support Questions
Find answers, ask questions, and share your expertise

Delete fsimage file

New Contributor

The disk where the ActiveNamenode files are is full. There are old fsimage files. Can I simply delete these old fsimage files?

1 REPLY 1

@Jose Correa

Technically I should store only last two fsimages in the directory. May I know what you are referring to old fsimages means?

You can delete them if they haven't been updated for days, but I would suggest better check with support team if that cluster has critical data.

Example:

Here is an example of an HDFS metadata directory taken from a NameNode. This shows the output of running the tree command on the metadata directory, which is configured by setting dfs.namenode.name.dir in hdfs-site.xml.

data/dfs/name
├── current
│ ├── VERSION
│ ├── edits_0000000000000000001-0000000000000000007
│ ├── edits_0000000000000000008-0000000000000000015
│ ├── edits_0000000000000000016-0000000000000000022
│ ├── edits_0000000000000000023-0000000000000000029
│ ├── edits_0000000000000000030-0000000000000000030
│ ├── edits_0000000000000000031-0000000000000000031
│ ├── edits_inprogress_0000000000000000032
│ ├── fsimage_0000000000000000030
│ ├── fsimage_0000000000000000030.md5
│ ├── fsimage_0000000000000000031
│ ├── fsimage_0000000000000000031.md5
│ └── seen_txid
└── in_use.lock

fsimage_end transaction ID – This contains the complete metadata image up through . Each fsimage file also has a corresponding .md5 file containing a MD5 checksum, which HDFS uses to guard against disk corruption.

Hope this helps.

; ;