linux-system-roles / storage

Ansible role for linux storage management
https://linux-system-roles.github.io/storage/
MIT License
100 stars 54 forks source link

Unable to find enough unused disks on SAN environment #196

Open lilinredhat opened 3 years ago

lilinredhat commented 3 years ago

Hi, I have a SAN environment. I setup multipath on it. The error "Unable to find enough unused disks" when I run tests. Then I stoped multipathd , flush all paths and removed multipath package. Still unable to find enough unused disks. Then I created 3 disks with 10G size manually. But still unable to find enough unused disks. In fact, there are unused disks on st25.

[root@storageqe-25 tests]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 1.8T 0 disk |-sda1 8:1 0 1G 0 part /boot -sda2 8:2 0 1.8T 0 part |-rhel_storageqe--25-root 253:0 0 70G 0 lvm / |-rhel_storageqe--25-swap 253:1 0 15.7G 0 lvm [SWAP] -rhel_storageqe--25-home 253:2 0 1.8T 0 lvm /home sdb 8:16 0 2G 0 disk sdc 8:32 0 2G 0 disk sdd 8:48 0 2G 0 disk sde 8:64 0 2G 0 disk sdf 8:80 0 2G 0 disk sdg 8:96 0 2G 0 disk sdh 8:112 0 2G 0 disk sdi 8:128 0 2G 0 disk sdj 8:144 0 2G 0 disk sdk 8:160 0 2G 0 disk sdl 8:176 0 2G 0 disk sdm 8:192 0 2G 0 disk sdn 8:208 0 2G 0 disk sdo 8:224 0 2G 0 disk sdp 8:240 0 2G 0 disk sr0 11:0 1 1024M 0 rom
sdq 65:0 0 2G 0 disk sdr 65:16 0 10G 0 disk sds 65:32 0 10G 0 disk sdt 65:48 0 10G 0 disk

playbook

Output TASK [Exit playbook when there's not enough unused disks in the system] **** task path: /root/storage/tests/get_unused_disk.yml:12 fatal: [localhost]: FAILED! => { "changed": false, "msg": "Unable to find enough unused disks. Exiting playbook." }

AbdelAzizMohamedMousa commented 1 year ago

It looks like the get_unused_disk.yml playbook task failed to find enough unused disks on your system. Here are some things you can try to troubleshoot the issue:

Check the minimum size required: Verify that the minimum size specified in the playbook (10G) is not larger than the available disks on your system. From the output you provided, it seems that you have several 2GB disks and only two 10GB disks (sdr and sds), so you may need to adjust the minimum size accordingly.

Verify disk availability: Verify that the 10GB disks are not already in use by running the following command: lsblk -o NAME,MOUNTPOINT. If the disks are already in use, you may need to free them up or use different disks.

Check the filter criteria: Verify that the get_unused_disk.yml playbook is not filtering out disks that meet your criteria. Check the contents of the playbook file and make sure that the filters specified are not excluding disks that should be included.

Check the multipath configuration: If you previously had multipath configured on your system, it may be interfering with the disk detection process. Verify that multipath is completely disabled and that all paths have been flushed, as you mentioned you did.

Check the role: If you are using a third-party role to manage storage, there may be a bug or issue with the role. Check the documentation for the role and verify that it is compatible with your system and the version of the storage software you are running.

Verify disk labeling: Verify that the disks you created manually have been properly labeled and are visible to the system. You can check this by running the lsblk command and verifying that the disks appear in the output.

By following these steps, you should be able to identify and resolve the issue preventing the playbook from finding enough unused disks on your system.