# Unable to create the partition

**URL:** <https://forum.ansible.com/t/unable-to-create-the-partition/36816>\
**Category:** Ansible Project\
**Created:** [July 8, 2022, 8:04am UTC](https://forum.ansible.com/t/unable-to-create-the-partition/36816 "2022-07-08T08:04:56Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ashok-2017](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ashok-2017/32/659_2.png) [@Ashok-2017](https://forum.ansible.com/u/Ashok-2017)\
**Post date:** [July 8, 2022, 8:04am UTC](https://forum.ansible.com/t/unable-to-create-the-partition/36816/1 "2022-07-08T08:04:56Z")

</div>

Hi,

I am trying to create the partition, but got the following error:

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [July 8, 2022, 8:35am UTC](https://forum.ansible.com/t/unable-to-create-the-partition/36816/2 "2022-07-08T08:35:59Z")

</div>

> Hi,
> 
> I am trying to create the partition, but got the following error:

I think that the error message is clear about the problem. The device doesn't exist.

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke

---

<div class="post-metadata">

**Author:** ![Ashok-2017](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ashok-2017/32/659_2.png) [@Ashok-2017](https://forum.ansible.com/u/Ashok-2017)\
**Post date:** [July 8, 2022, 9:50am UTC](https://forum.ansible.com/t/unable-to-create-the-partition/36816/3 "2022-07-08T09:50:36Z")

</div>

I am trying to create new partition.  
If that is not available, so that only need to create the /dev/vdb partition.

---

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [July 8, 2022, 11:48am UTC](https://forum.ansible.com/t/unable-to-create-the-partition/36816/4 "2022-07-08T11:48:16Z")

</div>

Your logic is flawed.  
You cannot create devices.  
You can only create partitions on existing devices.

---

<div class="post-metadata">

**Author:** ![Ashok-2017](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ashok-2017/32/659_2.png) [@Ashok-2017](https://forum.ansible.com/u/Ashok-2017)\
**Post date:** [July 11, 2022, 5:22am UTC](https://forum.ansible.com/t/unable-to-create-the-partition/36816/5 "2022-07-11T05:22:11Z")

</div>

Thanks for providing your input.

---

<div class="post-metadata">

**Author:** ![Ashok-2017](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ashok-2017/32/659_2.png) [@Ashok-2017](https://forum.ansible.com/u/Ashok-2017)\
**Post date:** [July 11, 2022, 6:10am UTC](https://forum.ansible.com/t/unable-to-create-the-partition/36816/6 "2022-07-11T06:10:01Z")

</div>

lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

vda 252:0 0 50G 0 disk

├─vda1 252:1 0 500M 0 part /boot

├─vda2 252:2 0 4G 0 part [SWAP]

└─vda3 252:3 0 10.5G 0 part /

---

<div class="post-metadata">

**Author:** ![skratbag](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/skratbag/32/4836_2.png) [@skratbag](https://forum.ansible.com/u/skratbag)\
**Post date:** [July 11, 2022, 6:14am UTC](https://forum.ansible.com/t/unable-to-create-the-partition/36816/7 "2022-07-11T06:14:55Z")

</div>

You appear to be trying to do something to the /boot partition.

Perhaps you are referring to the wrong device?

When in trouble, or in doubt

Run in circles, scream and shout

---

<div class="post-metadata">

**Author:** ![Ashok-2017](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ashok-2017/32/659_2.png) [@Ashok-2017](https://forum.ansible.com/u/Ashok-2017)\
**Post date:** [July 11, 2022, 6:28am UTC](https://forum.ansible.com/t/unable-to-create-the-partition/36816/8 "2022-07-11T06:28:01Z")

</div>

Can you please suggest me how to fix this issue?

---

<div class="post-metadata">

**Author:** ![skratbag](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/skratbag/32/4836_2.png) [@skratbag](https://forum.ansible.com/u/skratbag)\
**Post date:** [July 11, 2022, 7:07am UTC](https://forum.ansible.com/t/unable-to-create-the-partition/36816/9 "2022-07-11T07:07:02Z")

</div>

On the systems that I build, the /boot partition is simply an ext4 or xfs file system. I would not be trying to use logical volume manager to try to build /boot.

I would also look at using a kick-start method or similar to automate the build and get the file systems built there rather than with ansible.

Anyway that is what I do, others may have a different method that may work better in your case.

When in trouble, or in doubt

Run in circles, scream and shout

---

<div class="post-metadata">

**Author:** ![Ashok-2017](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ashok-2017/32/659_2.png) [@Ashok-2017](https://forum.ansible.com/u/Ashok-2017)\
**Post date:** [July 11, 2022, 9:27am UTC](https://forum.ansible.com/t/unable-to-create-the-partition/36816/10 "2022-07-11T09:27:32Z")

</div>

Thanks for providing your input.
