Skip to content

win_format: allocation_unit_size has no effect #56961

@iwhd

Description

@iwhd
SUMMARY

When allocation_unit_size parameter is set, the partition is formatted with the default one instead

ISSUE TYPE
  • Bug Report
COMPONENT NAME

win_format

ANSIBLE VERSION
ansible 2.8.0
OS / ENVIRONMENT

Windows Server 2019

STEPS TO REPRODUCE

Run playbook with win_format module, where custom allocation unit size is set:

- name: Format partition
  win_format:
    drive_letter: D
    file_system: NTFS
    allocation_unit_size: 512
    full: False
EXPECTED RESULTS

Partition allocation size unit should be set to 512

ACTUAL RESULTS

Partition was formatted with default (4096) allocation size unit


TASK [Format partition] ***********************************************************************************************************
changed: [win2019] => {
    "changed": true, 
    "invocation": {
        "module_args": {
            "allocation_unit_size": 512, 
            "compress": null, 
            "drive_letter": "D", 
            "file_system": "NTFS", 
            "force": false, 
            "full": false, 
            "integrity_streams": null, 
            "label": null, 
            "large_frs": null, 
            "new_label": null, 
            "path": null
        }
    }
}

TASK [debug] ***********************************************************************************************************
ok: [win2019] => {
    "ansible_facts.disks[1].partitions[0].volumes[0]": {
        "allocation_unit_size": 4096, 
        "drive_type": "Fixed", 
        "health_status": "Healthy", 
        "label": "", 
        "object_id": "{1}\\\\win2019\\root/Microsoft/Windows/Storage/Providers_v2\\WSP_Volume.ObjectId=\"{c2b6d3ca-7f00-11e9-b427-806e6f6e6963}:VO:\\\\?\\Volume{509328f7-0000-0000-0000-100000000000}\\\"", 
        "path": "\\\\?\\Volume{509328f7-0000-0000-0000-100000000000}\\", 
        "size": 85897244672, 
        "size_remaining": 85794185216, 
        "type": "NTFS"
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects_2.8This issue/PR affects Ansible v2.8bugThis issue/PR relates to a bug.has_prThis issue has an associated PR.moduleThis issue/PR relates to a module.support:communityThis issue/PR relates to code supported by the Ansible community.windowsWindows community

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions