|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Scripting the use of Diskpart?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
Show quote
Hide quote
"Corey_in_Canada" <n*@mail.here> wrote in message The standard method is to pipe the subcommands intonews:O0Ah%23xh8GHA.2092@TK2MSFTNGP03.phx.gbl... > 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 > > diskpart via a script file: @echo off echo > c:\script.scr select disk X echo >> c:\script.scr online diskpart < c:\script.scr 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. Show quoteHide quote "Pegasus (MVP)" <I.***@fly.com> wrote in message news:eSBA%23ej8GHA.3644@TK2MSFTNGP03.phx.gbl... > > "Corey_in_Canada" <n*@mail.here> wrote in message > news:O0Ah%23xh8GHA.2092@TK2MSFTNGP03.phx.gbl... >> 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 > > 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!! Show quoteHide quote "Corey_in_Canada" <n*@mail.here> wrote in message news:e8fNMtj8GHA.208@TK2MSFTNGP03.phx.gbl... > 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.***@fly.com> wrote in message > news:eSBA%23ej8GHA.3644@TK2MSFTNGP03.phx.gbl... >> >> "Corey_in_Canada" <n*@mail.here> wrote in message >> news:O0Ah%23xh8GHA.2092@TK2MSFTNGP03.phx.gbl... >>> 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 >> >> > > Thanks for the feedback.
Show quoteHide quote "Corey_in_Canada" <n*@mail.here> wrote in message news:uNZ9b2j8GHA.2316@TK2MSFTNGP04.phx.gbl... > 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" <n*@mail.here> wrote in message > news:e8fNMtj8GHA.208@TK2MSFTNGP03.phx.gbl... > > 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.***@fly.com> wrote in message > > news:eSBA%23ej8GHA.3644@TK2MSFTNGP03.phx.gbl... > >> > >> "Corey_in_Canada" <n*@mail.here> wrote in message > >> news:O0Ah%23xh8GHA.2092@TK2MSFTNGP03.phx.gbl... > >>> 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 > >> > >> > > > > > > On Wed, 18 Oct 2006 08:01:02 +1000, "Pegasus \(MVP\)" <I.***@fly.com> <snip>wrote: >The standard method is to pipe the subcommands into The last line can also be replaced with this:>diskpart via a script file: > >@echo off >echo > c:\script.scr select disk X >echo >> c:\script.scr online >diskpart < c:\script.scr > diskpart /s c:\script.scr It will do the same thing. (just learned this, wanted to pass it along) Mike
Show quote
Hide quote
"Special Access" <nonyabidn***@hotmail.com> wrote in message Thanks for the tip!news:lm2bj2pcu8cvhhhqr1retk2p89c307oi8o@4ax.com... > On Wed, 18 Oct 2006 08:01:02 +1000, "Pegasus \(MVP\)" <I.***@fly.com> > wrote: > > <snip> > > >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 > > > > The last line can also be replaced with this: > > diskpart /s c:\script.scr > > It will do the same thing. (just learned this, wanted to pass it > along) > > Mike |
|||||||||||||||||||||||