Re: Scripting the use of Diskpart?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks for the feedback.

"Corey_in_Canada" <no@xxxxxxxxx> wrote in message
news:uNZ9b2j8GHA.2316@xxxxxxxxxxxxxxxxxxxxxxx
Hey Pegasus,

I got it working. I was referencing my file wrong.

Thanks a lot for your help. I would assign points if I could!!


"Corey_in_Canada" <no@xxxxxxxxx> wrote in message
news:e8fNMtj8GHA.208@xxxxxxxxxxxxxxxxxxxxxxx
Hi Pegasus,

Thanks for taking the time to reply with an informative answer. Because
I
am by no means a scripting guru, in your example, what does script.scr
refer to?

For instance with my very simple and basic batch file, how would I
combine
that with the below example to make this work?

I tried looking up some examples but it didnt really touch on the exact
variables...maybe Im just missing the obvious though, and if so I
apologize.

Thanks kindly.


"Pegasus (MVP)" <I.can@xxxxxxx> wrote in message
news:eSBA%23ej8GHA.3644@xxxxxxxxxxxxxxxxxxxxxxx

"Corey_in_Canada" <no@xxxxxxxxx> wrote in message
news:O0Ah%23xh8GHA.2092@xxxxxxxxxxxxxxxxxxxxxxx
Is it possible to create a batch file that will reconnect a dynamic
disk
through diskpart? To reconnect a dynamic disk the following commands
are
necessary

diskpart
select disk X
online

That command would and does bring an offline dynamic disk back online.
However when I run that through a batch file it hangs at the following
prompt:

Diskpart>

Its almost as if external interactive commands are prohibited from
running
for saftey precautions.

Is there a work around to this or can anyone give some advice.

Just FYI, I am trying to do this for an iSCSI SAN that has dynamic
disks
configured on a connected server, since Microsoft's iSCSI initator
does
not
support dynamic disks I am looking for a work around from purchasing
an
iSCSI HBA just for dyanmic disk support.

Thanks



The standard method is to pipe the subcommands into
diskpart via a script file:

@echo off
echo > c:\script.scr select disk X
echo >> c:\script.scr online
diskpart < c:\script.scr








.



Relevant Pages

  • Need diskpart/alignment help, break the mirrors first?
    ... It seems a catch22. ... How to run diskpart from a disk you want to realign? ... Disk 1 Online 136 GB 136 GB ...
    (microsoft.public.windows.server.general)
  • Bring Online Dynamic Disk whose status is invalid
    ... However the drive will not come online. ... In Disk management the status is offline, i tried to use the DISKPART ...
    (microsoft.public.windows.vista.hardware_devices)
  • Re: Scripting the use of Diskpart?
    ... diskpart via a script file: ... echo> c:\script.scr select disk X ... echo>> c:\script.scr online ...
    (microsoft.public.windows.server.general)
  • Re: Linux and Initrd used to access disk : how does it work ?
    ... > for hardware support of disk controler, and I'm at a point where I need ... > BEFORE loading the module itself, if it is mandatory to access the disk. ... echo Mounted /proc filesystem ... insmod /lib/scsi_mod.ko ...
    (Linux-Kernel)
  • Re: Cluster Ressource not Fail
    ... Quorum disk ... DisksOpenResourceFileHandle: Disk unique id present trying new ... Online, Send Offline IOCTL to all existing volumes, then Online IOCTL. ... Ip-address -> no Dep. ...
    (microsoft.public.windows.server.clustering)