* [[http://www.logiqwest.com/dataCenter/Demos/RunBooks/Zones/createSelfContainedZone.html|Gestion des zones]]
===== Lister les infos d'une zone =====
zonecfg -z server info
===== Infos RAM d'une zone =====
prstat -Z
prstat -z zone -s rss
prstat -z zone -s size
===== Arrachage de lun impactant la zone locale =====
* Dans la globale le FS est en IO error :
unmount -f /data ... (zone local arretée)
=> vxdisk list indique que l'on est "failed was"
* Quand la lun est revenu :
vxreattach
vxvol -g mondg start volX
fsck -F vxfs -o full /dev/vx...
mount /data :error already mounted # => alors que ce n'est pas le cas, workaround:
mv /mount_point /mount_poit.bak ; mkdir /mount_point
mount /data
*Démarrage de la zone locale
===== Global zone name from local zone =====
pkgparam -v SUNWcsr |grep From:| grep -v fern | head -1|awk '{print $9}'
===== Add FS to local zone =====
vxprint -g h1s1sym72tDG_kernel -th
vxassist -g h1s1sym72tDG_kernel make itmVOL 2G
mkfs -F vxfs -o largefiles,bsize=8192 /dev/vx/rdsk/h1s1sym72tDG_kernel/itmVOL
version 7 layout
20971520 sectors, 1310720 blocks of size 8192, log size 2048 blocks
largefiles supported
cp /etc/vfstab /etc/vfstab.20150804
vi /etc/vfstab
mount /DATA/h1s1sym72t/softs/monitoring/ITM
zonecfg -z h1s1sym72t info
zonecfg -z h1s1sym72t
zonecfg:h1s1sym30w> add fs
zonecfg:h1s1sym30w:fs> set dir=/softs/monitoring/ITM
zonecfg:h1s1sym30w:fs> set special=/DATA/h1s1sym72t/softs/monitoring/ITM
zonecfg:h1s1sym30w:fs> set type=lofs
zonecfg:h1s1sym30w:fs> end
zonecfg:h1s1sym30w> exit
mount -F lofs /DATA/h1s1sym72t/softs/monitoring/ITM /ZONES/h1s1sym72t/h1s1sym72t/root/softs/monitoring/ITM
===== Add RAM and swap =====
- PROD / h1s1sym0ii
o RAM : 64GB è 100GB (ie. +36GB)
o SWAP : 92GB è 120GB (ie. +28GB)
* Configuration Actuelle :
root@h1s0klazi06 # prctl -n zone.max-swap -i zone h1s1sym0ii
zone: 22: h1s1sym0ii
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
zone.max-swap
privileged 156GB - deny - <<<< Memoire virtuel = RAM + SWAP
system 16.0EB max deny -
root@h1s0klazi06 # zonecfg -z h1s1sym0ii info
[...]
capped-memory:
physical: 64G
[swap: 156G] <<<<<<<<<<<<<<< Memoire virtuel = RAM + SWAP
[...]
# prctl -n zone.max-swap -v 220G -r -e deny -t privileged -i zone h1s1sym0ii
root@h1s0klazi06 # prctl -n zone.max-swap -i zone h1s1sym0ii
zone: 22: h1s1sym0ii
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
zone.max-swap
privileged 220GB - deny -
system 16.0EB max deny
-
# rcapadm -z h1s1sym0ii -m 100G
22 h1s1sym0ii 477 61G 46G 100G 729G 0K 886M 0K
156
zonecfg -z h1s1sym0ii
select capped-memory
set physical=100G
set swap=220G
end
verify
commit
exit
root@h1s0klazi06 # zonecfg -z h1s1sym0ii info
capped-memory:
physical: 100G
[swap: 220G]
Zone Name | CPU Shares | RAM Capping MB | SWAP Capping MB | Physical SWAP MB | Comment
h1s1sym0ii | 200 (34.78%) | 102400 (42.02%) | 225280 | 122880 (38.71%) | MP3DBCI
* PréPROD / h1s1sym1fm
o RAM : 65GB è 100GB (ie. +35GB)
o SWAP : 26GB è 120GB (ie. +94GB)
root@h1s0klazi05 # zonecfg -z h1s1sym1fm info
capped-memory:
physical: 65G
[swap: 91G] <<<<<<<<<<<<<<< Memoire virtuel = RAM + SWAP
root@h1s0klazi05 # prctl -n zone.max-swap -i zone h1s1sym1fm
zone: 7: h1s1sym1fm
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
zone.max-swap
privileged 91.0GB - deny - <<<<<<<<<<<<<<< Memoire virtuel = RAM + SWAP
system 16.0EB max deny -
* Quantity of memory to be added:
*** 91G (Memoire virtuel actuel) + 35G (+RAM asked) + 94G (+SWAP asked) = 220G
# prctl -n zone.max-swap -v 220G -r -e deny -t privileged -i zone h1s1sym1fm
# rcapadm -z h1s1sym1fm -m 100G
zonecfg -z h1s1sym1fm
select capped-memory
set physical=100G
set swap=220G
end
verify
commit
exit
root@h1s0klazi05 # zonecfg -z h1s1sym1fm info
[...]
capped-memory:
physical: 100G
[swap: 220G]
[...]
Zone Name | CPU Shares | RAM Capping MB | SWAP Capping MB | Physical SWAP MB | Comment
h1s1sym1fm | 296 (46.25%) | 102400 (80.65%) | 225280 | 122880 (75.00%) | RS3DBCI
===== /var dédié =====
zfs snapshot rpool/ROOT/s10s_u11wos_24a@var
zfs create -o mountpoint=/var rpool/ROOT/s10s_u11wos_24a/var
zfs mount -o mountpoint=/mnt rpool/ROOT/s10s_u11wos_24a/var
rsync -a /.zfs/snapshot/var/var/ /mnt/
zfs umount rpool/ROOT/s10s_u11wos_24a/var
zfs destroy rpool/ROOT/s10s_u11wos_24a@var
init 6
lucreate -n newBE
zfs set canmount=noauto rpool/ROOT/s10s_u11wos_24a/var
zfs set canmount=noauto rpool/ROOT/newBE/var
zfs mount -o mountpoint=/mnt rpool/ROOT/newBE
rm -rf /mnt/var/
mkdir /mnt/var/
zfs umount rpool/ROOT/newBE
luactivate newBE
init 6
zfs mount -o mountpoint=/mnt rpool/ROOT/s10s_u11wos_24a
rm -rf /mnt/var/
mkdir /mnt/var/
zfs umount rpool/ROOT/s10s_u11wos_24a
luactivate s10s_u11wos_24a
init 6
ludelete -n newBE
bash-3.2# lufslist s10s_u11wos_24a
nom de l'environnement d'initialisation : s10s_u11wos_24a
Cet environnement d'initialisation est actuellement actif.
Cet environnement d'initialisation sera activé à la prochaine initialisation du système.
Système de fichiers typesf taille du périphérique Monté sur Options de montage
----------------------- -------- ------------ ------------------- --------------
/dev/zvol/dsk/rpool/swap swap 2147483648 - -
rpool/ROOT/s10s_u11wos_24a zfs 5345684992 / -
rpool/export zfs 64512 /export -
rpool/export/home zfs 31744 /export/home -
rpool zfs 8739348992 /rpool -
rpool/ROOT/s10s_u11wos_24a/var zfs 92194816 /var -