6

You can use the following code to get the status of a drive. This is powershell code. Get-WmiObject -Class win32_diskdrive -Property STATUS


4

The solution was very subtle, and a horrible design idea by Microsoft. The two original Western Digital Caviar Black 1 TB drives were listed as 931.51 GB: But the new disk was 931.39 GB (120 MB to small) - even though the drives are the same size. In a flash of inspiration i realized that Guid Partition Table might take up more space than a Master Boot ...


4

Launch DISKPART and run LIST DISK. The status column will show if they're online or not.


4

Adding to @longneck's answer: Optimize-Volume -DriveLetter <YourDriveLetter> -ReTrim -Verbose should be what you are looking for in Windows PowerShell, defrag <YourVolume> /L Perform retrim on the specified volumes. in Windows-Not-PowerShell.


3

diskpart clean only overwrites the MBR or GPT areas. It does not TRIM the entire drive. I'm not aware of any utilities for Windows that can TRIM an entire drive. There are quite a few options for linux. blkdiscard is probably the easiest to use. hdparam --trim-sector-ranges is also an option.


3

I suspect this would be the equivalent in PowerShell: New-Partition -DiskNumber 0 -Size 100MB -GptType "{c12a7328-f81f-11d2-ba4b-00a0c93ec93b}" -DriveLetter "S" Format-Volume -FileSystem FAT32 -NewFileSystemLabel "SYSTEM" -DriveLetter "S" -Force Modify as appropriate to suit your use-case.


2

According to Microsoft, you can't. http://technet.microsoft.com/en-us/library/cc776741%28v=ws.10%29.aspx ... You can extend a volume only if it does not have a file system or if it is formatted using the NTFS file system. You cannot extend volumes formatted using FAT or FAT32. You cannot extend a system volume, boot volume, striped volume, ...


2

As I understand it, the drive being online or offline allows you to perform actions on the disk. Formatting, partitioning, etc. Mounting it connects the drive to your filesystem so you can work on it like saving files. The drive is partitioned, it has a drive letter, it has a filesystem, etc.


2

Microsoft decided to call a filesystem a "volume". As there is no filesystem yet you won't see it in the list of volumes. The set ID command operates on the selected partition. So I don't think you need to select the volume at all.


2

This works for me. foreach ($disk in get-wmiobject Win32_DiskDrive -Filter "Partitions = 0"){ $disk.DeviceID $disk.Index "select disk "+$disk.Index+"`r clean`r create partition primary`r format fs=ntfs unit=65536 quick`r active`r assign letter=D" | diskpart } In this case, i get the disk with NO partitions, and then i create a D drive with all ...


2

You have the general idea for how to do this. What you want to do this this: Take a full backup. Every time you break redundancy, you risk a disaster. Better safe than sorry. Replace one 73GB disk with a 500GB disk. Wait for a rebuild to complete. Replace the other 73GB disk with the other 500GB disk. Wait for the rebuild to complete. Use Dell OpenManage ...


2

As @TheCleaner says, use diskpart from a Windows 2008+ install .iso. I always prefer to use Microsoft-supported tools and processes when messing with partitions and disks. Assuming you've expanded .vhd inside Hyper-V console: Attach a Vista/win2008 or newer install .iso to the VM settings Boot to the .iso and once you're at setup prompts, hit shift-f10 to ...


1

Use WMIC: WMIC DISKDRIVE GET Availability,Index,Caption The values for availability can be found in the MSDN.


1

Please note that you need to select a disk before you can create a partition. Read diskpart /?, use : Microsoft DiskPart syntax: diskpart [/s <script>] [/?] /s <script> - Use a DiskPart script. /? - Show this help screen. Note that a DiskPart script is simple plain text file where the diskpart commands are ...


1

Do you have the Intel RAID driver installed on Windows? https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=22194 That may be you issue here.


1

I am not sure which attribute bits parted uses to define a hidden partition, you would need to look at the source code. But from what you have experienced it must be different. Microsoft defines these partition attributes for GPT: Bit 60 - Read Only, Bit 62 - Hidden, Bit 63 - Do not automount For more information see this wiki article. And how would you ...


1

Your problem and my problem almost the same: I can see drives in disk management, but non of the partitions were executable, in my windows explorer the drive letters were gone. in my case, disk-part shows everything correctly, and the following method resolved my issue. Please remove the problematic physical hard drive, attached to another running machine, ...


1

You are correct - the Intel user guide is wrong. You need the following commands: diskpart list disk select disk x list partition rem *this will show you the partitions you already have* create partition primary size=X000 rem *(where X000 is the size to create)* list partition rem *this will now also show you the new partition you have ...


1

They are typically not the same thing. A volume is not the same thing as a partition. For example, a floppy disk might be accessible as a volume, even though it does not contain a partition, as floppy disks cannot be partitioned with most modern computer hardware. Also, an OS can recognize a partition without recognizing any volume associated with it, as ...


1

Yes, your data will be fine, though you should always ensure your backups are maintained and up to date before doing such critical operations. Here is a Technet article which will guide you through the process and some key considerations: http://technet.microsoft.com/en-us/library/cc731274.aspx


1

There are multiple things in play here. The most important being that Powershell does not run in the same context as your Windows Explorer - so it doesn't know about drives attached there, and vice-versa. Secondly, get rid of diskpart and use Powershell's own facilities. Have a look at "New-PSDrive" (http://technet.microsoft.com/en-us/library/hh849829.aspx) ...


1

I can't see the exact point at which your script is failing, however the Set-Location test you mention reminds me of an issue I had in PoSH when trying to repeatedly map/un-map/map locations in a script. https://stackoverflow.com/questions/10994979/net-use-only-works-once-in-powershell In short use FILESYSTEM::X:\ instead of X:\ EDIT : Ok so I actually ...


1

You need to assign as well in diskpart otherwise it will be mounted but not have a drive letter. http://blogs.msdn.com/b/7/archive/2009/10/08/diskpart-exe-and-managing-virtual-hard-disks-vhds-in-windows-7.aspx


1

A few hours later, "Extend Volume" became active. The tech that performed the extension didn't look at the partitions before he did it, but now with the extension complete, it shows the same mystery partitions, with #4 "magically" relocated to after the extended #3. The only thing that any of us can think of that was done to the system was run a "Rescan ...


Only top voted, non community-wiki answers of a minimum length are eligible