blob: 9655e5ebb1826f0860b9a968e23df5edaa1ae7e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
--- a/lxd/container_lxc.go
+++ b/lxd/container_lxc.go
@@ -3509,8 +3509,13 @@ func (c *containerLXC) getDiskLimits() (map[string]deviceBlockLimit, error) {
for _, block := range blocks {
dev := strings.TrimPrefix(block, "/dev/")
+
+ if strings.Contains(dev,"/") {
+ continue
+ }
+
if !shared.PathExists(fmt.Sprintf("/sys/class/block/%s/dev", dev)) {
- return nil, fmt.Errorf("Disk is missing /sys/class/block entry")
+ return nil, fmt.Errorf("Disk %s is missing /sys/class/block entry", dev)
}
block, err := ioutil.ReadFile(fmt.Sprintf("/sys/class/block/%s/dev", dev))
|