Kroko Just another WordPress weblog

June 19, 2014

VMWare vSphere ESXi v5.5 Datastore problems

Filed under: Linux — admin @ 2:41 pm

I found an error with vmware esxi. Message from windows client is: Call “HostStorageSystem.ComputeDiskPartitionInfo” for object “storageSystem” on ESXi “x.x.x.x” failed.

I have the issue because the disk that I was using had existing partitions (a Linux swap partition and a Linux MD5 RAID partition).  I had to manually delete the partitions logged in as root to my ESXi box, even though ESXi said it would do that for me.

Useful commands:

# esxcfg-scsidevs -l

this lists the disk devices, the device file will be /dev/disks/<NAME>

output looks like:

t10.ATA_____ST3320620AS_________________________________________6QF1PZXB
   Device Type: Direct-Access
   Size: 305245 MB
   Display Name: Local ATA Disk (t10.ATA_ST3320620AS_6QF1PZXB)
   Multipath Plugin: NMP
   Console Device: /vmfs/devices/disks/t10.ATA_____ST3320620AS_________________________________________6QF1PZXB
   Devfs Path: /vmfs/devices/disks/t10.ATA_____ST3320620AS_________________________________________6QF1PZXB
   Vendor: ATA       Model: ST3320620AS       Revis: 3.AA
   SCSI Level: 5  Is Pseudo: false Status: on
   Is RDM Capable: false Is Removable: false
   Is Local: true  Is SSD: false
   Other Names:
      vml.010000000020202020202020202020202036514631505a5842535433333230
   VAAI Status: unknown

 

Easy solution:

Now can recreate partition table for that disk with a blank one:

for MSDOS run:

 ~ # partedUtil setptbl /dev/disks/naa.600508b1001c95a3d3a1f9455babd2d0 msdos

msdos

0 0 0 0

for HDD larger than 2TB use GPT:

~ # partedUtil setptbl /dev/disks/naa.600508b1001cfb4c4b4ed4e1eee52e25 gpt

gpt

0 0 0 0

Now you have a fresh drive. Try to add again in datastore.

 

Alternative solution:

# partedUtil get /dev/disks/t10.ATA_...

this shows the partitions on the device

output looks like:

38913 255 63 625142448

1 63 514079 130 128

2 514080 625137344 253 0

this disk has 2 partitions, numbers 1 and 2

# partedUtil delete /dev/disks/t10.ATA_... 2

deletes partition 2

# partedUtil delete /dev/disks/t10.ATA_... 1

deletes partition 1

April 21, 2014

Cpanel Disable mod_security2 for a single domain

Filed under: Cpanel — admin @ 10:10 pm

Mod_security is an open source Apache module.

This can be considered as firewall for web applications. It secures the system from the attackers.

The following steps can be used to disable mod_security2 rule for one domain in cPanel servers.

1. Make the directory “/usr/local/apache/conf/userdata/std/2/username/domain.com

2. Create a file “vhost.conf” in the above location

3. Add the following lines :

———-

<IfModule mod_security2.c>

SecRuleEngine Off

</IfModule>

———-

To disable mod_security2 for a particular location :

———

<LocationMatch specify_the_path_here>

<IfModule mod_security2.c>

SecRuleEngine Off

</IfModule>

</LocationMatch>

———

To disable a particular mod_security2 rule :

———

<IfModule mod_security2.c>

SecRuleRemoveById give_ruleID_here

</IfModule>

———

Run the following script after making the changes.

———

/scripts/ensure_vhost_includes --user=username

———

This script will uncomment the following line in apache configuration and restart apache.

———–

Include “/usr/local/apache/conf/userdata/std/2/username/domain.com/*.conf”

April 5, 2014

How to reset Hay Day…without resetting your device

Filed under: Apple — admin @ 11:51 pm

Finally figured out how to reset Hay Day – and this can be done multiple times without resetting your entire iPhone/iPad! These are the steps I followed – you can probably shorten the steps – but I quit/restarted more than once to make sure its working the way I expected

Here’s the Trick – You need a spare iOS device (iphone, ipad, ipod) that’s never played Hay Day Before (or a new device, or one that has recently been reset with Erase all content).

For these instructions – Let’s say you want to reset Hay Day on your iPhone (your main device), and you have an iPad that’s never played Hay Day Before (the spare one we will use to create a new farm). And for discussion’s sake, let’s call your GameCenter account “ABCD”

iPhone (device where you want to reset Hay Day):
———————————————————
Quit Hay Day on your iPhone
Log Out of ABCD in Game Center on your iPhone (Settings/Game Center)

iPad (never played Hay Day before):
——————————————

  • Log in to the ABCD Game Center account though Settings/GameCenter
  • Start Hay Day (or install it and start it)
  • The game will be NEW – starting with a video
  • Hay Day will access Game Center…and you will see a GameCenter Alert saying something like this. “We found another farm attached to this Game Center Account. Do you want to Load it?” : “YES Load Game” or “No, Keep Current Game”. Answer KEEP THE CURRENT GAME
  • To be safe – quit Hay Day – reload it – and make sure it comes up with the “new” farm without the Game Center Alert.
  • If everything looks good – go to settings/game center and put the iPad back to its normal Game Center account. You’re done with the iPad
  • Now – Game Center ABCD account holds a new Farm for me

iPhone:
———

  • Log in to ABCD account (Settings/Game Center)
  • Start Hay Day
  • GameCenter Alert will appear – “We found another farm attached to this Game Center Account. Do you want to Load it?”. Answer: LOAD THE GAME

That’s it! You now have a beginner’s farm on your iPhone without needing to reset the device

« Newer PostsOlder Posts »

Powered by WordPress