Tag Archives: windows

Windows 8 Storage Spaces?

Finally Windows may get a file system that adds features that have been around for years in Linux and Unix.

The state of the art in file system design could arguably be ZFS which is used in Solaris and a few other places.

Storage systems seem like very complex engineering systems. I wonder if Microsoft would have just been better off not reinventing the wheel and just licensing ZFS technology or something else? Just search for user horror stories regarding any of the storage improvements on Windows, from drive extender, encryption, WHS, etc.

And what ever happened to the object file system, the DB based file system?

Storage Spaces is somewhat like ZFS, although it has no deduplication and lacks other ZFS features. However, it is a start – and Microsoft will probably add features such as snapshots, replication, deduplication, and, maybe, compression. El Reg also thinks that there could be a Hyper-V virtualisation angle to this – and more is to come. — http://www.theregister.co.uk/2012/01/07/windows_8_storage_spaces/page2.html

Update
Jan 17, 2012: Ah, so Microsoft is working Resilient File System (ReFS).

Microsoft mentioned all the important keywords when promoting ReFS with words like resilience, availability and the use of storage pools, something made popular by Sun’s – and now Oracle’s – ZFS.
Source: The Inquirer (http://s.tt/15gRk)

Further Reading


VOWS “Winter’s Grave” OFFICIAL video

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

Use SED or Groovy to print paths, split with line feeds

Yea, this is easy, IF you use SED much. Now I updated this post with a Groovy approach, since this is easier to install where cygwin may be prohibited.

Using SED
With cygwin installed, SED, the stream editor is available. In a command shell, execute:

set path | sed s_;_;\n_g

Update: fixed the sed above, was missing the backslash before the n.

Explanation

  1. set path will print the Windows path. File path entries are separated by “;”.
  2. sed will invoke the cygwin installed linux SED command. Cygwin\bin is part of the executable path.
  3. “s” indicates the substitute command
  4. “_”, the underscore is used as the delimiter to each part of the substitution. One can use other characters for the delimiter.
  5. “;” is the regular expression to use for a match.
  6. “;\n” is the string to substitute with. \n is the crlf.
  7. “g” is the substitute flag, global replacement

No doubt there are more direct ways of doing this. Using PowerShell would be the most appropriate on Windows if it is available.

Using Groovy
Another approach is using the Groovy language, which has a command line mode using the “-e” switch:

set path | groovy -e "System.in.text.split(';').each{ println it}"

Explanation
The output of set path is piped to an inline Groovy script. The script uses the “text” value of the System.in standard input stream. ‘text’ is some magic Groovy dust. The Groovy development kit (GDK) extends Java io streams with a method, textO(), that gets the string value of the stream, like read a file. This is available as a java bean getter method, which again via magic is available as a field, “.text”. The string is then split, then a closure “each” is used to print each line, passed to the closure with the default variable “it”.

Example
If your path is: C:\fee;d:\fi;c:\foo;fum

The result would be:
C:\fee;
d:\fi;
c:\foo;
fum

You can, of course, pipe these together to allow finer control. However, the high level language makes for very long winded code, for example, find all properties in Java system properties that have the word ‘Java’ or ‘java’:

groovy -e "System.properties.each{println it}" | groovy -e "System.in.eachLine{ if(it.find('[jJ]ava')) println it}"

Better would be, just putting the filtering inside the closure:

groovy -e "System.properties.each{ if(it.key.find('[jJ]ava')) println it}"

Or as a script:

System.properties.each{ 
     if(it.key.find('[jJ]ava')){ 
        println it
     }
}

Consult the Groovy documentation for further Groovy syntax and idioms to make the above even better.

References

  1. GNU sed
  2. Sed – An Introduction and Tutorial by Bruce Barnett
  3. SED, stream editor
  4. PLEAC-Groovy
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

VirtualBox 4.1.4 on Windows 7 with Ubuntu guest

Installing over older version was not that hard this time.

First I created snapshots of each VM in my VirtualBox. Next create a restore point for Windows 7, just in case VB destroys stuff.

Then I downloaded and installed the new VirtualBox 4.1.4. It locked up. Went thru some stuff, showed a full taskbar but nothing. No exceptions or suspicious threads in Windows’s Proc Explorer. Install wouldn’t cancel either, had to kill it. Retried but it said there is another install going on. Did not see one in task list.

I rebooted Windows PC. Tried to start the existing Ubuntu VM, but it failed, one of the virtual network drivers is hosed. Shucks. Hmmm. Maybe VirtualBox will install again? This time I right clicked on the downloaded file and choose “Run As Admin”. It installed!

No 3D Unity interface. Guest Additions not updated. Clicked on device menu and install Guest Additions, nada!. I keep forgetting you have to install it manually for a Linux guest. For this I followed the VirtualBox user manual.

First do the steps in 4.2.2.1.1. I ran those using sudo. Second, follow steps in 4.2.2.1. Again using sudo. Shut down VM. In the VirtualBox gui, change the Ubuntu display to 3D. Start Ubuntu VM.

Success, I have the Unity interface again.

Updates

  • On this system I updated to Ubuntu 11.10 (codenamed Oneiric Ocelot). Works fine.

Environment
VirtualBox 4.1.4.
Host: Windows 7 Professional 64bit.
Guest: Ubuntu 11.10 codenamed “Oneiric Ocelot”, Unity desktop.
PC: AMD quad with 8GB ram.
Brain: of carbon-based life form, Earth, Homo sapiens sapiens.


Han Solo and The Princess (Love Theme) from “Empire Jazz”

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

Un-uninstallable software

Imagine if you bought a vacuum cleaner, it broke, but you couldn’t throw it out. It became bad hardware, malware, ruining your life, sneaking around, tripping you on stairs, eating your food, and checking out your spouse.

Software that you can’t uninstall is just as bad. Why don’t reviews deal with this aspect of any software?

I don’t know how bad it is in Linux and Mac world, but just from my own experience, it is almost a given in the Windows world. You either live with old stuff you don’t use (and could even be taking up CPU and storage bandwidth) or you attempt to follow arcane procedures dealing with the Registry and advanced Yogic postures while rebooting hundreds of times.

Maybe we should reverse charge the vendors and yes even open source organizations a fee for using our systems as backup installations. Is un-uninstallable software malware, criminal?

This is mostly a payware issue. For example, I have some trial software that is uninstallable, like Acronis backup thing. But, this is not just a payware thing. I once installed the JDK 1.6.0.23 on a system. The install folder got wiped accidentally, but now it won’t reinstall, even after going through the Registry to clean out old references. Can you imagine the “normal” user, the ones who use the DVD tray for a cup-holder, what they go through?

Further Reading
Faustian descent into backup hell: A play in two acts

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

Debugging: copying .git folder hangs Windows Explorer

Windows Explorer started hanging when using copy & paste of folders. I noticed that it only involved folders that had a “.git” subfolder.

Symptoms

  • Copy a folder and explorer does not refresh; you have to hit F5.
  • After the manual refresh, click on a folder and the explorer gets an hour glass.
  • The explorer.exe CPU usage reaches 50% and higher.
  • Only happens when a subfolder was named “.git”.
  • .git folder could even be empty.

Easy approach unsuccessful
I uninstalled Git and TortoiseGit then restarted the system. Still happening. Hmmm, that should have removed everything. Nope, I looked in the Registry and TortiseGit was still hanging around. I removed all traces and then even used ShellExView tool and could not find any shell extension that could be doing this. Using that tool I disabled all non-Windows shell extensions. Still happening.

More tools to help
This happened a month ago so I don’t remember all the steps I took. I used some of the SysInternals tools but they didn’t help much; you need a lot of internal Windows details to really use some of them.

However, I think it was using the Process Manager and looking only at file activity that all the info finally gave me a clue.

Progress

5:23:14.4666723 PM	explorer.exe	5096	ReadFile	C:Documents and Settingst16205Start MenuLocal Disk (C)target.lnk	SUCCESS	Offset: 0, Length: 299
5:23:14.4668257 PM	explorer.exe	5096	QueryInformationVolume	C:Documents and Settingst16205Start MenuLocal Disk (C)target.lnk	SUCCESS	VolumeCreationTime: 9/15/2009 8:47:39 AM, VolumeSerialNumber: 64B6-6315, SupportsObjects: True, VolumeLabel:

It seemed to be hanging at that point!

Solution
I looked in the Windows Start Menu list and saw that I had placed a link of the C: drive there. Not a junction or anything fancy, just a drag and drop of a shortcut (I think). I removed that link and the problem was solved.

Back to Git
Reinstalled Git and all is fine, knock on wood.

No explanation yet
Not really debugging, just floundering with a purpose. But, why would this only effect folders named “.git”, when even Git is not even installed. Strange.

OS
Windows XP Professional

Git
TortoiseGit
mysysGit

Tools
WhatIsHang v 1.10:
ShellExView v 1.66
Process Explorer v15.04
Process Monitor v 2.96
brain

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

How to search using Windows 7 file explorer?

When it comes time to search for a file on the local or networked file system you would think win7 would have advanced capabilities.

keywords: Windows 7, win7, search, keyword search

Updates
Nov 7, 2015: Still abhor Windows 7 search. I just had to search for a text in XML files. I had to use NotePad++. How bad can something be that even a text editor offers better and faster searching? Does Windows 10 “fix” this?


It does and it doesn’t.  For what it does have, it is not exposed in the GUI.  Yup, a graphical operating system interface does not present an easy way to do advanced searching.  Anyway, below are links to articles that show you how to get access to this search capability.  Many books supply the missing information too.

I’m surprised (not) that Windows help doesn’t really give the information. The way to do advanced Windows File Explorer searching is to use the “Advanced Query Syntax” (AQS). Bah! Why not use the industry standard reqular expressions?

Ok, I skimmed the docs below and I still don’t like it. How would I search for a file that has “yup” somewhere in its name and also has the text “foiled” but was also created a certain time period? In Windows XP that would be easy. In Linux I would use the “find” command and all its inscrutable switches.

Windows needs to have its file search redesigned. If I navigate to a folder, I want to be able to search for file content, just like every prior Windows version before it (I skipped Vista). Yes, I know you can change options to always search content even in non-indexed locations. Never mind all that indexing nonsense, Windows is a not a Mac.

If you want to use real search maybe it has to be by an external tool. Like Agent Ransack.

Links

  1. Advanced tips for searching in Windows: http://windows.microsoft.com/en-us/windows7/Advanced-tips-for-searching-in-Windows
  2. Advanced Query Syntax (AQS): http://msdn.microsoft.com/en-us/library/aa965711%28v=vs.85%29.aspx
  3. Search Network Folder By Filename
  4. Exploring Windows 7’s New Search Features (Part 3): http://www.windowsnetworking.com/articles_tutorials/Exploring-Windows-7s-New-Search-Features-Part3.html
  5. Query Syntax:  http://www.microsoft.com/windows/products/winfamily/desktopsearch/technicalresources/advquery.mspx
  6. Exploring Windows 7’s New Search Features (Part 1): http://www.windowsnetworking.com/articles_tutorials/Exploring-Windows-7s-New-Search-Features-Part1.html
  7. Exploring Windows 7’s New Search Features (Part 2): http://www.windowsnetworking.com/articles_tutorials/Exploring-Windows-7s-New-Search-Features-Part2.html
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.