Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

hdfs fsck command issue

avatar
Explorer

Hi 

 

When i run  hdfs fsck -list-corruptfileblocks it is saying super user privilege is required .I am logged in as root user .Any idea what could be the reason .

 

 hdfs fsck -list-corruptfileblocks

 

Access denied for user root. Superuser privilege is required
Fsck on path '/' FAILED
FSCK ended at Wed Mar 25 19:42:40 SGT 2015 in 0 milliseconds
Access denied for user root. Superuser privilege is required
Fsck on path '/' FAILED
FSCK ended at Wed Mar 25 19:42:40 SGT 2015 in 0 milliseconds
Access denied for user root. Superuser privilege is required
Fsck on path '/' FAILED
FSCK ended at Wed Mar 25 19:42:40 SGT 2015 in 1 milliseconds
Access denied for user root. Superuser privilege is required
Fsck on path '/' FAILED
FSCK ended at Wed Mar 25 19:42:40 SGT 2015 in 0 milliseconds
Access denied for user root. Superuser privilege is required
Fsck on path '/' FAILED
FSCK ended at Wed Mar 25 19:42:40 SGT 2015 in 0 milliseconds
Access denied for user root. Superuser privilege is required
Fsck on path '/' FAILED
FSCK ended at Wed Mar 25 19:42:40 SGT 2015 in 1 milliseconds
Access denied for user root. Superuser privilege is required
Fsck on path '/' FAILED

1 ACCEPTED SOLUTION

avatar
Mentor
The superuser for HDFS is 'hdfs' in CDH installations. Please run the
command as the 'hdfs' user instead.

View solution in original post

2 REPLIES 2

avatar
Mentor
The superuser for HDFS is 'hdfs' in CDH installations. Please run the
command as the 'hdfs' user instead.

avatar
Contributor

command  :

 

sudo -u hdfs hdfs  fsck -list-corruptfileblocks

 

For deleting corrupted files :

 

sudo -u hdfs hdfs  fsck / -delete

 

 

Thanks.