Bug 1459623 - Allow /var to be a mount point [NEEDINFO]
Allow /var to be a mount point
Status: ON_QA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: anaconda (Show other bugs)
x86_64 Linux
high Severity medium
: rc
: 7.4
Assigned To: Anaconda Maintenance Team
Release Test Team
Petr Bokoc
Depends On: 1098303
Blocks: 1147383 1186913 1420851 1478303 1494728
  Show dependency treegraph
Reported: 2017-06-07 11:33 EDT by Colin Walters
Modified: 2017-12-10 22:10 EST (History)
22 users (show)

See Also:
Fixed In Version: anaconda-
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1098303
: 1488435 (view as bug list)
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
ajia: needinfo? (anaconda-maint-list)

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2950951 None None None 2017-06-07 11:33 EDT
Github https://github.com/ostreedev/ostree/issues/855 None None None 2017-06-07 11:33 EDT
Github https://github.com/rhinstaller/anaconda/issues/1007 None None None 2017-06-07 11:33 EDT
Github https://github.com/rhinstaller/anaconda/pull/1132 None None None 2017-07-28 10:42 EDT

  None (edit)
Comment 10 Colin Walters 2017-07-28 10:42:33 EDT
I did test it, but it broke later unfortunately =(

Moving to 7.5.
Comment 22 Micah Abbott 2017-12-06 09:52:38 EST
The 'rhel-atomic-installer-7.4.2-1.x86_64.iso' that is available from access.redhat.com can be used to successfully install a RHELAH system with /var as a separate mount point.  I installed a VM using local libvirt stack:

# rpm-ostree status
State: idle
● rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard
                   Version: 7.4.2 (2017-10-17 02:47:56)
                    Commit: 2eceacd73c4de494ff3f90448467934614cf9f72cb316693db2cad47bd79015e
              GPGSignature: Valid signature by 567E347AD0044ADE55BA8A5F199E2F91FD431D51

# lsblk
sr0                          11:0    1 1024M  0 rom  
vda                         252:0    0  9.1G  0 disk 
├─vda1                      252:1    0  500M  0 part /boot
└─vda2                      252:2    0  8.6G  0 part 
  ├─rhelah-root             253:0    0  4.6G  0 lvm  /sysroot
  └─rhelah-var              253:1    0    4G  0 lvm  /var
loop0                         7:0    0  100G  0 loop 
└─docker-253:1-6291557-pool 253:2    0  100G  0 dm   
loop1                         7:1    0    2G  0 loop 
└─docker-253:1-6291557-pool 253:2    0  100G  0 dm   

# cat /root/anaconda-ks.cfg                                                            
# System authorization information                                                                                                                                                                                 auth --enableshadow --passalgo=sha512                                                                                                                                                                              # OSTree setup                                      
ostreesetup --osname="rhel-atomic-host" --remote="rhel-atomic-host-ostree" --url="file:///install/ostree" --ref="rhel-atomic-host/7/x86_64/standard" --nogpg
# Use graphical install                             
# Run the Setup Agent on first boot                 
firstboot --enable                                  
ignoredisk --only-use=vda                           
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'              
# System language
lang en_US.UTF-8                                    

# Network information                               
network  --bootproto=dhcp --device=eth0 --ipv6=auto --no-activate
network  --hostname=localhost.localdomain           
# Root password                                                                                          
rootpw --iscrypted <redacted>
# System services                                   
services --disabled="cloud-init,cloud-config,cloud-final,cloud-init-local" --enabled="chronyd"
# System timezone
timezone America/New_York --isUtc
user --groups=wheel --name=cloud-user --password=<redacted> --iscrypted --gecos="Cloud User"
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=vda
# Partition clearing information
clearpart --none --initlabel
# Disk partitioning information
part pv.339 --fstype="lvmpv" --ondisk=vda --size=8817
part /boot --fstype="xfs" --ondisk=vda --size=500
volgroup rhelah --pesize=4096 pv.339
logvol /  --fstype="xfs" --size=4718 --name=root --vgname=rhelah
logvol /var  --fstype="xfs" --size=4096 --name=var --vgname=rhelah

%post --erroronfail
cp /etc/skel/.bash* /var/roothome
fn=/etc/ostree/remotes.d/rhel-atomic-host-ostree.conf; if test -f ${fn} && grep -q -e '^url=file:///install/ostree' ${fn}; then rm ${fn}; fi

%post --erroronfail
# NOTE: This change only applies to 7.4 content; if building 7.3,
# you'll need an older spin-kickstarts.  More information in
# https://trello.com/c/7N8t3fuY/593-3-tweak-rhelah-build-process-for-new-subman-and-verify
# and https://github.com/candlepin/subscription-manager/pull/1519
# This is the canonical version - if changing this, remember
# to update the copies in the cloud/vagrant kickstarts too.
# Yes, this is base64 encoded to avoid quoting issues; this
# gets embedded in a lorax template which is interpreting shell.  If you
# need to fix it, just copy/paste the command line to get a base64 decoded
# version.
echo W3JlbW90ZSAicmhlbC1hdG9taWMtaG9zdC1vc3RyZWUiXQojIFRoaXMgcmVtb3RlIGNvbmZpZ3VyYXRpb24gaXMganVzdCBhIHN0dWI7IHVzZSBzdWJzY3JpcHRpb24tbWFuYWdlciBvcgojIGEgbG9jYWwgbWlycm9yIG9mIHRoZSByZXBvc2l0b3J5Lgp1cmw9ZmlsZTovLy
9pbnN0YWxsL29zdHJlZS9yZXBvCnVuY29uZmlndXJlZC1zdGF0ZT1UaGlzIHN5c3RlbSBpcyBub3QgcmVnaXN0ZXJlZCB0byBSZWQgSGF0IFN1YnNjcmlwdGlvbiBNYW5hZ2VtZW50LiBZb3UgY2FuIHVzZSBzdWJzY3JpcHRpb24tbWFuYWdlciB0byByZWdpc3Rlci4K | base64
 -d > /etc/ostree/remotes.d/redhat.conf




%addon com_redhat_kdump --enable --reserve-mb='auto'


pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty

I'm not really sure how to determine the version of 'anaconda' in the ISO, but this looks VERIFIED to me.
Comment 23 Alex Jia 2017-12-07 22:07:47 EST
It's failed to install rhel-atomic-installer-7.5.0-1.x86_64.iso by virt-manager,
and I got the error as follows, it blocks me to do further testing.


The following error occurred while installing.  This is a fatal error and installation will be aborted.

ostree ['admin', '--sysroot=/mnt/sysimage', 'init-fs', '/mnt/sysimage'] exited with code 1


BTW, I created a separated partition for /var and /boot.
Comment 24 Micah Abbott 2017-12-08 09:19:52 EST
@Alex, we've encountered some serious problems using 'rpm-ostree' and the 7.5 kernel.  I wouldn't be surprised if the 7.5 installer issues you are seeing are related.

See the following:



(Also, I just realized this BZ is about 7.5, so my comment #22 is only partially relevant.)
Comment 25 Alex Jia 2017-12-10 22:10:40 EST
(In reply to Micah Abbott from comment #24)
> See the following:
> https://bugzilla.redhat.com/show_bug.cgi?id=1428677#c17
> https://bugzilla.redhat.com/show_bug.cgi?id=1523319#c11526864
> (Also, I just realized this BZ is about 7.5, so my comment #22 is only
> partially relevant.)

Thanks Micah, good to know this.

Note You need to log in before you can comment on or make changes to this bug.