<div dir="ltr">I also use expect extensively. My comments above should have had a better indication that it was a jestfull snark.<div>I put expect into a &quot;tool of last resort&quot; bucket.  If there is another way to do it then that way is probably better than using expect.  On the other hand automation is a beautiful thing and the more we automate the more free time we have for other things. CLI programming can be a very useful thing and one that can be quite a time saver.  And there are a couple places where there just is almost no other choice.<div>
<br></div><div>Still I have been debugging a lot of misbehaving expect code over the last couple years.</div><div>I cannot blame most of the problems I&#39;ve seen directly on the tool. I do run into two main oversights: </div>
<div>* First, a step times out early waiting for a pattern and falls through to subsequent behavior.  Hilarity often ensues. <br></div><div>* Second, no global timeout is provided and code that should have failed ends up hanging till someone notices and kills it.</div>
<div>There are good solutions to both cases they just seem non obvious to most of the guys who use the code around here.</div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Jul 29, 2014 at 1:44 PM, Dan Kulinski <span dir="ltr">&lt;<a href="mailto:daniel@kulinski.net" target="_blank">daniel@kulinski.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Interesting insight on Expect and I can see why you are coming from that angle.  Quite honestly I use expect on very standard deployments and the behavior should be routine on all nodes.  I think expect is a good tool when used correctly.</div>
<div class="HOEnZb"><div class="h5">
<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 29, 2014 at 1:41 PM, Chris Fedde <span dir="ltr">&lt;<a href="mailto:chris@fedde.us" target="_blank">chris@fedde.us</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">1: Is there a problem using a GPT on a disk smaller than 2T?<div>2: You don&#39;t want to know expect.  Writing reliable code in expect that deals properly with failure modes is painful and requires silly, non-obvious timeout logic.</div>


</div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 29, 2014 at 1:30 PM, Shawn Perry <span dir="ltr">&lt;<a href="mailto:shawn@redmop.com" target="_blank">shawn@redmop.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Seconded.  Crashplan via puppet would be sexy.</div><div><div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Tue, Jul 29, 2014 at 1:28 PM, David L. Willson <span dir="ltr">&lt;<a href="mailto:DLWillson@thegeek.nu" target="_blank">DLWillson@thegeek.nu</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:Times New Roman;font-size:12pt;color:#000000">But now I demand that you teach an expect scripting class for SFS or CLUE, I mean. :-)<span><br>




<br>Not that I have any right, but I can try.<div><div><br><br><span name="x"></span>--<br>David L. Willson<br>Teacher, Engineer, Evangelist<br>RHCE+Satellite CCAH Network+ A+ Linux+ LPIC-1 UbuntuCP NovellCLA<br>

Mobile 720-333-LANS(5267)<br><a href="http://sofree.us" target="_blank">http://sofree.us</a><br><br>This is a good time for a r3VOLution.<span name="x"></span><br></div></div></span><div><div><br><hr><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt">




<div dir="ltr">Thanks for sharing, this will work well with my cloud deployment and puppet to automatically assemble a Lustre file system.  No more expect script!</div><div class="gmail_extra"><br><br><div class="gmail_quote">





On Tue, Jul 29, 2014 at 1:25 PM, David L. Willson <span dir="ltr">&lt;<a href="mailto:DLWillson@thegeek.nu" target="_blank">DLWillson@thegeek.nu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div><div style="font-family:Times New Roman;font-size:12pt;color:#000000">Tried that. No dice. Actually what you said is how I used to do it, but I was always annoyed by having to go interactive. If I&#39;m going to go interactive, I&#39;m using cfdisk, because the interface is more pretty / less suckful.<br>





<br>I always wanted non-interactive and *perfect*. I finally figured out how to get it today.<div><div><br><span><br><span></span>--<br>David L. Willson<br>Teacher, Engineer, Evangelist<br>RHCE+Satellite CCAH Network+ A+ Linux+ LPIC-1 UbuntuCP NovellCLA<br>





Mobile 720-333-LANS(5267)<br><a href="http://sofree.us" target="_blank">http://sofree.us</a><br><br>This is a good time for a r3VOLution.<span></span><br></span><br><hr><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt">





<div dir="ltr">Oh, I do this from the parted command line, not as an argument to parted directly.  I wonder if you surround it with quotes?</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 29, 2014 at 1:19 PM, David L. Willson <span dir="ltr">&lt;<a href="mailto:DLWillson@thegeek.nu" target="_blank">DLWillson@thegeek.nu</a>&gt;</span> wrote:<br>






<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:Times New Roman;font-size:12pt;color:#000000">Interesting. Trying your switches, I&#39;m getting that 0 is an invalid argument. It seems to think that by &quot;-0&quot; I mean to specify a switch, not a parameter to the mkpart.<div>






<div><span><br><br><span></span>--<br>David L. Willson<br>Teacher, Engineer, Evangelist<br>RHCE+Satellite CCAH Network+ A+ Linux+ LPIC-1 UbuntuCP NovellCLA<br>Mobile 720-333-LANS(5267)<br><a href="http://sofree.us" target="_blank">http://sofree.us</a><br>






<br>This is a good time for a r3VOLution.<span></span><br></span><br><hr><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt">






<div dir="ltr">For aligned disks I general do:<div>mkpart primary 1 -0 </div><div>I suspect that is sector aligned and not cylinder aligned?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 29, 2014 at 12:51 PM, David L. Willson <span dir="ltr">&lt;<a href="mailto:DLWillson@thegeek.nu" target="_blank">DLWillson@thegeek.nu</a>&gt;</span> wrote:<br>







<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">How can I quickly and simply wipe and re-partition a disk from a script?<br>
<br>
Here&#39;s a proposal, using sdc as the example.<br>
<br>
# Quickly wipe the head of the disk.<br>
sudo dd if=/dev/zero of=/dev/sdc bs=16MB count=1<br>
<br>
# Create a new, basic partition table. Good for up to 2TB.<br>
sudo parted /dev/sdc mklabel msdos<br>
<br>
# If you have a disk larger than 2TB, use this instead.<br>
# sudo parted /dev/sdc mklabel gpt<br>
<br>
# Create a new, cylinder-aligned, primary partition, the full size of the disk<br>
sudo parted --align cylinder /dev/sdc mkpart primary 0% 100%<br>
<br>
The most interesting part might be that last line. I found many posts by people looking for a way to create a partition using parted non-interactively that is the full size of the disk and &quot;properly aligned for best performance&quot;, but I didn&#39;t find anyone giving the answer. So... So that.<br>








<br>
--<br>
David L. Willson<br>
Teacher, Engineer, Evangelist<br>
RHCE+Satellite CCAH Network+ A+ Linux+ LPIC-1 UbuntuCP NovellCLA<br>
Mobile 720-333-LANS(5267)<br>
<a href="http://sofree.us" target="_blank">http://sofree.us</a><br>
<br>
This is a good time for a r3VOLution.<br>
_______________________________________________<br>
clue mailing list: <a href="mailto:clue@cluedenver.org" target="_blank">clue@cluedenver.org</a><br>
For information, account preferences, or to unsubscribe see:<br>
<a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a><br>
</blockquote></div><br></div>
<br>_______________________________________________<br>clue mailing list: <a href="mailto:clue@cluedenver.org" target="_blank">clue@cluedenver.org</a><br>For information, account preferences, or to unsubscribe see:<br><a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a></blockquote>






<br></div></div></div></div><br>_______________________________________________<br>
clue mailing list: <a href="mailto:clue@cluedenver.org" target="_blank">clue@cluedenver.org</a><br>
For information, account preferences, or to unsubscribe see:<br>
<a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a><br></blockquote></div><br></div>
<br>_______________________________________________<br>clue mailing list: <a href="mailto:clue@cluedenver.org" target="_blank">clue@cluedenver.org</a><br>For information, account preferences, or to unsubscribe see:<br><a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a></blockquote>





<br></div></div></div></div><br>_______________________________________________<br>
clue mailing list: <a href="mailto:clue@cluedenver.org" target="_blank">clue@cluedenver.org</a><br>
For information, account preferences, or to unsubscribe see:<br>
<a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a><br></blockquote></div><br></div>
<br>_______________________________________________<br>clue mailing list: <a href="mailto:clue@cluedenver.org" target="_blank">clue@cluedenver.org</a><br>For information, account preferences, or to unsubscribe see:<br><a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a></blockquote>




<br></div></div></div></div><br>_______________________________________________<br>
clue mailing list: <a href="mailto:clue@cluedenver.org" target="_blank">clue@cluedenver.org</a><br>
For information, account preferences, or to unsubscribe see:<br>
<a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a><br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
clue mailing list: <a href="mailto:clue@cluedenver.org" target="_blank">clue@cluedenver.org</a><br>
For information, account preferences, or to unsubscribe see:<br>
<a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a><br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
clue mailing list: <a href="mailto:clue@cluedenver.org" target="_blank">clue@cluedenver.org</a><br>
For information, account preferences, or to unsubscribe see:<br>
<a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a><br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
clue mailing list: <a href="mailto:clue@cluedenver.org">clue@cluedenver.org</a><br>
For information, account preferences, or to unsubscribe see:<br>
<a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a><br></blockquote></div><br></div>