Cambiar IP a un host, del punto 1 al 3.
Agregar una ruta estática, punto 4.
Crear un filesystem en ZFS, con el pool ya creado y para montar la zonas, punto 5.
Crear e instalar una zona, punto 6 al 9.
Debajo el post. Saludos!
1- Cambiar IP, editamos y ponemos la IP que queremos, en este caso la 172.24.0.219 para el server y la 172.24.1.219 para hacer los backups.
vi /etc/hosts
El archivo se ve así:
root@serverx # cat /etc/inet/hosts # # Internet host table # ::1 localhost 127.0.0.1 localhost 172.24.0.219 serverx serverx. loghost 172.24.1.219 serverxbkp #Servidores Backup 172.24.1.8 nodobkp01 172.24.0.81 mail.empresa.com.ar smtp.empresa.com.ar 172.24.0.6 ntp.empresa.com.ar 172.25.1.8 serverbkp
2- Verificar que las placas/agregados no sean afectadas por el cambio, este caso aggr1 y aggr2.
cat /etc/hostname.
root@serverx # cat /etc/hostname.usbecm0 163.254.182.71 netmask 255.255.255.0 root@serverx # cat /etc/hostname.aggr1 serverx root@serverx # cat /etc/hostname.aggr2 serverxbkp
3- Reiniciar el equipo shutdown -i6 -g0 -y
root@serverx # shutdown -i6 -g0 -y Shutdown started. Wednesday, November 25, 2015 04:54:12 PM ART Changing to init state 6 - please wait Broadcast Message from root (console) on serverx Wed Nov 25 16:54:13... THE SYSTEM serverx IS BEING SHUT DOWN NOW ! ! ! Log off now or risk your files being damaged root@serverx # Nov 25 16:54:15 serverx EV_AGENT[990]: Signal TERM received
root@serverx # ifconfig -a lo0: flags=2001000849mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 aggr1: flags=1000843 mtu 1500 index 2 inet 172.24.0.219 netmask ffffff00 broadcast 172.24.0.255 ether 0:c0:dd:25:7a:2c aggr2: flags=1000843 mtu 1500 index 3 inet 172.24.1.219 netmask ffffff00 broadcast 172.24.1.255 ether 0:c0:dd:25:80:50 usbecm0: flags=1000843 mtu 1500 index 4 inet 163.254.182.71 netmask ffffff00 broadcast 169.254.255.255 ether 2:21:28:57:47:17 root@serverx #
4- Agregar una nueva ruta estática permanentemente. En este caso, sirve para conectar a los servidores que están dentro del octeto 25.
route -p add <ruta/red>
root@serverx # route -p add 172.25.1.8 -netmask 255.255.255.255 172.24.1.1 add net 172.25.1.8: gateway 172.24.1.1 add persistent net 172.25.1.8: gateway 172.24.1.1 root@serverx # ping -s 172.25.1.8 PING 172.25.1.8: 56 data bytes 64 bytes from serverbkp (172.25.1.8): icmp_seq=0. time=1.81 ms 64 bytes from serverbkp (172.25.1.8): icmp_seq=1. time=1.49 ms 64 bytes from serverbkp (172.25.1.8): icmp_seq=2. time=1.57 ms 64 bytes from serverbkp (172.25.1.8): icmp_seq=3. time=1.47 ms ^C ----172.25.1.8 PING Statistics---- 4 packets transmitted, 4 packets received, 0% packet loss round-trip (ms) min/avg/max/stddev = 1.47/1.58/1.81/0.16
5- Crear filesystem y punto de montaje (en este caso ZFS)
mkdir <directorio/punto de montaje>
root@serverx # cd /export root@serverx # mkdir zones root@serverx # zfs create -o mountpoint=/export/zones rpool/zonesEl filesytem creado se ve al final:
root@serverx # df -h Filesystem size used avail capacity Mounted on rpool/ROOT/solaris 274G 60G 99G 38% / /devices 0K 0K 0K 0% /devices ctfs 0K 0K 0K 0% /system/contract proc 0K 0K 0K 0% /proc mnttab 0K 0K 0K 0% /etc/mnttab swap 277G 440K 277G 1% /etc/svc/volatile objfs 0K 0K 0K 0% /system/object sharefs 0K 0K 0K 0% /etc/dfs/sharetab /platform/sun4v/lib/libc_psr/libc_psr_hwcap3.so.1 159G 60G 99G 38% /platform/sun4v/lib/libc_psr.so.1 /platform/sun4v/lib/sparcv9/libc_psr/libc_psr_hwcap3.so.1 159G 60G 99G 38% /platform/sun4v/lib/sparcv9/libc_psr.so.1 fd 0K 0K 0K 0% /dev/fd swap 277G 128K 277G 1% /tmp swap 277G 72K 277G 1% /var/run rpool/export 274G 33K 99G 1% /export rpool/export/home 274G 19G 99G 16% /export/home rpool/oracle 274G 25G 99G 21% /oracle rpool 274G 106K 99G 1% /rpool rpool/zones 274G 31K 99G 1% /export/zones
6- Crear zona
root@serverx # zonecfg -z test test: No such zone configured Use 'create' to begin configuring a new zone. zonecfg:test> create zonecfg:test> set zonepath=/export/zones/test zonecfg:test> set autoboot=true zonecfg:test> set bootargs="-m verbose" zonecfg:test> set scheduling-class=FSS zonecfg:test> add net zonecfg:test:net> set physical=aggr1 zonecfg:test:net> set address=172.24.0.220 zonecfg:test:net> end zonecfg:test> verify zonecfg:test> commit zonecfg:test> exit
7- Instalar zona zoneadm -z
root@serverx # zoneadm -z test install
A ZFS file system has been created for this zone. Preparing to install zone. Creating list of files to copy from the global zone. Copying <2887> files to the zone. Initializing zone product registry. Determining zone package initialization order. Preparing to initialize <1526> packages on the zone. Initialized <1526> packages on zone. Zone contains a log of the zone installation.is initialized. Installation of <3> packages was skipped. Installation of these packages generated warnings: The file
8- Verificamos la zona creada y la booteamos
zoneadm list -iv zoneadm -zboot -- -m verbose root@serverx # zoneadm list -iv ID NAME STATUS PATH BRAND IP 0 global running / native shared - test installed /export/zones/test native shared root@serverx # zoneadm -z test boot -- -m verbose root@serverx # zoneadm list -iv ID NAME STATUS PATH BRAND IP 0 global running / native shared 1 test running /export/zones/test native shared
9- Nos logueamos y a disfrutar (?) zlogin
root@serverx # zlogin test [Connected to zone 'test' pts/1] Oracle Corporation SunOS 5.10 Generic Patch January 2005 # ifconfig -a lo0:2: flags=2001000849mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 aggr1:1: flags=1000843 mtu 1500 index 2 inet 172.24.0.220 netmask ffffff00 broadcast 172.24.0.255 # df -h Filesystem size used avail capacity Mounted on / 98G 574M 98G 1% / /dev 98G 574M 98G 1% /dev /lib 158G 60G 98G 39% /lib /platform 158G 60G 98G 39% /platform /sbin 158G 60G 98G 39% /sbin /usr 158G 60G 98G 39% /usr proc 0K 0K 0K 0% /proc ctfs 0K 0K 0K 0% /system/contract mnttab 0K 0K 0K 0% /etc/mnttab objfs 0K 0K 0K 0% /system/object swap 275G 304K 275G 1% /etc/svc/volatile /platform/sun4v/lib/libc_psr/libc_psr_hwcap3.so.1 158G 60G 98G 39% /platform/sun4v/lib/libc_psr.so.1 /platform/sun4v/lib/sparcv9/libc_psr/libc_psr_hwcap3.so.1 158G 60G 98G 39% /platform/sun4v/lib/sparcv9/libc_psr.so.1 fd 0K 0K 0K 0% /dev/fd swap 275G 0K 275G 0% /tmp swap 275G 8K 275G 1% /var/run # uname -a SunOS test 5.10 Generic_150400-04 sun4v sparc sun4v # exit [Connection to zone 'test' pts/1 closed]
No hay comentarios:
Publicar un comentario