-
Notifications
You must be signed in to change notification settings - Fork 254
Volume hotplug: clear up docs --persist #877
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
base: main
Are you sure you want to change the base?
Conversation
Things have changed since the doc was introduced, update to reflect that. Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
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.
/approve
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: awels The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cc @aburdenthehand |
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.
Thanks for the cleanup @akalenyu. Definitely an improvement.
I just have a couple of suggestions (second is more of a question)
@@ -85,36 +85,18 @@ $ virtctl addvolume vmi-fedora --volume-name=example-lun-hotplug --disk-type=lun | |||
``` | |||
|
|||
### Retain hotplugged volumes after restart | |||
In many cases it is desirable to keep hotplugged volumes after a VM restart. It may also be desirable to be able to unplug these volumes after the restart. The `persist` option makes it impossible to unplug the disks after a restart. If you don't specify `persist` the default behaviour is to retain hotplugged volumes as hotplugged volumes after a VM restart. This makes the `persist` flag mostly obsolete unless you want to make a volume permanent on restart. | |||
In many cases it is desirable to keep hotplugged volumes after a VM restart. It may also be desirable to be able to unplug these volumes after the restart. The `persist` option makes it possible to unplug the disks after a restart. If you don't specify `persist`, the volume is only ever hotplugged on the VMI (instance) level. |
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.
In many cases it is desirable to keep hotplugged volumes after a VM restart. It may also be desirable to be able to unplug these volumes after the restart. The `persist` option makes it possible to unplug the disks after a restart. If you don't specify `persist`, the volume is only ever hotplugged on the VMI (instance) level. | |
In many cases it is desirable to keep hotplugged volumes after a VM restart. The `persist` option will retain the hotplugged volume after a restart and not impact your ability to unplug the volume if desired. If you don't specify `persist`, the volume is only ever hotplugged on the VMI (instance) level. |
In some cases you want a hotplugged volume to stay hotplugged after a restart of the VM. | ||
In that case, you can call the addvolume command with the --persist flag. | ||
This means that when you restart the VM, the disk is already defined in the VM (as hotplugged), and thus is hotplugged to the new VMI. |
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'm a bit confused, isn't this covered in line 88? If so, maybe we can combine the two into one section:
### Retain hotplugged volumes after restart with
persist option
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.
+1
Pull requests that are marked with After that period the bot marks them with the label /label needs-approver-review |
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.
Thanks for the PR!
Just a couple of comments
In some cases you want a hotplugged volume to stay hotplugged after a restart of the VM. | ||
In that case, you can call the addvolume command with the --persist flag. | ||
This means that when you restart the VM, the disk is already defined in the VM (as hotplugged), and thus is hotplugged to the new VMI. |
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.
+1
machine: | ||
type: "" | ||
``` | ||
> *NOTE* The persist flag could also be used with removevolume to unplug in the same manner |
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.
Not sure I understand... What is the difference between using removevolume
with --persist
and without it?
Could you please add an example to the ###Removevolume section?
machine: | ||
type: "" | ||
``` | ||
> *NOTE* The persist flag could also be used with removevolume to unplug in the same manner |
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.
Should we also add some info about how to mount the hotplugged disk to a VM? At least with the example for Linux:
Inside the VM (via virtctl console <vm-name> or SSH), run:
lsblk
Look for a new device (e.g., /dev/sda, /dev/vdb, etc.) that doesn't have a mount point.
Mount the new disk:
sudo mkfs.ext4 /dev/sda
sudo mkdir /mnt/hotplug
sudo mount /dev/sda /mnt/hotplug
What this PR does / why we need it:
Things have changed since the doc was introduced,
update to reflect that.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.
Release note: