Got it

A Disk Has Bad Sectors and the File Attribute Is a Question Mark

85 0 0 0 0

Hello, everyone! 

I will share with you how to deal with the problem a disk has bad sectors and the file attribute is a question mark.

Symptom

  1. The DataNode instance is abnormal. Log information indicates that some files on the disk cannot be accessed.

  2. After the ll File name command is executed, the returned file attribute is ??.

  3. This fault also occurs in non-HDFS files.

Possible Causes

  1. The disk of the DataNode has bad sectors.

Fault Locating

  1. Access the service instance and determine the fault node.

  2. Log in to the node using PuTTY and run the following command (/export/data1 is the data directory of the DataNode):

    ls -lR /export /srv 1>/dev/null

    1_en-us_image_0228249178.jpg

    According to the command output, the file system of /export/data2 is damaged.

  3. Run the following command:

    ls -l /export/data2/dfs/data/current/BP-1450212980-210.X.X.12-1461640104094/current/finalized/subdir1/subdir29/

    1_en-us_image_0228249179.jpg

    Question marks are displayed for some files.

  4. Run the df -h command and find the disk to which /export/data2 is mounted. In this example, the disk is /dev/mapper/VG_SR5S5-ExportData2.

    1_en-us_image_0228249183.jpg

Solution

  1. Run the following commands:

    cd

    umount  /export/data2

    xfs_repair  /dev/mapper/VG_SR5S5-ExportData2

    mount -a

    NOTE:

    1. This command is for your reference only.

    2.  Please call the operating system and hardware team to deal with this problem.

  2. If the following information is returned when the umount command is executed, go to FusionInsight Manager and stop the faulty DataNode instance.

    1_en-us_image_0228249185.jpg

  3. If the problem persists, run lsof | grep /export/data2 to view the process that is using the directory. If it is not a key process, kill it.

  4. Restart the service (if you have stopped it in the preceding operations). The service is restored.

  5. Check the NameNode list. The node is in the normal status.


We warmly welcome you to enjoy our community!

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.