2015年4月15日 星期三

Solaris 11 建立VNIC


  • 檢視目前有up的網卡為net0 及 net4

root@NIASc11:~# dladm show-phys
LINK              MEDIA                STATE      SPEED  DUPLEX    DEVICE
net1              Ethernet             down       0      unknown   igb1
net3              Ethernet             up         1000   full      igb3
net0              Ethernet             up         1000   full      igb0
net2              Ethernet             down       0      unknown   igb2
net4              Ethernet             up         10     full      usbecm2

  • net0目前為Globe-Zone所使用
root@NIASc11:~# ipadm show-addr
ADDROBJ           TYPE     STATE        ADDR
lo0/v4            static   ok           127.0.0.1/8
net0/v4           static   ok           192.168.2.198/24
net4/v4           static   ok           169.254.182.77/24
lo0/v6            static   ok           ::1/128

  • 檢視目前建立及使用的vnic
root@NIASc11:~# dladm show-vnic
LINK                OVER         SPEED  MACADDRESS        MACADDRTYPE       VID
vnic11              net3         1000   2:8:20:d3:46:b9   random            0
WPSc14/vnic11       net3         1000   2:8:20:d3:46:b9   random            0
vnic22              net3         1000   2:8:20:55:8:1a    random            0
wpsm1               net1         0      2:8:20:f6:84:fb   random            0
wpsm3               net2         0      2:8:20:5e:a1:1d   random            0
WPSc14/net0         net0         1000   2:8:20:19:e8:8d   random            0

  • 在net3 網卡建立名為ops1的vnic

root@NIASc11:~# dladm create-vnic -l net3  ops1
root@NIASc11:~# dladm show-vnic
LINK                OVER         SPEED  MACADDRESS        MACADDRTYPE       VID
vnic11              net3         1000   2:8:20:d3:46:b9   random            0
WPSc14/vnic11       net3         1000   2:8:20:d3:46:b9   random            0
vnic22              net3         1000   2:8:20:55:8:1a    random            0
wpsm1               net1         0      2:8:20:f6:84:fb   random            0
wpsm3               net2         0      2:8:20:5e:a1:1d   random            0
WPSc14/net0         net0         1000   2:8:20:19:e8:8d   random            0
ops1                net3         1000   2:8:20:9e:5:3     random            0

查詢IP的來源地,google地圖

http://www.senderbase.org/

2015年3月30日 星期一

建立ZFS 的開機磁區


從光碟機開啟OS於single user mode

ok> boot cdrom -s

SPARC:
# installboot -F zfs /mnt/usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c1t0d0s0


x86 : Solaris 10 and Solaris 11.0:
# installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c1t1d0s0


 x86 : Solaris 11.1 及後面的版本

# bootadm install-bootloader -P rpool






REF:
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=244078949050375&id=1020196.1&_afrWindowMode=0&_adf.ctrl-state=85rleeh71_4

2015年2月22日 星期日

Oracle SPARC Server T4-4 清除ILOM錯誤訊息

-> shotw faulty
Target             | Property              | Value                          
-------------------+-----------------------+-----------------------------------
/SP/faultmgmt/0    | fru                   | /SYS/PM0
/SP/faultmgmt/0/   | class                 | fault.chassis.voltage.fail  faults/0          |                       |
/SP/faultmgmt/0/   | sunw-msg-id           | SPT-8000-DH faults/0          |                       |
/SP/faultmgmt/0/   | component             | /SYS/PM0 faults/0          |                       |
/SP/faultmgmt/0/   | uuid                  | 89505ca9-38b7-40e9-d5c9-b8b73851a5 faults/0                   | bf
/SP/faultmgmt/0/   | timestamp             | 2015-01-03/19:31:09   faults/0          |                       |
/SP/faultmgmt/0/   | fru_part_number       | 7051795  faults/0          |                       |
/SP/faultmgmt/0/   | fru_rev_level         | 04 faults/0          |                       |
/SP/faultmgmt/0/   | fru_serial_number     | 465769T+1321L90NH5 faults/0          |                       |
/SP/faultmgmt/0/   | fru_manufacturer      | Celestica Holdings PTE LTD  faults/0        |                       |
/SP/faultmgmt/0/   | fru_name              | Proc-Mod,3.0G,T4-4 faults/0          |                       |
/SP/faultmgmt/0/   | system_manufacturer   | Oracle Corporation faults/0          |                       |
/SP/faultmgmt/0/   | system_name           | SPARC T4-4 faults/0          |                       |
/SP/faultmgmt/0/   | system_part_number    | 31747710+1+1 faults/0          |                       |
/SP/faultmgmt/0/   | system_serial_number  | AK00000000 faults/0          |                       |
/SP/faultmgmt/0/   | chassis_manufacturer  | Oracle Corporation faults/0          |                       |
/SP/faultmgmt/0/   | chassis_name          | SPARC T4-4 faults/0          |                       |
/SP/faultmgmt/0/   | chassis_part_number   | 31747710+1+1 faults/0          |                       |
/SP/faultmgmt/0/   | chassis_serial_number | AK00000000 faults/0          |                       |
/SP/faultmgmt/0/   | system_component_manu | Oracle Corporation faults/0          | facturer             | /SP/faultmgmt/0/   | system_component_name | SPARC T4-4 faults/0          |                       |
/SP/faultmgmt/0/   | system_component_part | 31747710+1+1 faults/0          | _number               |
/SP/faultmgmt/0/   | system_component_seri | AK00000000 faults/0          | al_number             |
/SP/faultmgmt/0/   | diagnosis_engine      | fdd 1.0 faults/0          |                       |

-> satrt /sp/faultmgmt/shell
Are you sure you want to start /SP/faultmgmt/shell (y/n)? y

faultmgmtsp> fmadm faulty
------------------- ------------------------------------ -------------- --------
Time                UUID                                 msgid          Severity
------------------- ------------------------------------ -------------- --------
2015-01-03/19:31:09 89505ca9-38b7-40e9-d5c9-b8b73851a5bf     SPT-8000-DH    Critical

Fault class : fault.chassis.voltage.fail

FRU         : /SYS/PM0
              (Part Number: 7051795)
              (Serial Number: 465769T+1321L90NH5)

Description : A chassis voltage supply is operating outside of the
              allowable range.

Response    : The system will be powered off.  The chassis-wide service
              required LED will be illuminated.

Impact      : The system is not usable until repaired.  ILOM will not allow
              the system to be powered on until repaired.

Action      : Please refer to the associated reference document at
              http://support.oracle.com/msg/SPT-8000-DH for the latest
              service procedures and policies regarding this diagnosis.

faultmgmtsp> fmadm repair  89505ca9-38b7-40e9-d5c9-b8b73851a5bf 
No faults found
faultmgmtsp> exit

-> exit

2015年1月21日 星期三

Solaris 11 Boot Environments 開機環境



root@solaris:~# beadm list
BE                                Active         Mountpoint     Space    Policy      Created
--                                   ------           ----------           -----          ------   -------
solaris                           -                  -                       446.12M  static         2014-09-05 01:21
solaris-backup-1           -                  -                       35.05M    static         2014-09-11 22:27
solaris11                       NR              /                       3.35G       static         2014-09-11 22:36
solaris11-backup-1       -                  -                       70.0K       static         2014-10-06 17:25

在Active這個欄位:
R:表示重新開機會啟動的環境
N:表示目前啟動的開機環境


EX1:變更下次開機環境,由solaris11變更為solaris

BE                                Active         Mountpoint     Space    Policy      Created
--                                   ------           ----------           -----          ------   -------
solaris                           R                 -                       446.12M  static         2014-09-05 01:21
solaris-backup-1           -                  -                       35.05M    static         2014-09-11 22:27
solaris11                       N                /                        3.35G       static         2014-09-11 22:36
solaris11-backup-1       -                  -                       70.0K       static         2014-10-06 17:25


EX3:新建一個開機環境,建立一個開機環境為fortest
root@solaris:~# beadm create fortest
root@solaris:~# beadm list
BE                                Active         Mountpoint     Space    Policy      Created
--                                   ------           ----------           -----          ------   -------
fortest                           -                  -                        72.0K      static 2015-01-22 17:11


solaris                           R                 -                       446.12M  static         2014-09-05 01:21
solaris-backup-1           -                  -                       35.05M    static         2014-09-11 22:27
solaris11                       N                /                        3.35G       static         2014-09-11 22:36
solaris11-backup-1       -                  -                       70.0K       static         2014-10-06 17:25

EX3:刪除一個開機環境,將solaris11-backup-1此開機環境刪除

root@solaris:~# beadm destroy solaris11-backup-1
Are you sure you want to destroy solaris11-backup-1?  This action cannot be undone(y/[n]): y


root@solaris:~# beadm list
BE                                Active         Mountpoint     Space    Policy      Created
--                                   ------           ----------           -----          ------   -------
fortest                           -                  -                        72.0K      static 2015-01-22 17:11

solaris                           R                 -                       446.12M  static         2014-09-05 01:21
solaris11                       N                /                        3.35G       static         2014-09-11 22:36
solaris11-backup-1       -                  -                       70.0K       static         2014-10-06 17:25

2015年1月14日 星期三

Solaris 壓力測試使用SUN VTS

# unzip p18688458_7018_SOLARIS64.zip
# cd VTS7.0ps18.2_sparc_singlesystem

# pkgadd -d .

The following packages are available:
  1  SUNWvts       SunVTS Framework
                   (sparc) 7.0,REV=2008.02.15.13.31
  2  SUNWvtsmn     SunVTS Man Pages
                   (sparc) 7.0,REV=2008.02.07.18.38
  3  SUNWvtsr      SunVTS Framework (Root)
                   (sparc) 7.0,REV=2008.02.07.18.38
  4  SUNWvtss      SunVTS Server and BUI
                   (sparc) 7.0,REV=2008.02.07.18.38
  5  SUNWvtsts     SunVTS Core Installation Tests
                   (sparc) 7.0,REV=2008.02.15.13.31

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: all

# cd /usr/sunvts/bin
# ./runvts
Testing in Online Stress Mode -low

# ./startsunvts






2015年1月13日 星期二

How to Reconfigure a Zone to Use a VNIC


How to Reconfigure a Zone to Use a VNIC

This procedure refers to the second zone in the virtual network. The zone already exists, but its current configuration prevents it from becoming a part of the virtual network. Specifically, the zone's IP type is a shared type and its current interface is net0. Both of these configurations must be changed.
  1. Become an administrator.
  2. Create the VNIC.
    global# dladm create-vnic [-v vid] -l datalink vnic
    where vid refers to the VLAN ID that you assign to the VNIC. Specify the VLAN ID only if you want to create the VNIC as a VLAN.
    Do not configure the VNIC's interface yet. You will perform this step later in this procedure.
  3. Change the zone's IP type from shared to exclusive.
    global# zonecfg -z zone
    zonecfg:zone1> set ip-type=exclusive
    zonecfg:zone1>
  4. Change the zone's interface to use a VNIC.
    zonecfg:zone1> remove net physical=NIC
    zonecfg:zone1> add net
    zonecfg:zone1:net> set physical=vnic
    zonecfg:zone1:net> end
    zonecfg:zone1>
  5. Verify and commit the changes you have implemented and then exit the zone.
    zonecfg:zone1 verify
    zonecfg:zone1> commit
    zonecfg:zone1> exit
    global#
  6. Reboot the zone.
    global# zoneadm -z zone reboot
  7. Log in to the zone.
    global# zlogin zone
  8. Configure the VNIC with a valid IP address.
    If you are assigning a static address to the VNIC, you would type the following:
    zone# ipadm create-addr -a address interface
    where address can use CIDR notation.
  9. From the global zone, add the address information to the /etc/hosts file.
Example 2-3 Reconfiguring a Zone Configuration to Use a VNIC
In this example, zone2 already exists as a shared zone. The zone also uses the primary interface of the system rather than a virtual link. You need to modify zone2 to use vnic2. To use vnic2, zone2's IP type must first be changed to exclusive. Note that some of the output is truncated to focus on the relevant information that relates to virtual networks.

global# dladm create-vnic -l net0 vnic2

global# zonecfg -z zone2
zonecfg:zone1> set ip-type=exclusive
zonecfg:zone1> remove net physical=net0
zonecfg:zone1> add net
zonecfg:zone1:net> set physical=vnic2
zonecfg:zone1:net> end
zonecfg:zone1> verify
zonecfg:zone1> commit
zonecfg:zone1> exit
global# zoneadm -z zone2 reboot

global# zlogin zone2
zone2# ipadm create-ip vnic2
zone2# ipadm create-addr -a 192.168.3.85/24 vnic2
ipadm: vnic2/v4

zone2# exit

global# vi /etc/hosts
#
::1             localhost
127.0.0.1       localhost
192.168.3.70    loghost   #For net0
192.168.3.80    zone1   #using vnic1
192.168.3.85    zone2   #using vnic2

參考資料
https://docs.oracle.com/cd/E26502_01/html/E28992/ggiyq.html#gicom