⚲
Project
General
Profile
Sign in
Home
Projects
Help
Search
:
Foreman
All Projects
Overview
Activity
Roadmap
Issues
Wiki
Repository
Download (1.72 KB)
Bug #17395
» kickstart-lvm.txt
Tomasz Gromowski
, 11/18/2016 11:14 AM
<%#
kind: ptable
name: MY Kickstart LVM
oses:
- CentOS
- Fedora
- RedHat
%>
<%
vg_name = @host.params['partitioning-vg-name'] ? @host.params['partitioning-vg-name'] : 'vg00'
partitioning_filesystem = @host.params['partitioning-filesystem'] ? @host.params['partitioning-filesystem'] : 'ext4'
var_size = @host.params['var_size'] ? @host.params['var_size'] : ''
home_size = @host.params['home_size'] ? @host.params['home_size'] : ''
swap_size = @host.params['swap_size'] ? @host.params['swap_size'] : ''
root_size = @host.params['root_size'] ? @host.params['root_size'] : '5120'
gpt = @host.params['gpt'] ? @host.params['gpt'] : false
-%>
#Dynamic
disks=($(awk '{if ($NF ~ "^(v|s|h)d|cciss" && $NF !~ "((s|h)d|c.d.)[a-z][0-9]$") print $4}' /proc/partitions))
cat <<EOF > /tmp/diskpart.cfg
zerombr
clearpart --all --initlabel
part /boot --ondisk=${disks[0]} --fstype=<%= partitioning_filesystem %> --size 300 --asprimary
part pv.01 --ondisk=${disks[0]} --size=8120 --grow
volgroup <%= vg_name %> pv.01
logvol / --fstype=<%= partitioning_filesystem %> --name=root --vgname=<%= vg_name %> --size=<%= root_size %>
<% if swap_size != '' -%>
logvol swap --name=swap --vgname=<%= vg_name %> --size=<%= swap_size %>
<% end -%>
<% if var_size != '' -%>
logvol /var --fstype=<%= partitioning_filesystem %> --name=var --vgname=<%= vg_name %> --size=<%= var_size %>
<% else -%>
logvol /var --fstype=<%= partitioning_filesystem %> --name=var --vgname=<%= vg_name %> --percent=20
<% end -%>
<% if home_size != '' -%>
logvol /home --fstype=<%= partitioning_filesystem %> --name=home --vgname=<%= vg_name %> --size=<%= home_size %>
<% else -%>
logvol /home --fstype=<%= partitioning_filesystem %> --name=home --vgname=<%= vg_name %> --grow --size=5120
<% end -%>
EOF
« Previous
1
2
3
…
6
Next »
(1-1/6)
Loading...