全部博文(150)
分类: 系统运维
2017-04-07 15:38:06
目的
测试ceph主机的安装的kickstart文件
磁盘配置
4块500G盘做了raid5,一块600G做了raid0 raid5 上做了两个vg,给ceph虚拟出两块硬盘
ks文件中part部分配置
#part part /boot --fstype="xfs" --size=500 part pv.01 --maxsize=307200 part pv.02 --grow volgroup centos pv.01 volgroup ceph pv.02 logvol / --fstype="xfs" --size=51200 --name=root --vgname=centos logvol swap --fstype="swap" --size=8192 --name=swap --vgname=centos logvol /cdc --vgname=centos --size=102400 --name=cdcvol --fstype=xfs
设置profile使用上面的ks文件
cobbler profile edit --name=CentOS_7.2_X86_64-x86_64 --kickstart=/var/lib/cobbler/kickstarts/ceph.ks根据mac地址设置
cobbler system add --name=ceph --mac=00:22:19:69:58:27 --ip-address=192.168.1.241 --subnet=255.255.255.0 \ --gateway=192.168.1.254 --interface=em1 --static=1 --profile=CentOS_7.2_X86_64-x86_64
补充 dns设置
cobbler system edit --name=ceph --name-servers="192.168.1.230 8.8.8.8"确认
cobbler system list ceph h210 h230 h240
cobbler配置更新
cobbler sync
先安装epel仓库
yum install -y epel-release 再安装koan
yum install -y koan
koan --display --server=192.168.1.164 --profile=CentOS_7.2_X86_64-x86_64 - looking for Cobbler at - reading URL: install_tree: name : CentOS_7.2_X86_64-x86_64 distro : CentOS_7.2_X86_64-x86_64 kickstart : ks_meta : tree= install_tree : kernel : /var/www/cobbler/ks_mirror/CentOS_7.2_X86_64/images/pxeboot/vmlinuz initrd : /var/www/cobbler/ks_mirror/CentOS_7.2_X86_64/images/pxeboot/initrd.img kernel_options : ks= ksdevice=link kssendmac lang= text repos : virt_ram : 512 virt_disk_driver : raw virt_type : kvm virt_path : virt_auto_boot : 1
koan --replace-self --server=192.168.1.164 --profile=CentOS_7.2_X86_64-x86_64 - looking for Cobbler at - reading URL: install_tree: downloading initrd initrd.img to /boot/initrd.img_koan url=http://192.168.1.164/cobbler/images/CentOS_7.2_X86_64-x86_64/initrd.img - reading URL: http://192.168.1.164/cobbler/images/CentOS_7.2_X86_64-x86_64/initrd.img downloading kernel vmlinuz to /boot/vmlinuz_koan url=http://192.168.1.164/cobbler/images/CentOS_7.2_X86_64-x86_64/vmlinuz - reading URL: http://192.168.1.164/cobbler/images/CentOS_7.2_X86_64-x86_64/vmlinuz - ['/sbin/grubby', '--add-kernel', '/boot/vmlinuz_koan', '--initrd', '/boot/initrd.img_koan', '--args', '"ks= ksdevice=link kssendmac lang= text "', '--copy-default', '--make-default', '--title=kick1457596394'] - ['/sbin/grubby', '--update-kernel', '/boot/vmlinuz_koan', '--remove-args=root'] - reboot to apply changes
以单独配置的system安装
koan --replace-self --server=192.168.1.164 --system=ceph - looking for Cobbler at - reading URL: install_tree: downloading initrd initrd.img to /boot/initrd.img_koan url=http://192.168.1.164/cobbler/images/CentOS_7.2_X86_64-x86_64/initrd.img - reading URL: http://192.168.1.164/cobbler/images/CentOS_7.2_X86_64-x86_64/initrd.img downloading kernel vmlinuz to /boot/vmlinuz_koan url=http://192.168.1.164/cobbler/images/CentOS_7.2_X86_64-x86_64/vmlinuz - reading URL: http://192.168.1.164/cobbler/images/CentOS_7.2_X86_64-x86_64/vmlinuz - ['/sbin/grubby', '--add-kernel', '/boot/vmlinuz_koan', '--initrd', '/boot/initrd.img_koan', '--args', '"ks= ksdevice=link kssendmac lang= text "', '--copy-default', '--make-default', '--title=kick1457616034'] - ['/sbin/grubby', '--update-kernel', '/boot/vmlinuz_koan', '--remove-args=root'] - reboot to apply changes
ceph可以直接使用物理磁盘,所以将调整如下
系统盘:2块500G做aid1,作为系统安装使用 osd1:1块500G osd2:1块600G
那么ks文件分区修改如下:
part /boot --fstype="xfs" --size=500 --ondisk=sda ## 必须指定磁盘,否则cobbler会出错 part pv.01 --grow --ondisk=sda ## 必须指定磁盘,否则cobbler会出错 volgroup centos pv.01 logvol / --fstype="xfs" --size=51200 --name=root --vgname=centos logvol swap --fstype="swap" --size=8192 --name=swap --vgname=centos