project-machine / disko

Disk Operations API in Go
Apache License 2.0
13 stars 9 forks source link

New partitions are not noticed by linux if device is mounted/open. #53

Closed smoser closed 4 years ago

smoser commented 4 years ago

disko is currently relying on udev hooks to update the kernel knowledge of a partition table.

In practice, @rchamarthy saw that that was not getting done when the disk was mounted.

disko should either call partx --add ${PT_NUMBER} ${DISK_PATH} , addpart or do the equivalent linux syscall so that after doing so the device exists.