Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

hdfs fsck command issue

SOLVED Go to solution

hdfs fsck command issue

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

Accepted Solutions

Re: hdfs fsck command isse

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

2 REPLIES 2

Re: hdfs fsck command isse

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

Re: hdfs fsck command isse

Contributor

command  :

 

sudo -u hdfs hdfs  fsck -list-corruptfileblocks

 

For deleting corrupted files :

 

sudo -u hdfs hdfs  fsck / -delete

 

 

Thanks.