We have a Microsoft Hyper-V cluster with 3 nodes, now these nodes have something called “Cluster Shared Volumens” which is their disk-pools – an annoying fact about these is that this “shared volume” is not represented as a drive letter so regular monitoring of diskspace does not warn you about low disk space – this particular problem was resolved via a script on our MS-Scom server but that is not “the trick”. The trick is, let’s say that the “Shared Volume” is low on diskspace on a Friday and run out of space during the weekend – now how do you with the least downtime get it back online? Sure you can log in to your san, expand the disk and then to the server and extend the volume, but all of this takes time and is a bit tedious via your smart phone when it happens Saturday night when you are at the cinema with your girlfriend 🙂 The trick is to create a ‘dummy’ file on the shared volume that you simply can delete once diskspace is depleted thus freeing up space in a second – let’s say you create a 5 – 10 or 15 GB file that you can simply delete freeing up 5 – 10 or 15gb of diskspace in a second this could really save your weekend 🙂
Anyhow, it’s quite easily done via a buildin command in Windows;
This command will create a file called emergency;
15gb; fsutil file createnew emergency 15000000000
10GB; fsutil file createnew emergency 10000000000
5GB; fsutil file createnew emergency 5000000000
once you run out of diskspace you simply delete this “emergency” file and immediately free up space causing the least downtime and possibly buy you time to regular business hours, quite simple but yet clever. The single drawback is obvious you ‘waste’ the diskspace you are reserving – but hey diskspace these days cost so little so it’s hardly worth mention.
An advancement of this trick would be to implement automation – so that the ’emergency’ file would be erased automatically if the “Cluster Shared Volume” run out of disk space.