Monday, July 8, 2013

Disk drive is write protected, Unable to create file with File system error (65535)

Some simptoms:


Unable to create file with File system error (65535)

Whenever I try to create new file in my one of my system drives it is displaying "Unable to create file xxxx.txt". File system error(65535) Previously I was able to create/delete files.

Now every thing related to file operations are getting failed (create/delete/modify).

For file modify following error message is displayed "The drive cannot fine sector requested".



Second hard drive says write-protected
I've got a new 2008 enterprise terminal server. I've installed all my apps to the 2nd hard drive. Now for no reason, I can't write to the drive and my apps can't either as they all crash as soon as they need to.

I get this exact error when simply trying to create a directory in the root of the drive:

"The disk is write-protected.

Remove the write-protection or use another disk."

I'm logging in as the local admin, domain admin makes no diff. I've also given full permissions to "everyone" with no luck. How the heck can I fix this bugger?




Solution:
It could be that the ReadOnly flag is on, do the following


on cmd prompt launch "diskpart.exe"

on the diskpart prompt, do the following

LIST DISK 

This will give you a list of all disks in your system
Note down the number of your problem disk, then do the folloiwng

SELECT DISK x 

Where x is the number of your problem disk, then do the following

DETAIL DISK 

This will list all the details of your problem disk
Check if the ReadOnly flag is set to Yes

If the ReadOnly flag is set to Yes, do the follwing

ATTR DISK CLEAR READONLY 

This should clear the flag on the disk, please retry your disk operations

If ths does not solve it, we have another flag on the volume, same command, but now on volume:

LIST VOLUME  
SELECT VOLUME x  
DETAIL VOLUME  
ATTR VOLUME CLEAR READONLY

Wednesday, July 3, 2013

How to remove ESXi from domain (AD)

This is how to leave a domain for ESX server (for whatever reason you have).


1) Put the ESX in maintenance mode
2) Go to Configuration > Authentication Services
3) click on Properties
4) On the Domain Settings, click button Leave Domain
5) Exit maintenance mode

on the error event "Leave Windows Domain: The operation is not allow in the current state", try to reboot the ESX and repeat the steps. In my case, it helps.


PowerCLI command to see which ESX is still authenticated to AD:-

Get-VMHost | sort | Get-VMHostAuthentication | select vmhost,domain,DomainMembershipStatus,TrustedDomains | ft -a