-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug?]open-local-lvm does not support the underlying disk expansion capacity #250
Comments
And when an error occurs, executing 'lvcreate -L 20Gi -n log open-local-pool-0' will successfully create a logical volume on host. |
Can you please provide nls yaml and shcedculer log? |
nls yaml: [root@master-f66ed-0 ~]# kubectl get nls master-0c424-1 -oyaml
apiVersion: csi.xos.com/v1alpha1
kind: NodeLocalStorage
metadata:
creationTimestamp: "2023-12-15T09:16:15Z"
generation: 1
name: master-0c424-1
resourceVersion: "9104869"
uid: 959c0a6e-4b1d-4db3-ae39-0499d8278439
spec:
listConfig:
devices: {}
mountPoints: {}
vgs:
include:
- open-local-pool-[0-9]+
- yoda-pool[0-9]+
- ackdistro-pool
nodeName: master-0c424-1
resourceToBeInited:
vgs:
- devices:
- /dev/vdc
name: open-local-pool-0
spdkConfig: {}
status:
filteredStorageInfo:
updateStatusInfo:
lastUpdateTime: "2023-12-18T06:21:55Z"
updateStatus: accepted
volumeGroups:
- open-local-pool-0
nodeStorageInfo:
deviceInfo:
- condition: DiskReady
mediaType: hdd
name: /dev/vda1
readOnly: false
total: 1073741824
- condition: DiskReady
mediaType: hdd
name: /dev/vda2
readOnly: false
total: 213673574400
- condition: DiskReady
mediaType: hdd
name: /dev/vda
readOnly: false
total: 214748364800
- condition: DiskReady
mediaType: hdd
name: /dev/vdb
readOnly: false
total: 107374182400
- condition: DiskReady
mediaType: hdd
name: /dev/vdc
readOnly: false
total: 536870912000
phase: Running
state:
lastHeartbeatTime: "2023-12-18T06:21:55Z"
status: "True"
type: DiskReady
volumeGroups:
- allocatable: 536866717696
available: 156627894272
condition: DiskReady
logicalVolumes:
- condition: DiskReady
name: local-021b723d-50f3-466f-8444-979093cde3a9
total: 10737418240
vgname: open-local-pool-0
- condition: DiskReady
name: local-0a5a949d-f338-48da-8a69-0448f4946283
total: 17179869184
vgname: open-local-pool-0
- condition: DiskReady
name: local-159aabda-df09-45ae-8dd3-f6288c25078a
total: 26843545600
vgname: open-local-pool-0
- condition: DiskReady
name: local-2baf1750-6d41-44c9-a840-32fb32500eb9
total: 32212254720
vgname: open-local-pool-0
- condition: DiskReady
name: local-2f5e5c45-152e-4970-aad3-07c901a6347e
total: 1073741824
vgname: open-local-pool-0
- condition: DiskReady
name: local-42fefb87-69e3-4e8c-a1e2-fe534a7ba4b5
total: 134217728
vgname: open-local-pool-0
- condition: DiskReady
name: local-4b5083b7-d974-45bc-ba5c-e50fe5037f63
total: 26843545600
vgname: open-local-pool-0
- condition: DiskReady
name: local-4de332ff-70d7-44a6-8dd4-787667ef5e01
total: 26843545600
vgname: open-local-pool-0
- condition: DiskReady
name: local-5cac3ff7-8a12-4035-9b32-f4c96a9d21f9
total: 17179869184
vgname: open-local-pool-0
- condition: DiskReady
name: local-74104d3e-0d07-41fe-b63d-f9233677f519
total: 26843545600
vgname: open-local-pool-0
- condition: DiskReady
name: local-746dcc0c-08f5-481a-8d0b-f2f2028c20cd
total: 1073741824
vgname: open-local-pool-0
- condition: DiskReady
name: local-888cbf6a-59e5-46bc-a66f-f78a7d83d72a
total: 21474836480
vgname: open-local-pool-0
- condition: DiskReady
name: local-8e9f2edc-78cc-4712-a6f4-aa41f88b5cc8
total: 10737418240
vgname: open-local-pool-0
- condition: DiskReady
name: local-8fce70ff-9636-4afa-8df1-ff171f0d69a2
total: 13958643712
vgname: open-local-pool-0
- condition: DiskReady
name: local-a6d8682c-7c3d-4c14-86ee-a9b46b19d636
total: 26843545600
vgname: open-local-pool-0
- condition: DiskReady
name: local-ac48e5d9-7a82-4cfc-9ba9-16fc63ee9905
total: 2147483648
vgname: open-local-pool-0
- condition: DiskReady
name: local-b045c2ee-6b2c-4cd3-9f2f-c3a35be281e8
total: 26843545600
vgname: open-local-pool-0
- condition: DiskReady
name: local-b936fcd5-41a0-410e-89fd-a0dc83c3641d
total: 26843545600
vgname: open-local-pool-0
- condition: DiskReady
name: local-d5e395a0-928c-4713-9f4a-4a4af0302c03
total: 5368709120
vgname: open-local-pool-0
- condition: DiskReady
name: local-d7486cfe-40cd-4270-b9ca-922d9fa3fbec
total: 26843545600
vgname: open-local-pool-0
- condition: DiskReady
name: local-f7c2cd7f-47b3-4e6c-a7d5-15548141f3b3
total: 5368709120
vgname: open-local-pool-0
- condition: DiskReady
name: local-fc981a0d-02c2-4eeb-9e04-1cebe275e757
total: 26843545600
vgname: open-local-pool-0
name: open-local-pool-0
physicalVolumes:
- /dev/vdc
total: 536866717696
- allocatable: 19323158528
available: 19323158528
condition: DiskReady
logicalVolumes:
- condition: DiskReady
name: docker
total: 53687091200
vgname: platos
- condition: DiskReady
name: home
total: 75161927680
vgname: platos
- condition: DiskReady
name: kubelet
total: 12884901888
vgname: platos
- condition: DiskReady
name: log
total: 21474836480
vgname: platos
- condition: DiskReady
name: root
total: 134255476736
vgname: platos
- condition: DiskReady
name: swap
total: 4253024256
vgname: platos
name: platos
physicalVolumes:
- /dev/vda2
- /dev/vdb
total: 321040416768 scheduler log:
|
vgs: [root@master-0c424-1 ~]# vgs open-local-pool-0
VG #PV #LV #SN Attr VSize VFree
open-local-pool-0 1 22 0 wz--n- <500.00g 145.87g
[root@master-0c424-1 ~]# pvs /dev/vdc
PV VG Fmt Attr PSize PFree
/dev/vdc open-local-pool-0 lvm2 a-- <500.00g 145.87g |
Is there any log related logic below? you need to enable log level = 6 for _, vg := range addedVGs {
log.V(6).Infof("adding new volume group %q(total:%d,allocatable:%d,used:%d) on node cache %s",
vg, vgMapInfo[vg].Total, vgMapInfo[vg].Allocatable, vgMapInfo[vg].Total-vgMapInfo[vg].Available, cacheNode.NodeName)
log.V(6).Infof("updatedName raw info:%#v", vgMapInfo[vg])
log.V(6).Infof("cachedNode.VGs: %#v, is nil %t", cacheNode.VGs, cacheNode.VGs == nil)
vgRequested := utils.GetVGRequested(nc.LocalPVs, vg)
vgResource := SharedResource{vg, int64(vgMapInfo[vg].Allocatable), vgRequested}
cacheNode.VGs[ResourceName(vg)] = vgResource
log.V(6).Infof("vgResource: %#v", vgResource)
}
for _, vg := range unchangedVGs {
// update the size if the updatedName got extended
v := cacheNode.VGs[ResourceName(vg)]
v.Capacity = int64(vgMapInfo[vg].Allocatable)
cacheNode.VGs[ResourceName(vg)] = v
log.V(6).Infof("updating existing volume group %q(total:%d,allocatable:%d,used:%d) on node cache %s",
vg, vgMapInfo[vg].Total, vgMapInfo[vg].Allocatable, vgMapInfo[vg].Total-vgMapInfo[vg].Available, cacheNode.NodeName)
}
for _, vg := range removedVGs {
delete(cacheNode.VGs, ResourceName(vg))
log.V(6).Infof("deleted vg %s from node cache %s", vg, nodeLocal.Name)
} |
log level = 6 in the source code. Do I need to change the logging configuration? If so, how to configure it? |
adding |
@pangding97 any more info? |
The problem environment is gone. And the local environment is not reproduced. |
@peter-wangxu Hi, I cleaned up the previous lvm with [root@dx-0237da4f standard]# vgs
VG #PV #LV #SN Attr VSize VFree
platos 1 3 0 wz--n- <79.00g 1020.00m
platos00 1 3 0 wz--n- <219.00g 0
xoslocal-open-local-lvm 1 1 0 wz--n- <100.00g <99.00g However, the scheduler(log v=6) still has the following error:
And, - allocatable: 107369988096
available: 106296246272
condition: DiskReady
logicalVolumes:
- condition: DiskReady
name: local-09d377a6-4074-43ce-9574-4376710bdde5
total: 1073741824
vgname: open-local-lvm
name: open-local-lvm
physicalVolumes:
- /dev/vde
total: 10736998809 |
This is not a question. The reclaim policy of the StorageClass (SC) is set to In conclusion, this issue will be closed. Thank you for the response! |
Ⅰ. Issue Description
vgs
check disk capacity,But open-local fails to create an lvm with an error:
Ⅱ. Describe what happened
vgs
to see that the volume group has no capacity.Add capacity to the underlying disk
/dev/vdb
. Usepvresize
to update the capacity of the physical volume.Check that the
vgs
has been updated to the expanded capacity.Failed to create a volume, pvc
Pending
Ⅲ. Describe what you expected to happen
Ⅳ. How to reproduce it (as minimally and precisely as possible)
Fill the VG and expand the underlying disk.
After the expansion is successful, you create the PVC.
Ⅴ. Anything else we need to know?
Where does the vg capacity for open-local reads come from? Isn't it updated according to the nls?
Ⅵ. Environment:
uname -a
):4.18The text was updated successfully, but these errors were encountered: