-
Notifications
You must be signed in to change notification settings - Fork 660
Add option to add a data disk to an instance #759
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
Conversation
The data disk will show up after the base disk Typically as /dev/vdb, when running with virtio Signed-off-by: Anders F Björklund <[email protected]>
I think we would want to exclude the "data disk" from the list of files deleted by the I have not tested this with Alpine yet; I want to make sure that the "implict" data volume continues to be the "diff disk" and not the additional "data disk". |
@@ -39,6 +39,10 @@ memory: null | |||
# 🟢 Builtin default: "100GiB" | |||
disk: null | |||
|
|||
# Data size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs additional documentation to explain that this is a supplemental data volume, and the parameter is the size, and can use size-related units like "GiB". Maybe the builtin default should change to "0GiB" to make this obvious?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The datadisk
also needs to be mentioned in docs/internal.md
.
I'm not sure if there would ever be a reason to create more than one additional data volume? In which case I can't think of anything right now, but don't want us to paint ourselves into a corner that will require incompatible schema changes in the future. |
sighs On second thoughts, this is kind of weird, as "factory-reset" implies that all data is erased. On the other hand, the main reason to have a separate data volume is to be able to persist data beyond the lifetime of the instance itself. Maybe factory-reset should display a prompt when a data volume exists? And then have a |
The persistent disk for distributions that boot from a LiveCD was not considered as a "data" disk, it was more regarded as being a part of the root (or "OS") disk - using the cloud parlance*. Even though it mounts under lima-alpine:/home/anders/lima$ sudo fdisk -l
Disk /dev/vda: 100 GB, 107374182400 bytes, 209715200 sectors
366634 cylinders, 13 heads, 44 sectors/track
Units: sectors of 1 * 512 = 512 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/vda1 2,0,33 178,12,44 2048 209715199 209713152 99.9G 83 Linux
Disk /dev/vdb: 10 GB, 10737418240 bytes, 20971520 sectors
20805 cylinders, 16 heads, 63 sectors/track
Units: sectors of 1 * 512 = 512 bytes
Disk /dev/vdb doesn't contain a valid partition table But you are right, the naming could be confusing. When compare with And it could well be more than one. * https://docs.microsoft.com/en-us/azure/virtual-machines/managed-disks-overview#disk-roles
|
@@ -39,6 +39,10 @@ memory: null | |||
# 🟢 Builtin default: "100GiB" | |||
disk: null | |||
|
|||
# Data size | |||
# 🟢 Builtin default: "0" | |||
data: null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"data" isn't descriptive because everything is data 😛
maybe additionalDisks
(slice) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, "disk" is also kind of vague. And "data" was ambiguous.
Using "extra" or "additional" could work, perhaps.
722 probably requires supporting custom disk image path |
Here are my thoughts:
Altogether:
|
As I wrote in #722 (comment), I think it will be better if we manage data volumes independent of instances. Because I may want to keep the data even when I delete the instance, and not just factory reset it. And I may want to read the data from a different instance than the one that created it. So I think |
Okay, I guess we can consider the proof-of-concept concluded then (can do an array of disks, but seems it wants more) |
The data disk will show up after the root disk
Typically as /dev/vdb, when running with virtio
For #722
User needs to partition, format and mount the disk...