Showing posts with label filesystem. Show all posts
Showing posts with label filesystem. Show all posts

Manage an HP Smart Array directly from VMware ESXi

source link

"
In my lab I’m using a Proliant DL380 G5 filled with disk as a storage server, running some VSA on top of the volume I created  and formatted with a vmfs filesystem.
I was running into performance issues, storage was performing poorly, and I needed to check for usual problems like for example cache battery status, since on a P400 raid card, write back is by default disabled if the battery has a low charge, thus lowering performances to a minimum.
My problem however was, I was running on top of this server all my iscsi shared storage, so it was not so easy to poweroff the server to open up the raid card Bios anche check. Also, every reboot cycle is really time consuming. So, since HP has always had management software for their raid controllers available for windows or linux, I went to check if there was some possibilities also for VMware ESXi.
First, I checked on HP website and there was some promising download:

Look, a VIB file! :)
I downloaded it and installed in the usual way on my ESXi 5.1 server (even if the package is officially listed for ESXi 5.0…).

I also installed the utilities to manage the several HP components, since the first one was only the driver. If you want to install only the Raid utility, look for the hpacucli vib file.

And I finally reboot the server in order to complete the installation, hopefully for the last time…
After reboot, I checked the components were installed correctly:

From here, let the fun begin! There are many commands you can run on the raid controller by running /opt/hp/hpacucli/bin/hpacucli, I’m going to show you some of them:

First, I identified the controller. Remember is in slot 3, this will be needed in the next commands.
As I said, my problem seemed to be related to the cache battery, so I went to check its status:

The status seems to be ok, but I went to enable anyway the cache, the command is:
1ctrl slot=3 modify dwc=enable forced
there are many commands as I said, and I found this page with many example. Go to check it. As a last example, a fun stuff:

First, I identified the physical disks in the controller (pd), then I enabled the led on every single disk. This is the result :)






 "

Cannot format hard disk with VMFS5 after removing it from RAID array

source link

"
Today I tried to install the new NexentaStor 4.0.1 on my x3650 M2 with local harddisks. To get the best performance my plan was to pass-through all local disks to the VM. For that I had to remove all RAID arrays that are currently configured across my 8 internal drives. After deleting the RAID arrays I started the host. When my host was up and running I tried to format one of the disks an got the following error message.
Call “HostDatastoreSystem.QueryVmfsDatastoreCreateOptions” for object “ha-datastoresystem” on ESXi “xxx.xxx.xxx.xx″ failed.
I have done this with several other disks and it looked like that only 3 had the problem. I enabled SSH and connected to the host.
There i used this command to list all the available devices:
ls -lha /vmfs/devices/disks/
This was the shortened output

 

As you can see there is a partition on the disks I couldn’t format.
The following command had shown me some information about the device.
partedUtil getptbl /vmfs/devices/disks/naa.5000c50023397a33
This was the output:
Error: The primary GPT table states that the backup GPT is located beyond the end of disk. This may happen if the disk has shrunk or partition table is corrupted. Fix, by writing backup table at the end? This will also fix the last usable sector appropriately as per the new reduced size. diskPath (/dev/disks/naa.5000c50023397a33) diskSize (286748000) AlternateLBA (570310655) LastUsableLBA (570310622)
Warning: The available space to /dev/disks/naa.5000c50023397a33 appears to have shrunk. This may happen if the disk size has reduced. The space has been reduced by (283562656 blocks). You can fix the GPT to correct the available space or continue with the current settings ? This will also move the backup table at the end if it is not at the end already. diskSize (286748000) AlternateLBA (570310655) LastUsableLBA (570310622) NewLastUsableLBA (286747966)
Error: Can’t have a partition outside the disk!
Unable to read partition table for device /vmfs/devices/disks/naa.5000c50023397a33
It looks like that after deleting the RAID array not all VMFS partition table information was deleted too, so I had to clear it manually.
To do this simply create a normal msdos partition on the affected disks with this command:
partedUtil setptbl /vmfs/devices/disks/naa.5000c50023397a33 msdos
After setting a new partition I was able to format the disk with VMFS5.

"

DFS: Properties cannot be set on the namespace server – Access is denied

Excellent article on this!
Source link

"
I ran across a strange problem the other day with DFS. I needed to override the referral ordering for a namespace server, but the change wouldn’t take. I got a status of Error during the “Commit changes.” task. In the detail, it showed “Properties cannot be set on the namespace server \\SERVER.domain.local\Share. Access is denied”
This error must be uncommon, because all of the search results are for a similar but differently worded error about changing the properties of a folder and that issue’s resolutions don’t apply here.
I finally figured out the problem, and thought I’d share!

The Root of the Problem

If you looked at the other search results and forum postings and Microsoft KB articles, you probably went around and checked permissions on the target folders. If you’re here by now, then you know that it wasn’t the problem.
Actually, the issue here doesn’t live on any of the individual namespace servers. Instead it’s a permissions problem in the Active Directory objects used to store information about the DFS shares. The computer object for each namespace server in a namespace will have some permissions granted on that namespace’s object in AD.
In my case, one of the computers was missing (I suspect that this was a side-effect of a swing migration, as the missing computer was a secondary domain controller that was demoted and then re-promoted after the migration, but that’s another story).
It’s worth noting that this prevented me from changing the referral ordering of another namespace server as well, so even if the ACL looks to be in order for the one you’re trying to change, it’s important to check the ACLs for every namespace server.

The Easy Fix?

You could blow away the whole DFS share and start fresh. That should fix the problem. Of course, if you run into errors deleting it, you might have to forcefully delete it, then use dfsutil.exe to clean up the left over registry entries.
Plus, in my case at least, the DFS share worked just fine. I really didn’t want to bring the share down, or worry about cleaning up leftovers.

The Easy Enough Fix

Look ma! No downtime! Since the problem lives in Active Directory, you’ll be making changes to AD itself. We’ll be using ADSI Edit, so hop onto a Domain Controller or a machine with the ADSI Edit RSAT. There’s no need to make this change from a namespace server on the DFS share.
You should also have a complete list of the namespace servers for the share.

Use ADSI Edit to view the DFS configuration

  1. In ADSI Edit, connect to Default naming context.
  2. Browse to DC=ABCD,DC=local > CN=System > CN=Dfs‑Configuration 
  3. Here, you’ll see a list of your DFS shares: CN=ShareName
  4. Open the Properties of the affected share. In the first tab (Attribute Editor), look for the remoteServerName field.


    This contains the list of all the namespace servers that AD has listed. Make sure this matches what is shown in the DFS management console. If it doesn’t, you might have bigger problems, and you may need to resort to the “easy” fix.
  5. Now you can switch over to the Security tab. Click the Advanced button so that you see all the entries and the special permissions.

    Looking at the entries for the computer objects (the ones with the $ at the end), we can see that they all have the “Read/write all properties” access. In this example, you’ll also see a missing object, listed as “Account Unknown(SID)” with the same access as the other computers, so it’s a good bet that this is the  missing one.
Please note that I took these screenshots after I fixed the issue. In the above, STORAGE01$ is not missing, but in the subsequent screens, I use it as the example machine I am adding. I hope it’s not confusing!

Find the missing namespace server and add it back

  1. In the Advanced Security dialog above, click the Add button.
  2. In the “Select…” dialog, click Object Types…” and make sure that Computers is selected. Click OK.
  3. Now choose the computer that was missing from the list, and click OK.
  4. Next, you want to give the computer object the  “Read all properties” and “Write all properties” Permissions. You can leave the Properties alone or clear them all in advance, as I did. By default, other Permissions may be granted, but only the two listed should be kept.Server 2012 Dialog:

    Server 2008 R2 (and earlier) Dialog:

Wait, Then Test

Once the changes are made, wait until they have had time to replicate to all DCs. It can be difficult to tell which DC you’re hitting when you try to make administrative changes with DFS, so best to wait until all of them have the same information. You could force replication if you prefer.
When you’re sure it’s all synchronized, test it out. I didn’t run into any issues after this.

Unsolved Mysteries

I still don’t know exactly how that computer went missing. As I said, there was some turmoil due to a previous swing migration, but the share was working fine. Stranger still, other DFS shares had the same namespace server missing in the ACLs, yet they had no problem making changes to their properties (like the referral ordering). Seems like they should be broken.

"

Error adding datastores to VMWARE ESXi

source link


Error Message:
I was unable to add any of the local disks to my VMWARE ESXi host as VMFS datastores as I got the error “HostDatastoreSystem.QueryVmfsDatastoreCreateOptions” for object ‘ha-datastoresystem’ on ESXi….” as shown below;









Solution:
There are various useful suggestions in the Eversity comments for dealing with GPT partitions but they are quite long winded. The quickest solution (as suggested by fdisk) was to use partedUtil.
You need to run the following command for each disk that you’re having issues with (this overwrites the partition table with a standard msdos one which VMware can work with);
NOTE: This will ERASE ALL DATA on the disk in question so be careful to select the right disks!

#partedUtil mklabel /dev/disks/ msdos

To get the disk id: 
ls /dev/disks/







Good Article on RAID Levels

Good Article on RAID Levels

Source Link

"

A brief summary of the most commonly used RAID levels (The SNIA Dictionary also contains definitions of the RAID levels that have been vetted by major storage industry players, and is referenced below as applicable):

Level Description Minimum # of disks Image
RAID 0 Striped set without parity/[Non-Redundant Array]. Provides improved performance and additional storage but no fault tolerance. Any disk failure destroys the array, which becomes more likely with more disks in the array. A single disk failure destroys the entire array because when data is written to a RAID 0 drive, the data is broken into fragments. The number of fragments is dictated by the number of disks in the array. The fragments are written to their respective disks simultaneously on the same sector. This allows smaller sections of the entire chunk of data to be read off the drive in parallel, giving this type of arrangement huge bandwidth. RAID 0 does not implement error checking so any error is unrecoverable. More disks in the array means higher bandwidth, but greater risk of data loss. SNIA definition. 2 RAID Level 0
RAID 1 Mirrored set without parity. Provides fault tolerance from disk errors and failure of all but one of the drives. Increased read performance occurs when using a multi-threaded operating system that supports split seeks, very small performance reduction when writing. Array continues to operate so long as at least one drive is functioning. Using RAID 1 with a separate controller for each disk is sometimes called duplexing. SNIA definition. 2 RAID Level 1
RAID 2 Redundancy through Hamming code. Disks are synchronised and striped in very small stripes, often in single bytes/words. Hamming codes error correction is calculated across corresponding bits on disks, and is stored on multiple parity disks. SNIA definition 3
RAID 3 Striped set with dedicated parity/Bit interleaved parity. This mechanism provides an improved performance and fault tolerance similar to RAID 5, but with a dedicated parity disk rather than rotated parity stripes. The single parity disk is a bottle-neck for writing since every write requires updating the parity data. One minor benefit is the dedicated parity disk allows the parity drive to fail and operation will continue without parity or performance penalty. SNIA definition 3 RAID Level 3
RAID 4 Block level parity. Identical to RAID 3, but does block-level striping instead of byte-level striping. In this setup, files can be distributed between multiple disks. Each disk operates independently which allows I/O requests to be performed in parallel, though data transfer speeds can suffer due to the type of parity. The error detection is achieved through dedicated parity and is stored in a separate, single disk unit. SNIA definition 3 RAID Level 4
RAID 5 Striped set with distributed parity. Distributed parity requires all drives but one to be present to operate; drive failure requires replacement, but the array is not destroyed by a single drive failure. Upon drive failure, any subsequent reads can be calculated from the distributed parity such that the drive failure is masked from the end user. The array will have data loss in the event of a second drive failure and is vulnerable until the data that was on the failed drive is rebuilt onto a replacement drive. SNIA definition 3 RAID Level 5
RAID 6 Striped set with dual distributed Parity. Provides fault tolerance from two drive failures; array continues to operate with up to two failed drives. This makes larger RAID groups more practical, especially for high availability systems. This becomes increasingly important because large-capacity drives lengthen the time needed to recover from the failure of a single drive. Single parity RAID levels are vulnerable to data loss until the failed drive is rebuilt: the larger the drive, the longer the rebuild will take. Dual parity gives time to rebuild the array without the data being at risk if one drive, but no more, fails before the rebuild is complete. SNIA definition 4 RAID Level 6

How To Burn Chinese / Unicode Filenames Using Nero

Great Guide on burning Chinese / Unicode Filenames such as mp3. :)

"
One day your friend begs you to burn him your latest chinese mp3s that you converted.

You fire up your Nero, explored to your iTunes Music folder



WTF? And you thought that it was in chinese, even your JPOP are not displayed correctly. You tried exploring to the folder and everything seems alright.


You need the AppLocale Utility by Microsoft

http://www.microsoft.com/globaldev/tools/apploc.mspx - Need validation

http://www.freefunfiles.com/software...e-utility.html - Alternate link for those who got troubles vaildating


Download, install, follow the instructions or just do your usual Next/I Agree/Next

Upon complete. Click Start>Microsoft Applocale>Applocale



Click Next



Drag & drop the shortcut, let's say "Nero Burning Rom". Drag & drop to the window. Alternatively, you can browse and explore to where Nero is located.

Click Next



Select Chinese (Simplifed) or other languages. (Simplifed works well, I encounter problems selecting Traditional when I tried to burn with Nero, it will stuck at 1% for over 10mins, the cd hasn't been writen though)

Click Next



Check "Create a shortcut..." and enter the Link description if you want, the shortcut will be created under Start>Microsoft Applocale
Leave it uncheck if you want to run once without creating shorcut.

Click Finish.


Use the program as usual



Now you can burn properly without messing up the filenames or renaming to hanyupinying or romanised languages.


This program can work with any burning software and any other programs or games where you have problem displaying non english characters without setting Chinese to your "Regional and Language Options" at your control panel.

Delete Filename /Files Longer Than 255 Characters

It's always tedious delete long files that have more then 255 characters.
Here's the solution.

1) Get into the Command Prompt.
2) Type "Dir /X" - displays the directories and files in short filename format
3) Type "rmdir /s /q {Path to the directories or files you want to del"
e.g. rmdir /s /q C:\ShortF~1
- This would delete the ShortF~1 directories including the sub-directories.

Do try this with caution! As you won't want to mistakenly delete any important stuff. :P

How To Format Large External USB Hard Disk In FAT32?

Ever wonder why you have a 100Gig harddisk but Windows XP cannot format the whole harddisk in FAT32?

This the the limitation set by microsoft for Windows XP. You can read more on it at this link.
FAT32 limitation on Windows XP

But isn't FAT32 maximum usable size set at 2TB? So how do we achieve that?

We will need to use a third party software such as a freeware SwissKnife from CompuApps.


Link to SwissKnife download