Comments (4)
I suspect something related to this: https://github.com/longhorn/longhorn-spdk-engine/blob/a6cee5b6febac0a58b5ba2f4b9b5a4d06d9343b2/pkg/spdk/disk.go#L172
return fmt.Sprintf("%d-%d", dev.Export.Major, dev.Export.Minor), nil
While, the spdk helper will feed dev.Nvme instead of dev.Export: https://github.com/longhorn/go-spdk-helper/blob/ab0344a0c192095de0130f6c5121105be1ab6b33/pkg/util/device.go#L124
if _, err := fmt.Sscanf(f[1], "%d:%d", &dev.Nvme.Major, &dev.Nvme.Minor); err != nil {
The final user of this: https://github.com/longhorn/longhorn-spdk-engine/blob/a6cee5b6febac0a58b5ba2f4b9b5a4d06d9343b2/pkg/spdk/disk.go#L222
if id == diskID { return fmt.Errorf("disk %v is already used by AIO bdev %v", diskPath, bdev.Name) }
Maybe I miss something that would make sure that dev.Export contain the same thing than dev.Nvme. If not, that may explain the issue ?
Thanks @arsiesys
Yes, checked the codes. The bug is caused by the reason you said. Thank you.
from longhorn.
I suspect something related to this:
https://github.com/longhorn/longhorn-spdk-engine/blob/a6cee5b6febac0a58b5ba2f4b9b5a4d06d9343b2/pkg/spdk/disk.go#L172
return fmt.Sprintf("%d-%d", dev.Export.Major, dev.Export.Minor), nil
While, the spdk helper will feed dev.Nvme instead of dev.Export:
https://github.com/longhorn/go-spdk-helper/blob/ab0344a0c192095de0130f6c5121105be1ab6b33/pkg/util/device.go#L124
if _, err := fmt.Sscanf(f[1], "%d:%d", &dev.Nvme.Major, &dev.Nvme.Minor); err != nil {
The final user of this:
https://github.com/longhorn/longhorn-spdk-engine/blob/a6cee5b6febac0a58b5ba2f4b9b5a4d06d9343b2/pkg/spdk/disk.go#L222
if id == diskID {
return fmt.Errorf("disk %v is already used by AIO bdev %v", diskPath, bdev.Name)
}
Maybe I miss something that would make sure that dev.Export contain the same thing than dev.Nvme. If not, that may explain the issue ?
from longhorn.
Pre Ready-For-Testing Checklist
- Where is the reproduce steps/test steps documented?
The reproduce steps/test steps are at:
- Enable v2-data-engine
- Create two block devices such as loop devices
- Add the two disks to block-type disks
- One of the two disks shows the error message
... is already used by AIO bdev ...
innode.status.diskStatus
After the fix, the two disks can be added successfully.
-
Does the PR include the explanation for the fix or the feature?
-
Have the backend code been merged (Manager, Engine, Instance Manager, BackupStore etc) (including
backport-needed/*
)?
The PR is at
longhorn/longhorn-spdk-engine#121
- Which areas/issues this PR might have potential impacts on?
Area: v2 volume
Issues
from longhorn.
Verified pass on longhorn master (longhorn-instance-manager dce3a1
) with test steps
Can add two block devices as block-type disks on the same longhorn node without problem
disk-2:
conditions:
- lastProbeTime: ""
lastTransitionTime: "2024-03-12T02:28:38Z"
message: Disk disk-2(/dev/loop5) on node ip-172-31-38-210 is ready
reason: ""
status: "True"
type: Ready
- lastProbeTime: ""
lastTransitionTime: "2024-03-12T02:28:38Z"
message: Disk disk-2(/dev/loop5) on node ip-172-31-38-210 is schedulable
reason: ""
status: "True"
type: Schedulable
diskType: block
diskUUID: 37c78eb0-1a15-4fc2-9898-81a672e6039c
filesystemType: ""
scheduledReplica: {}
storageAvailable: 10590617600
storageMaximum: 10694426624
storageScheduled: 0
disk-3:
conditions:
- lastProbeTime: ""
lastTransitionTime: "2024-03-12T02:29:08Z"
message: Disk disk-3(/dev/loop6) on node ip-172-31-38-210 is ready
reason: ""
status: "True"
type: Ready
- lastProbeTime: ""
lastTransitionTime: "2024-03-12T02:29:08Z"
message: Disk disk-3(/dev/loop6) on node ip-172-31-38-210 is schedulable
reason: ""
status: "True"
type: Schedulable
diskType: block
diskUUID: 3924c40a-4377-49c1-9730-571c1f35809a
filesystemType: ""
scheduledReplica: {}
storageAvailable: 10590617600
storageMaximum: 10694426624
storageScheduled: 0
from longhorn.
Related Issues (20)
- [BACKPORT][v1.6.3][IMPROVEMENT] Add setting to configure support bundle timeout for node bundle collection
- [BACKPORT][v1.5.6][IMPROVEMENT] Add setting to configure support bundle timeout for node bundle collection
- [TASK] Reference Architecture and Sizing Guidelines for Longhorn v1.7.x HOT 1
- [TEST] Investigate accessing lab behind vpn
- [BACKPORT][v1.6.3][IMPROVEMENT] System restore unable to restore volume with backing image HOT 1
- [BUG] Longhorn cifs backups cannot find credentials HOT 9
- [DOC] Incorrect and invalid links HOT 1
- Expanding the volume through UI but not reflecting it in backend. HOT 1
- [TEST][BUG] system restore stuck because of the volume/PV/PVC restoration
- [BACKPORT][v1.6.3][IMPROVEMENT] Improve and simplify chart values.yaml HOT 1
- [BACKPORT][v1.5.6][IMPROVEMENT] Improve and simplify chart values.yaml HOT 1
- Longhorn 1.6.2 - pvc is not ready for workloads HOT 1
- [BUG] Failed to delete a v2 orphan replica
- [FEATURE] Automatically attach the volumes for trimming filesystem HOT 1
- [TEST][FEATURE] Automatically attach the volumes for trimming filesystem
- [BUG] Fresh RWX volume on a fresh cluster install fails to ever mount (dual stack, IPv6-first cluster)
- [UI][IMPROVEMENT] Tweak some minor UI issues
- [UI][FEATURE] Multiple backup stores support
- [BUG] Request for a guide to the longhorn metric
- [BUG] System backup failed because backup creation failed. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from longhorn.