[clue] Whack-a-disk

David L. Willson DLWillson at TheGeek.NU
Tue Jul 29 13:19:11 MDT 2014


Interesting. Trying your switches, I'm getting that 0 is an invalid argument. It seems to think that by "-0" I mean to specify a switch, not a parameter to the mkpart. 

-- 
David L. Willson 
Teacher, Engineer, Evangelist 
RHCE+Satellite CCAH Network+ A+ Linux+ LPIC-1 UbuntuCP NovellCLA 
Mobile 720-333-LANS(5267) 
http://sofree.us 

This is a good time for a r3VOLution. 

----- Original Message -----

> For aligned disks I general do:
> mkpart primary 1 -0
> I suspect that is sector aligned and not cylinder aligned?

> On Tue, Jul 29, 2014 at 12:51 PM, David L. Willson <
> DLWillson at thegeek.nu > wrote:

> > How can I quickly and simply wipe and re-partition a disk from a
> > script?
> 

> > Here's a proposal, using sdc as the example.
> 

> > # Quickly wipe the head of the disk.
> 
> > sudo dd if=/dev/zero of=/dev/sdc bs=16MB count=1
> 

> > # Create a new, basic partition table. Good for up to 2TB.
> 
> > sudo parted /dev/sdc mklabel msdos
> 

> > # If you have a disk larger than 2TB, use this instead.
> 
> > # sudo parted /dev/sdc mklabel gpt
> 

> > # Create a new, cylinder-aligned, primary partition, the full size
> > of
> > the disk
> 
> > sudo parted --align cylinder /dev/sdc mkpart primary 0% 100%
> 

> > 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 "properly
> > aligned for best performance", but I didn't find anyone giving the
> > answer. So... So that.
> 

> > --
> 
> > David L. Willson
> 
> > Teacher, Engineer, Evangelist
> 
> > RHCE+Satellite CCAH Network+ A+ Linux+ LPIC-1 UbuntuCP NovellCLA
> 
> > Mobile 720-333-LANS(5267)
> 
> > http://sofree.us
> 

> > This is a good time for a r3VOLution.
> 
> > _______________________________________________
> 
> > clue mailing list: clue at cluedenver.org
> 
> > For information, account preferences, or to unsubscribe see:
> 
> > http://cluedenver.org/mailman/listinfo/clue
> 

> _______________________________________________
> clue mailing list: clue at cluedenver.org
> For information, account preferences, or to unsubscribe see:
> http://cluedenver.org/mailman/listinfo/clue
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue/attachments/20140729/7159a766/attachment.html 


More information about the clue mailing list