### Human: Can you tell about NCC Health Check: disk_online_check. ### Assistant: The NCC health check disk_online_check checks if there are offline disks.. The NCC Health Check disk_online_check checks if there are offline or unmounted disks.

Running the NCC Check

It can be run as part of the complete NCC check by running:

nutanix@cvm$ ncc health_checks run_all

or individually as:

nutanix@cvm$ ncc health_checks run_all

You can also run the checks from the Prism web console Health page: Select Actions > Run Checks. Select All checks and click Run.

This check is scheduled to run every 5 minutes, by default.This check generates a Warning alert A101048 after 6 consecutive failures.

Sample Output

For Status: PASS

nutanix@cvm$ ncc health_checks run_all

For Status: FAIL

nutanix@cvm$ ncc health_checks run_all

Output messaging

Check ID101048DescriptionCheck for the offline and unmounted disksCauses of failureA disk may have failed or was manually removed.ResolutionsPlease refer to KB 1536 for more information.ImpactCluster performance may be degraded.Alert IDA101048Alert TitleOffline and unmounted disks in a clusterAlert Smart TitleDisks mounted at mount_paths on CVM cvm_ip are marked offline.			Disk serials disk_serial_number are not mounted on CVM cvm_ip.Alert MessageDisks mounted at mount_paths on CVM cvm_ip are marked offline.			Disk serials disk_serial_number are not mounted on CVM cvm_ip.
NOTE: It has been observed that this check displays a WARNING regarding the CVM boot volumes for NC2 clusters on AWS, at the same time you may also observe the same disks shows as not mounted in PE UI. You can safely ignore this warning and no further actions are needed. Engineering is aware of the issue and is working to have it resolved in future versions of NCC. 
nutanix@cvm$ ncc health_checks run_all
 . Confirm the current disk status and check if the disks are mounted.


	In the case of a single disk, check the output of the following:

	nutanix@cvm$ allssh 'df -h | grep <diskserialnumber>'

	Replace <diskserialnumber> with the serial number of the currently mounted disk.
	
	For multiple disks, check the output of the following:

	nutanix@cvm$ allssh 'df -h | grep <diskserialnumber>'

	Replace diskserialnumber1 and diskserialnumber2 with the serial numbers of the currently mounted disks.	For example, if you enter Z1ZBAHZ0 for disknumber1 and Z1ZBAAEE for disknumber2:

	nutanix@cvm$ allssh 'df -h | grep <diskserialnumber>'
	
	Confirm that there are no issues with Hades or offline mounting paths. If there are no issues, a blank output is generated:

	nutanix@cvm$ allssh 'df -h | grep <diskserialnumber>'
	
	Now, confirm that there are no phantom entries in the disk configuration json files for the disk serial number you enter:

	nutanix@cvm$ allssh 'df -h | grep <diskserialnumber>'

	Replace diskserialnumber with the serial number of the currently mounted disk. For illustration, Z1ZBAAEE and Z1ZBAHZ0 are used here.	The correct output must look similar to the following:

	nutanix@cvm$ allssh 'df -h | grep <diskserialnumber>'
	
	If these conditions are met, proceed to remove the disk IDs with:

	nutanix@cvm$ allssh 'df -h | grep <diskserialnumber>'

	Replace <disk ID to be removed> with the ID of the disk you want to remove.	For example, for disk ID 135646378 and ID 135646379,

	nutanix@cvm$ allssh 'df -h | grep <diskserialnumber>'
	

Wait for the operation to complete. This might take up to 30 minutes, sometimes longer.The Prism web console should no longer contain those erroneous disk entries. Confirm by running this check

nutanix@cvm$ allssh 'df -h | grep <diskserialnumber>'

If a disk is marked or reported as offline and does not have a phantom entry, then the disk is not being utilized by the cluster and might potentially have failed.


	As an additional check, you can manually check the failing disk:

	nutanix@cvm$ allssh 'df -h | grep <diskserialnumber>'
	

Replace sdX with the disk device node you want to check.Run the following command from a CVM (Controller VM) to determine the mapping of drive to disk serial number:

nutanix@cvm$ allssh 'df -h | grep <diskserialnumber>'

Run the following command to check based on the above output:

nutanix@cvm$ allssh 'df -h | grep <diskserialnumber>'

    Note: For Hyper-V, smartctl is located on the Hyper-V host.


	From the CVM, run winsh to get into the PowerShell.
	
	From the PowerShell, go to C:\"Program Files"\Nutanix\Utils\
	
	Run the following command for SSD:
	nutanix@cvm$ allssh 'df -h | grep <diskserialnumber>'
	
	

Or the following for HDD:
nutanix@cvm$ allssh 'df -h | grep <diskserialnumber>'


Note: The -a parameter is used in smartctl to list all the stats for SSD or HDD. If you do not use the -a parameter, only the test result as either PASSED or FAILED is displayed. 

You may be able to check with the DiskSerialNumber in the hades.out logs to understand why the disk was marked for removal and when.
For Example, here DiskSerialNumber is WSE02E46  
nutanix@cvm$ allssh 'df -h | grep <diskserialnumber>'
 

For assistance in obtaining and installing a replacement drive, engage Nutanix Support.. ### Human: Now explain this as a Nutanix support agent summarizing the answer step by step. In case, you don't know the answer say - I don't know.