Problem:

Recently I noticed running out of space on one of Hyper-V host. There was only ~10% free space. Couple of VM was placed out of clustered storage, on local RAID.

But what was strange, this VM has ~100 AVHDX files and 1 main VHDX file, but there was no checkpoints!

Automerge should start automatically, but it doesn’t. So let’s try on my own.

 there are about 100 AVHDX files!

 

but there is no any checkpoint in Hyper-V MMC

 

Resolution:

  1. Automerge : should start automatically. Delete checkpoints, then poweroff VM.
    In my situation, there was not any checkpoint, so automerge didn’t start.
  2. Merge files manually through Hyper-V : Hyper-V MMC -> edit disk -> locate latest AVHDX file (by date modification). Repeat procedure until you achieve one VHDX file.
    In my situation (~100 AVHDX files) it would take too long :) 
  3. Merge files manually – without Hyper-V :
    a) download VHDUtils from here
    b) extract makevhd.exe file to VM AVHDX files localization
    c) on cmd or PS run command:
    makevhd -d   merged-disk.vhd   0   latest-modified-avhdx-file.avhd
    d) wait, there will be no progress bar
    e) when merging has completed – attach VHDX to VM.
    You may have “Cannot change disk since a disk merging is pending” warning – just remove HDD from VM, apply VM settings, and then re-add newly merged VDHX file to VM.

That’s it.

Scenario:
3-node cluster has access to one disk with GFS/GFS2 filesystem.

  • node1 – offline
  • node2 – offline
  • node3 – online

Node3 waits for other nodes to connect. Unfortunately, node2 and node 3 are phisically damaged.


Problem:
Cluster cannot start and mount GFS/GFS2 filesystem.
Console shows errors:

can't connect to gfs_controld: Connection refused  
can't connect to gfs_controld: Connection refused  
gfs_controld not running  
error mounting lockproto lock_dlm

or

gfs_controld join connect error: Connection refused
error mounting lockproto lock_dlm


Resulution:
Convert GFS/GFS2 cluster to work as a standalone server.
To do this we need to change superblock locking protocol of GFS/GFS2 filesystem.


Check what is current type of locking protocol:

 

gfs_tool sb <device> proto
gfs2_tool sb <device> proto

ex.:
gfs_tool sb /dev/sdb proto
gfs2_tool sb /dev/sdb proto


Change superblock locking protocol to lock_nolock:

gfs_tool sb <device> proto lock_nolock
gfs2_tool sb <device> proto lock_nolock

ex.:
gfs_tool sb /dev/sdb proto lock_nolock
gfs2_tool sb /dev/sdb proto lock_nolock

Restart cluster service or whole server. Disk should mount successfully.
Now you may start to run backup :)


To revert superblock to previous settings, lock_dml, set:

gfs_tool sb <device> proto lock_dlm
gfs2_tool sb <device> proto lock_dlm

ex.:
gfs_tool sb /dev/sdb proto lock_dlm
gfs2_tool sb /dev/sdb proto lock_dlm

 

Helpful commands:

mount -t gfs2 /dev/sdb /mnt/storage
service cman start
service gfs2 start

How to unlock GPS GoClever Navigator 4330A to operate on Windows CE Core 5.0

GoClever 4330A Front

GoClever 4330A Back

GoClever 4330A Back

1. On PC install ActiveSync
-XP: http://www.microsoft.com/pl-pl/download/details.aspx?id=15
-7: installs automatically on plug&play by windows update

2. Connect GoClever to PC by USB

3. Download and run CeRegistryEditor
http://ceregeditor.mdsoft.pl/index.php?id=3&lang=pl

4. Connect to GoClever

5. Go to registry key: HKEY_LOCAL_MACHINE -> INIT -> LAUNCH50

6. Change entry:
\DataStorage\GpsShell\GpsShell.exe
to
\Windows\explorer.exe

7. Exit from CeRegistryEditor

8. Reset GoClever

While adding some drivers to WDS image you could see error like this:

The following driver could not be added to the image.
There were no changes made to the image. Click Finish to close the wizard.
Error occured while trying to execute command.
Error Code: 0xc1420127

WDS error 0xc1420127 while adding drivers injection

WDS error 0xc1420127 while adding drivers injection

Solution:

  • in regedit.exe
  • find registry key: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WIMMount\Mounted Images\***************
  • export key/key (for backup)
  • delete key/keys
  • restart service :)

There’s a conflict using both libraries, jQuery and Prototype on same page, because both use the same namespace of ‘$’. To fix it we need to know, that Prototype library doesn’t allow too much to change, but jQuery is such flexible, that even supports different namespacing.

Here’s example (one of many solutions):

download (zip as jpg, change extension to zip!!!)

<!DOCTYPE htmlPUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt;
<html xmlns=”http://www.w3.org/1999/xhtml”&gt;

<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ />
<title>jQuery and Prototype conflict – FIX</title>

<!– define Prototype as 1st –>
<script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js”></script&gt;
<!– define jQuery as 2nd –>
<script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js”></script&gt;

<!– script space is default for Prototype, we must invoke jQuery script by: –>
<script type=”text/javascript”>
<!– invoke jQuery: –>
jQuery.noConflict();
jQuery(document).ready(function(){
jQuery(‘div#jQuery’).text(“jQuery script executed !!!”);
});

<!– Prototype (nothing to change, Prototype doesn’t support something similar as jQuery.noConflict(); –>
document.observe(“dom:loaded”, function() {
$(‘prototype’).update(‘Prototype script executed !!!’);
$(‘prototype’).innerHTML;
});
</script>
</head>

<body>
<div id=”jQuery”>jQuery script NOT executed</div>
<div id=”prototype”>Prototype script NOT executed</div>
</body>
</html>

Quote  —  Posted: 11/11/2013 in html, JQuery, php

I was searching couple of days for sending realtime pushing messages for my web app. I turned into this after crash of my cloud-realtime-messages system (cloud hosting with pricing). Here is very simple solution:

http://www.zeitoun.net/articles/comet_and_php/start

download file below and open it with 7zip (it’s archive)

comet-ajax

If you need to use the attribute placeholder in different versions of web browsers, such as IE 7-10, Firefox, Chrome, the problem is IE version lower than 10. This browser does not support attribute placeholder.

To achieve the effect that brings placeholder attribute, you can use jQuery script.

An example of placeholder without JQuery (IE> = 10, FF, Chrome)
http://jsfiddle.net/pybp6/12/
placeholder IE10 works
placeholder IE9 doesnt work

An example of the effect placeholder with JQuery (IE <10, FF, Chrome)
http://jsfiddle.net/pybp6/15/
placeholder works

 

 

 

 

based on http://www.jacklmoore.com/notes/form-placeholder-text/