顯示具有 Solaris 標籤的文章。 顯示所有文章
顯示具有 Solaris 標籤的文章。 顯示所有文章

Solaris 10 Resource Management - project.cpu-cap

Solairs 10 7/08 add project.cpu-cap to limit cpu usages

add a project fraud, and assign user to this project
# projadd -U user1 user.test

change user user1 default project:
add a line to the end of /etc/user_attr
=> user1::::project=user.test

# id -p user1
uid=109(user1) gid=201(users) projid=100(user.test)

==> project.cpu-cap
==> a value of 100 means 100% of one CPU


add a project attribute:
# projmod -aK "project.cpu-cap=(priv,800,deny)" user.test => 50%
(it's a 16 cpu system)

# prctl -n project.cpu-cap -i project user.test
project: 100: user.test
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.cpu-cap
privileged 800 - deny -
system 4.29G inf deny -

# prstat -J
PROJID NPROC SWAP RSS MEMORY TIME CPU PROJECT
100 18 7040K 8000K 0.0% 1:08:50 49% user.test <=== 50% CPU
3 90 6880M 6910M 21% 168:18:24 8.5% default
1 25 144M 154M 0.5% 12:31:05 0.7% user.root
0 60 197M 203M 0.6% 41:03:22 0.0% system


move a process to a project task
# newtask -v -p user.test -c [pid]
.

[轉載] Recommended mount options for VxFS

http://www.mail-archive.com/veritas-vx@mailman.eng.auburn.edu/msg00289.html

節錄
DSS/HPC
==========================
VxFS mount options:
Log mode= delaylog (best performance and enables data integrity)
Logsize= medium (doesn't need to be very much larger than default or
keep default)
Mincache=direct (turn off in-kernel buffering)
Convosync=direct (delay inode updates for writes to files)

Tunefs:
Read_ahead=1 (traditional vxfs read ahead enabled)
Fcl_winterval=6000 (50 minute update interval for FCL)

VxVM kernel tuning (/etc/system)
Set vxio:vol_maxio=32768 (max IO size = 16MB)


OLTP
=======================
VxFS mount options:
Log mode= delaylog (best performance and enables data integrity)
Logsize= medium (doesn't need to be very much larger than default or
keep default)
Mincache=direct (turn off in-kernel buffering)
Convosync=direct (delay inode updates for writes to files)

Tunefs:
Read_ahead=0 (turn off read ahead)
Fcl_winterval=6000 (50 minute update interval for FCL)

VxVM kernel tuning (/etc/system)
Set vxio:vol_maxio=32768 (max IO size = 16MB)

[轉載] Basic Performance Tuning settings for the Solaris OS for Datawarehouse Loads

Friday, October 5, 2007

Basic Performance Tuning settings for the Solaris OS for Datawarehouse Loads

Below are some settings I typically change/enable on the Solaris OS for a DW environment. I generally change the default settings for OS, Network , Vxvm/VXFS, Emulex settings and Storage connectivity. All these parameters need to be tested thoroughly in a non-prod environment before being implemented.

全文詳...
http://dsstos.blogspot.com/2007/10/basic-settings-for-solaris-os-to-meet.html

.

[預告] Solaris 10 10/08 Coming soon

快出來了~,預計十月底開放下載

Solaris 10 U6 10/08
What's New
ZFS and Solaris 10 10/08 FAQ

五月 release 的 OpenSolaris 正是使用 zfs 為 root filesystem
那時就想,Solaris 10 應該也快了
這是 open 的效應嗎? :)
我覺得發展的速度好像變快了耶....
.

續 - Solaris 8 Brand Zone with VCS in Share Storage

前幾天提到 Solaris 8 Brand Zone with VCS in Share Storage

昨天 Veritas 有 patch 出來了
VERITAS Cluster Server 5.0 MP1 and MP3 Hot Fix Zone Agent Patch for Solaris 10 SPARC

實際測試的結果....非常慢... :(
從 initinal onlie 到 online 花了約 150 sec
有點讓人無法接受....

因為只是是將手動的流程,轉由 zone agent online 來處理
把 switch over to other node 當作 migration to new host 來處理而已
每次的 switchover/failover 就是一次 detach/attach/migration to new host .... *_*
導致 zone online 要花上不少時間
除此之外,還有一些對 vcs permission 的檢查
不過那花不了一秒鍾....
每次 migration to new host 實在是太耗時了

顯然 Sun 的做法並不是這樣子
Patch 126020-03 for HA_Container
126020-03/SUNWsczone/reloc/SUNWsczone/sczbt/bin/functions
brand zone on share disk 可以用 override hostid file 的做法
也印證了不必每次切換都 s8_p2v migration to new host

若在 VCS zone agent 使用 Sun Cluster 的方式
只要十秒內 Zone 就 online 了
.

Workaround to access raw VxVM Volumes from Non-global zones

現在 Oracle 用 raw device 的不多了,大部分都是舊機器吧
在轉移到 Solaris 8 Container 的過程中,不可避免的也碰到了
需要在 local zone 中存取 raw device 的狀況

跟直接用 zonecfg 設定 raw device 給 zone 不太一樣

先確認 zone 執行中
global# zoneadm list -cv
ID    NAME                STATUS         PATH
0      global                running         /
1      myzone             running         /s8zone 

確認 raw volume 的 major and minor numbers
global# ls -l /dev/vx/rdsk/dg02
crw-------    1     root  root        370,  38001      Aug 14 18:39  vol01

在 local zone 中用 mknod 建立 volume
global# cd /s8zone/dev
global# mknod vol01 c 370 38001

因為是轉移舊系統,通常我把這兒路逕取的跟舊的一樣
global# mkdir -p /s8zone/dev/vx/rdsk/dg02
global# cd /s8zone/dev/vx/rdsk/dg02
global# mknod vol01 c 370 38001

登入 local zone 檢查一下
global# zlogin s8zone
[Connected to zone 's8zone' pts/2]
Last login: Mon Sep 29 02:07:42 on pts/2
Sun Microsystems Inc. SunOS 5.8 Generic Patch February 2004
Sourcing //.profile-EIS.....
root@s8zone # ls -l /dev/vx/rdsk/dg02
crw-------    1     root  root        370,  38001      Aug 14 18:39  vol01
OK~可以開始玩了 :)

參考文件︰
Document ID: 285063
Workaround to access raw Veritas Volume Manager volumes from Non-global zones

.

Solaris 8 Brand Zone with VCS in Share Storage

繼上次測試 Oracle in Solaris 8 Container with VCS 成功後
這次測試可否將 zone root 放在 share storage 上
文件的部份只有 solaris 10 native zone 寫說可以
不幸滴,測試 solaris 8 zone 的結果是失敗的
-------------------------------------------------------
zoneadm: zone 's8': This zone has been migrated to a new host.
zoneadm: zone 's8':
zoneadm: zone 's8': Run "/usr/lib/brand/solaris8/s8_p2v s8" before booting.
zoneadm: zone 's8':
zoneadm: zone 's8': exec /usr/lib/brand/solaris8/s8_boot s8 /zone/clarify failed
zoneadm: zone 's8': call to zoneadmd failed

--------------------------------------------------------
切換到另一個 node 後,認為轉移到了新的 host
需要跑個 migration 程序,s8_p2v
之後就可以順利將 s8 zone 由 vcs zone agent 帶起來了

可是 cluster failover 總不能這樣子啊,要可以自動帶起來才行
找找找,看有沒有法子 bypass 這個檢查步驟....

原來在 s8_boot 這程序中,會去檢查主機的 hostid
比對 zone root/.host.orig 這個檔案的 hostid
只要不一樣,就認為是轉移主機了
需要執行 s8_p2v 這個 migration 程序後,才可以 boot

那那那... Sun Cluster 怎麼處理這個問題呢?
嘿,給我找到了... Patch 126020-03 for HA_Containers
畢竟 S8/S9 Container 是後來出來的玩意兒,不過 Sun 手腳也很快
上個 Patch 就解決了這個問題
將 126020-03 解開看看裡面到底改了什麼玩意兒?
SUNWsczone/sczbt/bin/functions 裡面加了些東西
一些判斷 zone type 是 solaris8/solaris9/lx
重點來了,執行 hostid > $zonepath/root/.host.orig

嗯嗯,我如法炮製
去修改 VCS Zone agent 的 online script
測試一下,嘿嘿﹋﹋ it works!!

經詢問的結果,聽說這幾天 VCS patch 會針對此狀況做處理
到時再補個 patch 吧
.

Sun Cluster 3.2 New Feature

Sun Cluster 3.2 FAQ
What are the new features?
  • Ease of Use
    • New Command Line Interfaces
    • Oracle 10g improved integration and administration
    • Agent configuration wizards
    • Flexible IP address scheme
  • Higher Availability
    • Cluster support for SMF services
    • Quorum server
    • Extended flexibility for fencing protocol
  • Greater Flexibility
    • Expanded support for Solaris Containers
    • HA ZFS - agent support for Sun's new file system
    • Extended support for Veritas software components
  • Better Operations and Administration
    • Dual-partition software update
    • Live upgrade
    • Optional GUI installation
With Solaris Cluster Geographic Edition, new features include:
  • Support for x64 platforms
  • Support for EMC SRDF replication software
完整介紹
What's New in the Sun Cluster 3.2 Software

sshd error: Kerberos mechanism library initialization error

好久沒裝 Solaris 9 了,裝好上完 Patch 後,只要使用 ssh 連線就會冒出了這 error

sshd[19238]: [ID 432372 auth.error] Kerberos mechanism library initialization error: Can't open/find Kerberos /etc/krb5/krb5.conf configuration file.


阿我又沒有 enable Kerberos 啊,怎麼老是跳這訊息
找了好一會兒在 Sun 竟然找不到資料,一堆都是在講 Kerberos 沒設定正確 blah blah。終於在咕狗發現了解法
Solaris SSH Fun,快快筆記一下 :p

1. Solaris 9 9/05 sshd and kerberos could this be a BUG
在 /etc/ssh/sshd_config 中加入
GSSAPIAuthentication no
GSSAPIKeyExchange no

GSSAPIStoreDelegatedCredentials no

2. Fixing the bad Solaris ssh patch
在 /etc/ssh/ssh_config 中加入
Host *
GSSAPIKeyExchange no
GSSAPIAuthentication no

Solaris Performance ToolsCD 3.0

不小心看到個新玩意兒....看起來不錯用,去下載來踹踹

Solaris Performance ToolsCD 3.0 available online

The CD covers within 300 MB:

  • dimSTAT v8.1 - collect and analyze performance data

  • Dtrace Tools - Brendan Gregg's collection of Dtrace scripts

  • K9Toolkit - freeware tools written using the KStat library on a Solaris 9

  • sysperfstat - displays utilization and saturation for CPU, memory, disk and network, all on one line.

  • cpuinfo - displays CPU configuration (number, type, clock and strands)

  • meminfo - displays configuration of physical memory and swap devices or files

  • iobar - displays io for disk-devices in a |cpubar|-like fashion

  • iotop - displays |iostat -x| in a |top|-like fashion

  • checkcable - prints the link up status for network interfaces

  • nicstat - prints statistics for the network interfaces such as KBytes/s read and write, Packets/s etc.

VCS with Solaris 8 Zone

畢竟 Solaris 8 zone in Solaris 10 (S8MA) 這玩意兒出來的 VCS Zone support 晚,所以目前 VCS 文件中寫到的 zone,並沒有特別說明是哪種 zone。
現在看來,當然指的都是 Solaris 10 native zone

由文件中看來,zone agent 對 local zone 的動作很單純,online 就是 zoneadm boot,offline 就是 zoneadm halt,對 Solaris 8 Zone 的 online/offline 應該沒什麼問題,但是其他要進去 local zone monitor 的 agent 呢?

在安裝 VCS 或建立 Solaris 10 native zone 時
有部份 VRTS 檔案是會自動從 global zone 複製到 native zone 的
就像 pkgadd or patchadd 時,若不加 -G 參數(Global only)
預設是會 apply 到所有的 running native zone
這兒我看來最重要的是那些 VCS agent 了
因為 global/local zone 都是 solaris 10 沒問題
但在 Solaris 8 zone 就有問題了...

check engin_A.log :
2008/01/13 18:56:16 VCS INFO V-16-2-13001 (node-2) Resource(ora8): Output of the completed operation (online) sh: /opt/VRTSvcs/bin/Oracle/online: not found
2008/01/13 19:33:35 VCS INFO V-16-2-13001 (node-2) Resource(ora8): Output of the completed operation (offline) sh: /opt/VRTSvcs/bin/Oracle/offline: not found

為什麼 not found ?原來是去用 local zone 中的 agent 了
因為不是 native zone,所以安裝時(pkgadd)不會複製這些檔案
導致 agent 無法正確的 monitor zone 中的 AP
我的偷吃步就是看有哪些 VRTS 檔案會被安裝到 native zone 中
就照樣複製這些檔案到 Solaris 8 zone 中

還有另一個問題
VCS WARNING V-16-1-52529 Login Incorrect, Invalid username/password
Agnet 在 global/local zone 中怎麼溝通?這兒需要設定一個 cluster user 讓他有 Group Administor 權限就ok了

在 native zone 中沒有這些問題,安裝時都會自動設好
但在 p2v zone 中,我們只好手動來把這些設定做完了

ok! It works !!

參考文件:
Veritas Cluster White Paper
Implementing Solaris™ Zones with Veritas™ Cluster Server
by Symantec
July 2006
Eric Hennessey
Group Technical Product Manager
Unix Clustering Solutions

[轉載] Two-node Cluster How-To Guide

健忘做個筆記,Sun Cluster 3.2 還沒裝過... :(

Solaris Operating System
Two-node Cluster How-To Guide


How to Install and Configure a Two-node Cluster

This Sun Cluster Two-Node Installation and Configuration How-To guide is intended to help a new or experienced Solaris user quickly and easily install and configure Sun Cluster software for two nodes, including the configuration of aquorum device. Users are guided step-by-step through the process, with examples and screenshots to simplify the process. This document will not cover the configuration of highly available Services; that topic will be covered in a separate guide.

For more details about how to install and configure other Sun Cluster software configurations, see the Sun Cluster Software Installation Guide at docs.sun.com/app/docs/doc/819-0420.

..... 以上為節錄

Sun Cluster with Solaris 8 Migration Assistant

from: New Open HA Cluster Agent source code and Solaris Cluster Express 10/07 released
文中提到 Sun Cluster 3.1 的 Patch 120590-06 已加強對 zone 的支援,可監控 Solaris 8 zone 了,但 Sun Cluster 3.2 尚未支援,不過應該也快了
Status: RELEASED
Patch Id: 120590-06
Keywords: sunwsczone
Summary: Sun Cluster 3.1/3.1_x86: HA for Solaris Containers
Date:  Oct/19/2007

Problem Description:
6604747 HA Container agent should support solaris8 zones on sparc
(from 120590-05)
6488338 HA Container agent should support BrandZ lx zones with Solaris 10 Update 4
6554262 validate() for sczbt should check ip-type=exclusive and then only allow SC_NETWORK=false

VCS 呢?下回分解

[轉載] Solaris 10成為新創網路公司的另一個選擇

呃...好像寫的太神了些..哇哈 :p

Solaris 10成為新創網路公司的另一個選擇

昨天 Enterprise Linux News報導了一則相當有趣的案例。一般來說,大部分新創的網路公司都會選擇 Linux或是 FreeBSD作為產品的開發平台。當然,這主要是因為 Linux/FreeBSD本身可以免費取得、開放、又容易找到各種資源的關係。紐約的新創公司 Sapotek一開始也是 Linux的忠實用戶,不過最近該公司決定改用 Solaris 10,而且對這個決定十分滿意。

Sapotek這家公司提供免費的線上桌面環境,讓使用者不論到哪裡,都可以透過瀏覽器存取自己的文件、電子郵件、或是常用的應用軟體。目前 Sapotek擁有超過而二十萬名用戶。Sapotek一開始用的是免費的 Fedora Linux作業系統,而當該公司達到一定的規模之後,技術支援變得越來越重要。於是在 2005年的時候 Sapotek開始改用要付費的 Redhat Enterprise Linux。當時 Sapotek採用五台 Dell伺服器所組成的電腦叢集來提供服務。

對 Sapotek來說,Redhat Enterprise Linux主要的問題是它的延展性不足,Sapotek的工程師必須花費許多時間在處理硬碟分割和維護系統紀錄檔上面。例外,Redhat的 GFS檔案系統偶爾會出現系統檔案鎖定的問題,也造成 Sapotek人員的困擾。

兩年之後,Sapotek決定試用 Sun的 Solaris 10作業系統。試用了一段時間之後,Sapotek決定申請加入 Sun提供給新創公司的 Startup Essential計畫。加入該計畫的公司能夠以相當多的折扣來購買 Sun的產品。最後,Sapotek採用了四台 Sun Fire X4200伺服器組成的電腦叢集來提供服務。這樣的改變讓 Sapotek能夠維持 99.99%的系統正常運行時間,而以前用 Redhat Linux的時候系統正常運行時間只有 97%。此外,Solaris 10里面的 ZFS檔案系統讓 Sapotek節省了許多過去花在系統維護上面的時間,工程師有更多的時間可以花費在產品開發上面。

原文: Enterprise Linux News
Linux defector says RHEL zero, Sun Solaris hero
By Bridget Botelho, News Writer
18 Dec 2007 | SearchEnterpriseLinux.com

Solaris 8 Migration Assistant

由於 AP 綁 OS,若 AP 無法升級,使得 OS 非得用 Solaris 8,機器使用多年老舊硬體逐漸不堪負荷,而 Sun 速度快的新機器大多不支援 Solaris 8 了,硬體上的汰舊換新如何是好?

之前 Solaris 10 的 zone 還是一樣只能跑 Solaris 10,現在已經可以透過 Solaris 8 Migration Assistant,在 Solaris 10 的 zone 中跑 Solaris 8 了,可以輕易的將運行中的 Solaris 8 系統,移植到 Solaris 的 zone 中來跑....
不過才 release 沒多久(2007.9),尚不知穩定性如何,是否使用上完全的相容於 Native Solaris 8 ?

不過這是一個方向,讓我們可以保有 Solaris 8 作業系統的環境,又可以使用到僅支援 Solaris 10 的新硬體

我在 OpenSolaris Brandz Project 也看到有人開發 linux 的部份,相信 Commercial Release 應該是指日可待 :)
甚至還有 windows on solaris project 咧....(好像快掛了)

參考資料:
Solaris 8 Migration Assistant 1.0 (Project Etude) Ships!
Upgrading Easily with Solaris 8 Migration Assistant
Deploying Solaris 8 Systems using Solaris 10 Containers
Solaris 8 Migration Assistant 1.0 Collection

Download: Solaris 8 Migration Assistant

[轉載] Announcing Solaris Cluster support in LDoms I/O domains

原文:
Announcing Solaris Cluster support in LDoms I/O domains
Tuesday Oct 09, 2007
Sun Cluster Support of LDOM IO domains
from Sun Cluster Wiki

還看到在中 Sun Cluster Express 也在進行 Solaris 8 Migration Assistant 的支援計劃,相信很快就會放入 Sun Cluster 3.2 update 中了
New Open HA Cluster Agent source code and Solaris Cluster Express 10/07 released
You can study the latest changes within the HA Container agent, which is now also able to handle non-global zones of brand type solaris8 on the SPARC platform (currently available for Solaris 10 10/07 as an unbundled product called Solaris 8 Migration Assistant). Patch 120590-06 makes those changes available for Sun Cluster 3.1 08/05. Support for Sun Cluster 3.2 will get introduced with the next update release.

Solaris Locale FAQ

http://developers.sun.com/global/products_platforms/solaris/locales.html

有時 OS 裝好了,突然又被要求需要增加什麼語系時
這就派上用場了...要加的東西還不少咧
參閱 Solaris Locale Chart

Solaris 9 09/04, Solaris 10 後新增了 localeadm 指令方便了許多
之前可是要手動把所缺少的 package 全安裝上咧
localeadm 範例
# localeadm -a taiwan -d /cdrom_media

Solaris 10 超嚴重的 in.telnet vulnerability

二月初發現的吧?應該不少人已經知道了

Document Audience: PUBLIC
Document ID: 102802
Title: Security Vulnerability in the in.telnetd(1M) Daemon May Allow Unauthorized Remote Users to Gain Access to a Solaris Host
Copyright Notice: Copyright © 2007 Sun Microsystems, Inc. All Rights Reserved
Update Date: Wed Feb 28 00:00:00 MST 2007

Solaris 10 & Solaris 10 x86 均受影響

當然,不開 telnet 僅用 ssh 的人可以忽略,不過我知道很多 user 為了方便還是都會開 telnet 允許 root remote login

除了 patch 外,最簡單就是 disable root remote login 了

延伸閱讀: A 13 year old froot
這篇由 source code 解釋了原因

是給它有點誇張說...