-
Notifications
You must be signed in to change notification settings - Fork 18.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Windows] windowsfilter folder impossible to delete #26873
Comments
ping @jstarks |
We have a tool for this... @jhowardmsft can you help? |
It's here: https://github.com/jhowardmsft/docker-ci-zap You have to compile it, then run: .\docker-ci-zap.exe -folder "C:\ProgramData\docker" |
Thanks! Ill have to setup golang on my server host - but thats better than having to reformat. |
Note it is a REALLY dangerous utility. It can do some serious damage. Use with caution, no warranty on misuse or otherwise etc. No plans at all to include it in docker. |
Gotcha - I'll keep an eye out for what command exactly caused this error state then |
I a going to close this as it seems resolved, hopefully other people needing the dangerous powertools will find it. Feel free to continue discussion if there are further problems |
I had the same problem, I resolved by simply take the ownership of the folder, then add myself with full control and flag to do the same on all the child with inheritance enabled. Then I simply deleted the folder as usual. |
Using WIndows 10...
|
In my experience you have to nuke the entire folder you can't delete a On Nov 4, 2016 18:34, "Mark Pitman" notifications@github.com wrote:
|
Thanks for the tip, but I get the same error when I do that. For now I am renaming the directory and reinstalling docker. I'd still like to free up the space though, so if anyone else has any ideas, I'd appreciate it! |
Also make sure the docker service isn't running - and sometimes i've had to switch it to manual and restart the computer. (Manual so that it wont start on boot) |
Docker has been uninstalled. I set chkdsk to run on next boot and rebooted my system. Then I ran the docker-ci-zap tool against the c:\ProgramData\Docker directory and it has deleted everything. Hopefully this thread will help someone else! The reason I started trying to delete these folders in the first place was because I was having problems pulling the microsoft/windowsservercore image and it was complaining about files in that path. I uninstalled docker, deleted the whole c:\ProgramData\Docker directory, re-installed Docker and everything was peachy. Then I started running into problems again, so I thought I could do that whole process again, but this time I couldn't just delete the directories. Hopefully some of this stuff gets worked out over time. |
You probably had a container still running, or a VHD still mounted as a result. From PowerShell, get-computeprocess | stop-computeprocess might have helped. Or going into diskmgmt.msc and unmounting any possible left over mounted VHDs. |
trying this as well: is it because I deleted some files manually from windowsfilter? |
well, it left just an empty windowsfilter dir which I could then delete from explorer. weird. |
@clarity99 Very unlikely. Are you elevated - you would need to be. Could be locked files |
yes, i was in an elevated prompt. docker was already uninstalled. |
Don't delete that folder! It has links to files outside of that folder. You will end up destroying your OS. Just end up restoring OS from backup. |
No, it doesn't. |
Yes it does.
|
Did you manually create that in some way? Edit: To add, the CI servers docker-ci-zap this all the time, have been since day 1 and I've never seen any issue of OS corruption. |
Of course not
…On Dec 1, 2016 7:01 PM, "John Howard" ***@***.***> wrote:
Did you manually create that in some way?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#26873 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMkQNLpwJeKj7-zNQWpBFrJEEWjm1LLEks5rD23jgaJpZM4KFXuY>
.
|
docker-ci-zap will not follow symlinks, so this is fine. |
Some people in this thread and others on internet recommended to use explorer or rmdir to delete that folder which is what I tried and end up deleting almost entirely my profile off Windows. I was wondering why I keep getting access denied in deleting some folders while now I understand because it was actively used by user processes. Not sure how I end up with those but I did not do anything funky. |
There is some cyclic recurrance looks like happening as well in those links as well
|
Unfortunately general suggested solution for "Access denied" while deleting folders is rimraf or explorer taking forceful ownership. Which IS a definite bad idea for this folder because of the symlinks. |
I'm concerned that those links per docker/MS shall not be there, more then accidentally deleting them. Unless I misunderstood comment from @jhowardmsft |
I see. Yes, unfortunately, if you do delete via something that follows symlinks/junction points, you're going to have a bad time. I don't have a great solution to that problem other than "don't do that"... We are working on ensuring that it is much harder to get into a situation where you need to delete this folder. |
doh! ...if anyone else gets the msg .. I got it when I put docker-ci-zap.exe on my E: drive :-( ... so ..put it on C: before executing ... and it works ! ;-) |
This worked for me! I reclaimed 99.6 gigs of space. Download Stop Docker Run Start Docker |
so there is no other way yet to delete those folders?
runs indeed also into errors |
@rs38 please see the above comment: #26873 (comment) (but be careful when using that tool) |
the link does not work. "so there is no other way yet than docker-ci-zap.exe to delete those folders?" |
The problem is that you need backup privilege to delete those files - similar to the |
Issue is not with permissions really but due to the hard links to other files in filesystem and normal explorer/cmd/powershell delete operation will follow a link and try to delete OS system files. |
great answers with plausible background info. thanks guys! |
It's worth pointing out that the program returns a somewhat cryptic error if you have a trailing backslash on the folder path. With or without quotes didn't matter (presumably it would if you had spaces in the path, but clearly most of us aren't dealing with that here). Error: PS C:\> .\docker-ci-zap.exe -folder C:\ProgramData\docker\
time="2017-09-29T11:49:04-07:00" level=error msg="hcsshim::DestroyLayer - Win32 API call returned error r1=0x8007007b err=The filename, directory name, or volume label syntax is incorrect.id= flavour=0"
ERROR: hcsshim::DestroyLayer - Win32 API call returned error r1=0x8007007b err=The filename, directory name, or volume label syntax is incorrect.id= flavour=0
PS C:\> .\docker-ci-zap.exe -folder "C:\ProgramData\docker\"
time="2017-09-29T11:50:24-07:00" level=error msg="hcsshim::DestroyLayer - Win32 API call returned error r1=0x8007007b err=The filename, directory name, or volume label syntax is incorrect.id= flavour=0"
ERROR: hcsshim::DestroyLayer - Win32 API call returned error r1=0x8007007b err=The filename, directory name, or volume label syntax is incorrect.id= flavour=0 Success: PS C:\> .\docker-ci-zap.exe -folder C:\ProgramData\docker
INFO: Zapped successfully
PS C:\> .\docker-ci-zap.exe -folder "C:\ProgramData\docker"
INFO: Zapped successfully |
Downloading
I had to run |
I uninstalled docker and tried to remove C:\ProgramData\Docker with explorer and couldn't remove it,. I rebooted thinking that would clear any running processes up, but I still couldn't remove the Docker directory. So I ran into this thread and then tried running docker-ci-zap.exe -folder "C:\ProgramData\docker" in an administrator cmd tool window and got this error message.
I don't see any docker processes running (and I rebooted since I've removed docker). I ran the PowerShell command get-computeprocess as administrator and it returns nothing and I can't see any virtual mounts and there doesn't seem to be any docker service processes. Any Ideas? I just can't get rid of the C:\ProgramData\Docker folder. Edited to add (to my shame) the following... |
Point of curiousity...Why not start in safe mode or repair mode with cmd as admin. Then rmdir? |
Because #26873 (comment) |
I eventually realised my problem was that Right-click on the Docker tray icon and Switch to Windows containers... after which If you've checked |
For anyone google ing and landing here, this enabled me to delete |
How is this still not fixed? |
The only reliable way I found is to rename each of the folders with
Source https://stackoverflow.com/a/66590524 Then restart docker-desktop a few times. Only a couple get deleted upon restart of docker-desktop |
still isn't fixed. |
my Win10 process for deleting the windowsFilter folder is to format the drive:
obviously this is super cumbersome, but for me beats running a tool that comes with huge CaveatEmptor warnings, worrying about the behavior of hard-links, etc. |
The zap tool is not working for me. My docker folder is on
I do not have docker installed any longer as I uninstalled it. UPDATE: Looks like you need to make sure Hyper-V platform windows feature is enabled, before you can execute the zap tool - it runs after I did that. |
TLDR: Docker Desktop needs a direct in-program way to change the storage location of images and, at the very least, warnings and guidance about clearing old images when when switching where these images are stored. Probably similar guidance when uninstalling. If not remove the images for us, it should give us guidance about how to do it right. My experience: I wanted to clear the images from my primary drive and move them to a secondary. I set the "graph" path and restarted Docker. Then Cut/Paste of the Docker program data failed so I just decided to delete it. That failed with permission issues. I then used the I then ran a few deletes from the explorer and then realized it would be faster using My OS doesn't seem to be bricked and I haven't noticed problems yet, but I have clearly altered permissions and ownership on a ton of files unintentionally and I cannot find documentation where all these hard links go and why. My terminal buffer was not long enough to go back and see all the damage. Hard for me to know what potential security holes it has opened up. I'm wondering if I need to reinstall windows just to be safe or if it only affected user files like ProgramData files (it definitely changed ownership of some ProgramData files not in Docker). |
I've been running TP5 for several months on 3 machines - I noticed the hard drive filling up due to the amount of images laying around. Following some other posts I used
docker rm -v $(docker ps -q)
anddocker rmi $(docker images -q)
and similar to clean the disk. But I ended up breaking docker.When I try to start a container now I only get Win32: Access is denied
I believe this happened because I broke some sym links in the docker store aka C:/programdata/docker/windowsfilter - perhaps these commands accidentally deleted a chunk of files that are still needed thereby screwing everything up.
Thats my theory. But the bug I am reporting is - I can't reset docker. So this happened, I just want to delete everything from docker - everything under C:/programdata/docker and restart the service in a fresh state. But I can't because windowsfilter is a sea of "Access denied" errors.
I've tried taking control of all the files in several ways, using several tools including rimraf and fsutil, powershell, cmd - all of it fails.
Which leaves the only option to "fix" docker to reformat the machine...
So tldr: Users should be able to "uninstall" docker and restore the host to a "clean" state - which is not possible solely because of windowsfilter permissions
The text was updated successfully, but these errors were encountered: