Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Win32 - are disks striped ?

Status
Not open for further replies.

MoshiachNow

IS-IT--Management
Joined
Feb 6, 2002
Messages
1,851
Location
IL
HI,

Working on XP,looking for some method to determine if and which of my harddisks are striped.

Appreciate ideas.
Thanks

Long live king Moshiach !
 
Moshiach,

what is the purpose of all these very similar questions? Are you working on a project of some sort? The object of this forum is to help you, but not to do your work for you. I hope you understand my concern and are not upset I ask.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
If your disks are part of a hardware RAID, the OS doesn't know they're striped. If you're running software RAID, the OS would know about it.
 
KevinADC,

yes,this is a long going project of creating a customer tool that creates a beutiful HTML log with ALL system info.
So I'm adding modules as per our R&D requests.

LawnBoy - these are striped disks,so OS should know about it ,I just wondered how I find this info.

Ended up with the following code ("Logical Disk Manager" seems to point to a striped RAID):

my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\CIMV2") or die "WMI connection failed.\n";
my $colItems = $objWMIService->ExecQuery("SELECT * FROM Win32_DiskPartition", "WQL",
wbemFlagReturnImmediately | wbemFlagForwardOnly);

foreach my $objItem (in $colItems) {
print "DeviceID: $objItem->{DeviceID}\n";
print "Size: $objItem->{Size}\n";
if ($objItem->{Type} =~ /Logical Disk Manager/) {
$string = "Type: " . $objItem->{Type} . "\t-Striped !";
} else {
$string = "Type: " . $objItem->{Type};
}
print "$string\n";


Long live king Moshiach !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top