Certifications and honorsCategoriesCalendarLast Google search to here |
Sunday, September 30. 2007Demystifying the WinSxS directory in Windows XP, Vista and Server 2003/2008Trackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
One important thing I forgot to note in those two articles... When the servicing stack installs a component (during setup, optional component install, OOB install, whatever), it must project (our term) the files of that component out into the system so they can be used. Consider a clean install of Vista. The component carrying kernel32.dll appears in the WinSxS store, as does the file itself. On Vista, an optimization for projection is done by creating a hard link from the winsxs\[..]\kernel32.dll file to windows\system32\kernel32.dll. Hard links are a functionality of NTFS by which two files in the filesystem point at the same blob of bits on the physical volume. (Note: hardlinking of files is only an optimization - there are times when files must be projected by copying them.)
Using "dir /s" to compute the size of the winsxs directory will report every file and its size. Unfortunately, "dir" doesn't know how to deal with hard links, so it reports the total file size by summing the size of each name, not summing the size of the used disk space. This isn't a bug in dir, per-se. In NTFS, there is no such thing as the "first" link to a file, so there's no way to determine whether or not a file's size should be included in a scan. Dir (and other tools that use FindFirstFile/FindNextFile and sum the returned file sizes) err on the side of caution. Using Explorer (open explorer on "Computer", right-click the system volume, choose properties, go get some coffee while it scans) should make this better, as it's aware of things like hard links, symbolic links, reparse points, etc. One of these days I'll write this up in a post as well. Alternatively, you can use "chkdsk" to compute the difference between your volume's total size and its free space. On the "move it out of windir" point - the stuff in there that's part of Windows should stay in %windir%. The stuff that's not in-the-box (out-of-band releases, 3rd-party side-by-side components, IHV-delivered drivers) /could/ move out, but then the question is where should it go?
That's all great information! It clears up a couple of questions I was tempted to ask you at some point.
As for "move it out", I guess I really don't have a good answer for that one. It is a complex issue if you want to draw the line in the sand on what is application and what is operating system inside the folder. I'm mainly interested in redirecting the folder much like you can redirect MSOCache and CSC files, but I understand the rationale behind keeping it in %windir%.
Windows explorer even in Vista SP1 isn't aware of ntfs hard links. Symbolic links yes, but not hard links. So if MS really uses hard links in the windows dir, the explorer properties window will show more space consumption then there is.
Can i move this folder to another drive and leave a Junction Point instead of it after modyfing the registry ?
(I've done this with "Program Files" Folder) And also, i'm getting an error when adding Features to vista (Like Telnet support) could it be a corruption in the winsxs folder ? Or
I have found that a user can move the winsxs directory (do a google search for EEEpc move winsxs directory to find a tutorial.) I have tried it myself and it seems to work on any non sp1 vista install. there are 2 issues. 1. Updates will NOT work on the machine as they are hard coded to the directory in a way that the junction stops. and 2. Vista SP1 wont install if the winsxs dir is moved, but if you move the winsxs folder on vista that already has SP1, it will blue screen as there is a direct link to the winsxs dir as well.
You can try this and your case may be different, just make a ghost or backup of your machine first! |
Useful linksSearch this blogCreative Commons RestrictionsTranslate this pageGoogle Links |