GithubHelp home page GithubHelp logo

diskpart-cookbook's Introduction

Description

This cookbook is a utility cookbook designed to make working with diskpart easier. It implements a LWRP for disk and provision. This cookbook makes one LARGE assumption that must be accounted for if it is not true. That assumption is that you have 1 volume/partition per physical disk. I would argue you always want this, but alas this is the assumption foisted upon you by me!

When cloning this repository, clone into a directory named "diskpart" to have the provider names match those listed below.

ex: git clone https://github.com/moserke/diskpart-cookbook.git diskpart

Version

0.1.0 - This is at 0.1.0 currently because there is still extensive testing to be done against various versions of windows.

Requirements

This only supports windows and depends on the windows cookbook from opscode. This relies heavily on RegEx parsing from the windows diskpart command.

A sleep was introduced into each of the actions because there are times with diskpart commands you need to give the OS a chance to catch up before moving to the next command. A great example of this is when you have a disk that is already partitioned and formatted but is offline. When bringing that disk online you must stall for a few seconds so the OS can see the partition. If you check immediately for a partition on that disk you will be told there is not one and then your create partition will fail.

Resource/Provider

diskpart_disk

Actions

  • :online: Brings the disk online (default)
  • :convert: Converts to specified disk format
  • :offline: Brings a disk offline

Attribute Parameters

  • :number: The disk number to operate on
  • :type: The type of disk (:gpt, :mbr - default, :dynamic, :basic)
  • :sleep: The amount of time to sleep after executing command (default is 1)

diskpart_partition

Actions

  • :create: Create new primary partition (default)
  • :format: Format partition
  • :assign: Assign a drive letter to partition
  • :extend: Extends the partition to all free space
  • :create_primary: Creates a primary partition

Attribute Parameters

  • :disk_number: The disk number to operate on
  • :align: The disk alignment (default is 1024)
  • :fs: The type of file system (default is :ntfs)
  • :letter: The drive letter to use
  • :sleep: The amount of time to sleep after executing command (default is 1)
  • :size: The size in Mb the partition will have (default is 1)

diskpart-cookbook's People

Contributors

moserke avatar ronaldocampo avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.