harvester icon indicating copy to clipboard operation
harvester copied to clipboard

[BUG] Unable to add addition disks on Host

Open scan-dev opened this issue 2 years ago • 4 comments

BUG Description:

I have the following baremetal node with following disk config:

rancher@harvest1:~ # lsblk

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0    7:0    0     3G  1 loop /
loop1    7:1    0    16G  0 loop
loop2    7:2    0    16G  0 loop
sda      8:0    0 557.9G  0 disk
├─sda1   8:1    0    64M  0 part /oem
├─sda2   8:2    0    15G  0 part /run/initramfs/cos-state
├─sda3   8:3    0     8G  0 part
└─sda4   8:4    0 534.8G  0 part /usr/local
sdb      8:16   0   2.7T  0 disk /var/lib/harvester/defaultdisk
sdc      8:32   0   2.7T  0 disk
└─sdc1   8:33   0   2.7T  0 part
sdd      8:48   0   3.3T  0 disk
└─sdd1   8:49   0   3.3T  0 part
sde      8:64   0    50G  0 disk /var/lib/kubelet/pods/c7f16a8b-30ed-42c5-9b71-829581484f6e/volume-subpaths/pvc-a4825c24-8aee-4455-957e-9e1580d4bbfa/promethe
sdg      8:96   0    10M  0 disk /var/lib/kubelet/pods/67b9e439-2acd-48b3-9bcc-51e780af4752/volumes/kubernetes.io~csi/pvc-c10f7213-a4c8-4141-9917-09f9727ee8f
sdh      8:112  0    16G  0 disk
├─sdh1   8:113  0     1M  0 part
├─sdh2   8:114  0   1.8G  0 part
└─sdh3   8:115  0  14.2G  0 part
sdi      8:128  0    16G  0 disk
├─sdi1   8:129  0     1M  0 part
├─sdi2   8:130  0   1.4G  0 part
└─sdi3   8:131  0  14.6G  0 part

I want to extend default disk (/dev/sdb) with sdc and sdd so to have all disk capacity available

I followed this instructions : https://docs.harvesterhci.io/v1.0/host/host/#multi-disk-management-tech-preview

Reproduce

Go through Web-UI options:

  • Harvester - Hosts
  • Select Host - on right menu <...> select "Edit Config"
  • Under Basics - select Disks
  • Select "Add Disks" - here unable to select the listed disks (forbidden-icon shown)

Expected behavior

when clicking/selecting "Add Disks" be able to add/extend the current disk-partition with the selected disk. if needed to perform all basic disk instruction to add the disk (partition, format & extend to current disk-partition)

Support bundle

Environment

  • Harvester ISO version: Harvester v1.0.2
  • Underlying Infrastructure (e.g. Baremetal with Dell PowerEdge R630): barematel - SUN FIRE X4270 M2 SERVER, ILOM v3.0.16.10.a, r68533

Additional context Add any other context about the problem here. Screenshot from 2022-07-21 21-45-36

scan-dev avatar Jul 21 '22 20:07 scan-dev

Hi @scan-dev,

It seems both of your disks sdc and sdd have partition. UI would not allow adding disk with partition. (Thanks @n313893254 confirm that)

Maybe you could try to manually remove whole partitions on both sdc and sdd and then try to add them again?

https://docs.harvesterhci.io/v1.0/host/host/#multi-disk-management-tech-preview You could try to read the above reference and try to follow it to add multi-disk.

Vicente-Cheng avatar Jul 22 '22 03:07 Vicente-Cheng

deleting the partition solved my problem and was able to add disks as documented. why the disk were partitioned is strange as I installed the hosts with default iso installer.

maybe feature to have more disk-mgmt steps avaialble in the UI (like delete existing partitions)

grts

scan-dev avatar Jul 25 '22 16:07 scan-dev

Reopen the issue since we can make some further improvements on this one with:

  1. Add a proper message to the UI if a partitioned disk can't be added as additional disks directly.
  2. (To discuss/investigate) add an additional action to allow users to remove the disk partitions directly through the UI.

guangbochen avatar Jul 26 '22 03:07 guangbochen

Hi

Reopen the issue since we can make some further improvements on this one with:

  1. Add a proper message to the UI if a partitioned disk can't be added as additional disks directly.
  2. (To discuss/investigate) add an additional action to allow users to remove the disk partitions directly through the UI.

For 2. I think we could re-use the force format. That means we may let people choose the whole disk even if there is a partition (also proper warning message to tip user to know the partition would be destoried).

Then NDM would handle the following thing with force format (remove partitions and format again).

What do you think? @guangbochen @bk201

Vicente-Cheng avatar Aug 11 '22 03:08 Vicente-Cheng

@Vicente-Cheng that's indeed what the field is for.

bk201 avatar Aug 11 '22 05:08 bk201

Pre Ready-For-Testing Checklist

~* [ ] If labeled: require/HEP Has the Harvester Enhancement Proposal PR submitted? The HEP PR is at:~

  • [x] Where is the reproduce steps/test steps documented? The reproduce steps/test steps are at:
  • https://github.com/harvester/harvester/issues/2551#issue-1313755812

~* [ ] Is there a workaround for the issue? If so, where is it documented? The workaround is at:~

  • [x] If labeled: area/ui Has the UI issue filed or ready to be merged? The UI issue/PR is at:
  • https://github.com/harvester/dashboard/pull/404

~* [ ] If labeled: require/doc, require/knowledge-base Has the necessary document PR submitted or merged? The documentation/KB PR is at:~

~* [ ] If NOT labeled: not-require/test-plan Has the e2e test plan been merged? Have QAs agreed on the automation test case? If only test case skeleton w/o implementation, have you created an implementation issue? - The automation skeleton PR is at: - The automation test case PR is at:~

~* [ ] If the fix introduces the code for backward compatibility Has a separate issue been filed with the label release/obsolete-compatibility? The compatibility issue is filed at:~

The backend test should be added for adding a new disk. https://github.com/harvester/tests/issues/450

khushboo-rancher avatar Aug 18 '22 20:08 khushboo-rancher

Verified this bug has been resolved. image image

Test Information

  • Environment: qemu/KVM single node
  • Harvester Version: master-9631b136-head
  • ui-source Option: Auto

Verify Steps:

  1. Install Harvester with additional volumes (for qemu/KVM environment, WWN is required)
  2. Login to console, make partitions for additional volumes (by the command fdisk)
  3. Login to Dashboard then navigate to host details, add new disks
  4. The volume should be appeared in the dropdown list of Add Disk
  5. THe volume should be able to added

lanfon72 avatar Aug 21 '22 17:08 lanfon72