Bug 1550205

Summary: [Docs][Admin][Planning] Update guidelines for using local storage for RHVH
Product: Red Hat Enterprise Virtualization Manager Reporter: Ryan Barry <rbarry>
Component: DocumentationAssignee: Emma Heftman <eheftman>
Status: CLOSED CURRENTRELEASE QA Contact: Avital Pinnick <apinnick>
Severity: medium Docs Contact:
Priority: high    
Version: 4.2.0CC: danken, kmashalk, lbopf, lsurette, mkalinin, rbalakri, rbarry, srevivo, ykaul, ylavi
Target Milestone: ovirt-4.2.2Keywords: Triaged
Target Release: ---Flags: lsvaty: testing_plan_complete-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: docs-accepted
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-20 10:21:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Docs RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ryan Barry 2018-02-28 19:19:43 UTC
Description of problem:
The guide for upgrading RHVH with local storage clearly indicates that local storage should be on a separate partition (recommendations for clearpart, /dev/sdX1, etc)

https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.1/html/upgrade_guide/Upgrading_RHVH_Local_Storage/

But the docs for adding local storage do not make any reference to this:

https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.2-beta/html/administration_guide/sect-preparing_and_adding_local_storage

Local storage on RHVH should always be on a filesystem separate from /. A different disk, or LV is ideal, otherwise customers will lose local VMs when upgrading.

Updating the docs to suggest "lvcreate ..." on NGN and adding it to fstab or a systemd mount target would be perfect. Otherwise, /var/lib is ok.

Comment 1 Lucy Bopf 2018-03-01 06:58:03 UTC
Accepting into Beta 3 program and assigning to Emma for review.

Comment 2 Emma Heftman 2018-03-01 08:58:58 UTC
Hey Ryan
Thanks for your feedback.

1. Could you please provide me with the actual steps that you think should be performed for RHVH.

2. I assume we will split the Preparing Local Storage into two...instructions for non-RHVH and these new instructions for RHVH. correct?

Preparing Local Storage for RHV hosts

and 

Preparing Local storage for RHVH

Thanks
Emma

Comment 3 Ryan Barry 2018-03-01 11:49:45 UTC
(In reply to Emma Heftman from comment #2)
> Hey Ryan
> Thanks for your feedback.
> 
> 1. Could you please provide me with the actual steps that you think should
> be performed for RHVH.

It's difficult to give exact steps, since the LVM volume group may have a different name, or users may want to use a different size.

I would expect administrators to be familiar with LVM management. If they are not, I would refer them to platform documentation.

Either:

mkdir /data
imgbase --experimental volume --create /data $SIZE

Or:

mkdir /data
lvcreate -L $SIZE rhvh -n data
mkfs.ext4 /dev/mapper/rhvh-data
echo "/dev/mapper/rhvh-data /data ext4 defaults,discard 1 2" >> /etc/fstab

> 
> 2. I assume we will split the Preparing Local Storage into
> two...instructions for non-RHVH and these new instructions for RHVH. correct?

That is a fair assumption.

However, we may want to suggest that users on RHEL-H also use a separate filesystem. Dan, any opinions?
> 
> Preparing Local Storage for RHV hosts
> 
> and 
> 
> Preparing Local storage for RHVH
> 
> Thanks
> Emma

Comment 4 Emma Heftman 2018-03-01 12:27:17 UTC
(In reply to Ryan Barry from comment #3)
> (In reply to Emma Heftman from comment #2)
> > Hey Ryan
> > Thanks for your feedback.
> > 
> > 1. Could you please provide me with the actual steps that you think should
> > be performed for RHVH.
> 
> It's difficult to give exact steps, since the LVM volume group may have a
> different name, or users may want to use a different size.
> 
> I would expect administrators to be familiar with LVM management. If they
> are not, I would refer them to platform documentation.
> 
> Either:
> 
> mkdir /data
> imgbase --experimental volume --create /data $SIZE
> 
> Or:
> 
> mkdir /data
> lvcreate -L $SIZE rhvh -n data
> mkfs.ext4 /dev/mapper/rhvh-data
> echo "/dev/mapper/rhvh-data /data ext4 defaults,discard 1 2" >> /etc/fstab
> 
> > 
> > 2. I assume we will split the Preparing Local Storage into
> > two...instructions for non-RHVH and these new instructions for RHVH. correct?
> 
> That is a fair assumption.
> 
> However, we may want to suggest that users on RHEL-H also use a separate
> filesystem. Dan, any opinions?
> > 
> > Preparing Local Storage for RHV hosts
> > 
> > and 
> > 
> > Preparing Local storage for RHVH
> > 
> > Thanks
> > Emma

Thanks Ryan.
The Admin  guide does say:

"Local storage in the */var* directory will be lost when Red Hat Virtualization Host is reinstalled. To avoid this, you can mount external storage to a host machine for use as a local storage domain. For more information on mounting storage, see the  link:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Storage_Administration_Guide/index.html[_Red Hat Enterprise Linux Storage Administration Guide_]."

I think this covers your original suggestion of using "systemd mount target"

I can add to this paragraph the option of a logical volume as an alternative "safe" local storage option.


But what did you mean in by "Otherwise, /var/lib is ok."
Isn't this on  the same filesystem as /?

Comment 6 Ryan Barry 2018-03-01 14:12:28 UTC
(In reply to Emma Heftman from comment #4)
> Thanks Ryan.
> The Admin  guide does say:
> 
> "Local storage in the */var* directory will be lost when Red Hat
> Virtualization Host is reinstalled. To avoid this, you can mount external
> storage to a host machine for use as a local storage domain. For more
> information on mounting storage, see the 
> link:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/
> 7/html/Storage_Administration_Guide/index.html[_Red Hat Enterprise Linux
> Storage Administration Guide_]."

I think this is reasonable, but it should probably be cross-referenced from the section on local storage, as users may not read the entire storage administration guide.

> 
> I think this covers your original suggestion of using "systemd mount target"

It does and does not -- I'm primariily suggesting a systemd mount target or fstab entry for completeness of documentation. I'd expect that administrators would know to add this anyway, but just in case...

> 
> I can add to this paragraph the option of a logical volume as an alternative
> "safe" local storage option.

I think this is a great idea.

> 
> 
> But what did you mean in by "Otherwise, /var/lib is ok."
> Isn't this on  the same filesystem as /?

Not on NGN -- NGN has had a separate /var since 4.0.0

The concern here is basically this:

Users who put local storage domains for RHV on /data (for example) will lose that storage domain when RHVH is updated if /data is on the same filesystem as /

On reinstalls, we'd expect customers to be careful about data loss. On upgrades, losing local domains in /data or /vms or wherever they put them is definitely unexpected. Keeping the local domain on a different LV ensures that it is transparently preserved when RHVH is updating.

Comment 7 Emma Heftman 2018-03-06 15:22:31 UTC
(In reply to Ryan Barry from comment #6)
> (In reply to Emma Heftman from comment #4)
> > Thanks Ryan.
> > The Admin  guide does say:
> > 
> > "Local storage in the */var* directory will be lost when Red Hat
> > Virtualization Host is reinstalled. To avoid this, you can mount external
> > storage to a host machine for use as a local storage domain. For more
> > information on mounting storage, see the 
> > link:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/
> > 7/html/Storage_Administration_Guide/index.html[_Red Hat Enterprise Linux
> > Storage Administration Guide_]."
> 
> I think this is reasonable, but it should probably be cross-referenced from
> the section on local storage, as users may not read the entire storage
> administration guide.
> 
> > 
> > I think this covers your original suggestion of using "systemd mount target"
> 
> It does and does not -- I'm primariily suggesting a systemd mount target or
> fstab entry for completeness of documentation. I'd expect that
> administrators would know to add this anyway, but just in case...
> 
> > 
> > I can add to this paragraph the option of a logical volume as an alternative
> > "safe" local storage option.
> 
> I think this is a great idea.
> 
> > 
> > 
> > But what did you mean in by "Otherwise, /var/lib is ok."
> > Isn't this on  the same filesystem as /?
> 
> Not on NGN -- NGN has had a separate /var since 4.0.0
> 
> The concern here is basically this:
> 
> Users who put local storage domains for RHV on /data (for example) will lose
> that storage domain when RHVH is updated if /data is on the same filesystem
> as /
> 
> On reinstalls, we'd expect customers to be careful about data loss. On
> upgrades, losing local domains in /data or /vms or wherever they put them is
> definitely unexpected. Keeping the local domain on a different LV ensures
> that it is transparently preserved when RHVH is updating.

Do you think we should describe both or if logical volumes are the best way to go, can we expect that all customers will follow this procedure?
In this case we can remove the reference to /var/lib.

If we still need /var/lib as an option, is this the correct documentation in the Storage Guide that you think we should refer them to?
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/storage_administration_guide/nfs-clientconfig#s2-nfs-fstab

Comment 8 Ryan Barry 2018-03-06 15:49:28 UTC
I'd suggest using logical volumes rather than /var/lib, if only because /var is only 15GB on RHVH, and they'll very quickly run out of storage there.

Comment 9 Emma Heftman 2018-03-06 16:17:56 UTC
(In reply to Ryan Barry from comment #8)
> I'd suggest using logical volumes rather than /var/lib, if only because /var
> is only 15GB on RHVH, and they'll very quickly run out of storage there.

Ok. So I created a version with two options - LVs and /var/lib but after seeing this comment i removed all references to var.

Let me know whether you think this is correct and what you were looking for:
http://file.tlv.redhat.com/~eheftman/bz1550205/html-single/#Preparing_Local_Storage

I will also ask Support and get a bit more input as to whether it is reasonable to assume that all customers will crate logical volumes:
http://file.tlv.redhat.com/~eheftman/bz1550205/html-single/#Preparing_Local_Storage

Comment 10 Ryan Barry 2018-03-06 16:38:27 UTC
That looks good to me, Emma