歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Unix知識 >> Unix基礎知識 >> Solaris 11中如何添加swap

Solaris 11中如何添加swap

日期:2017/3/3 14:55:03   编辑:Unix基礎知識

查看當前swap大小,是2G

root@vzwc1:~# zfs list
NAME                        USED  AVAIL  REFER  MOUNTPOINT
rpool                      8.68G  40.0G  4.90M  /rpool
rpool/ROOT                 4.03G  40.0G    31K  legacy
rpool/ROOT/solaris         4.03G  40.0G  3.72G  /
rpool/ROOT/solaris/var      265M  40.0G   202M  /var
rpool/VARSHARE               43K  40.0G    43K  /var/share
rpool/dump                 2.58G  40.1G  2.50G  -
rpool/export                900K  40.0G    32K  /export
rpool/export/home           868K  40.0G    34K  /export/home
rpool/export/home/grid     36.5K  40.0G  36.5K  /export/home/grid
rpool/export/home/oracle     45K  40.0G    45K  /export/home/oracle
rpool/export/home/zhongwc   752K  40.0G   752K  /export/home/zhongwc
rpool/swap                 2.06G  40.1G  2.00G  -
root@vzwc1:~# swap -l -h
swapfile             dev    swaplo   blocks     free
/dev/zvol/dsk/rpool/swap 285,2        4K     2.0G     2.0G

ZFS不支持mkfile的方式添加swap

root@vzwc1:~# mkfile 5g /var/swapfile
root@vzwc1:~# swap -a /var/swapfile 
/var/swapfile: Invalid operation for this filesystem type

可以使用zfs set的方式添加swap

root@vzwc1:~# zfs set volsize=5G rpool/swap

再次查看swap

root@vzwc1:~# zfs list
NAME                        USED  AVAIL  REFER  MOUNTPOINT
rpool                      11.8G  36.9G  4.90M  /rpool
rpool/ROOT                 4.03G  36.9G    31K  legacy
rpool/ROOT/solaris         4.03G  36.9G  3.72G  /
rpool/ROOT/solaris/var      265M  36.9G   202M  /var
rpool/VARSHARE               43K  36.9G    43K  /var/share
rpool/dump                 2.58G  37.0G  2.50G  -
rpool/export                900K  36.9G    32K  /export
rpool/export/home           868K  36.9G    34K  /export/home
rpool/export/home/grid     36.5K  36.9G  36.5K  /export/home/grid
rpool/export/home/oracle     45K  36.9G    45K  /export/home/oracle
rpool/export/home/zhongwc   752K  36.9G   752K  /export/home/zhongwc
rpool/swap                 5.16G  37.1G  5.00G  -
root@vzwc1:~# swap -l -h
swapfile             dev    swaplo   blocks     free
/dev/zvol/dsk/rpool/swap 285,2        4K     2.0G     2.0G
/dev/zvol/dsk/rpool/swap 285,2      2.0G     3.0G     3.0G

關閉和啟動圖形界面也有所變化

關閉圖形界面

svcadm disable svc:/application/graphical-login/gdm:default

啟動圖形界面

svcadm enable svc:/application/graphical-login/gdm:default

grid@vzwc1:~/grid$ ./runcluvfy.sh stage -pre crsinst -n vzwc1,vzwc2 -fixup -verbose                                                                                                                                                 
 
Performing pre-checks for cluster services setup 
 
Checking node reachability...
 
Check: Node reachability from node "vzwc1"
  Destination Node                      Reachable?              
  ------------------------------------  ------------------------
  vzwc1                                 yes                     
  vzwc2                                 yes                     
Result: Node reachability check passed from node "vzwc1"
 
 
Checking user equivalence...
 
Check: User equivalence for user "grid"
  Node Name                             Status                  
  ------------------------------------  ------------------------
  vzwc2                                 passed                  
  vzwc1                                 passed                  
Result: User equivalence check passed for user "grid"
 
Checking node connectivity...
 
Checking hosts config file...
  Node Name                             Status                  
  ------------------------------------  ------------------------
  vzwc2                                 passed                  
  vzwc1                                 passed                  
 
Verification of the hosts config file successful
 
 
Interface information for node "vzwc2"
 Name   IP Address      Subnet          Gateway         Def. Gateway    HW Address        MTU   
 ------ --------------- --------------- --------------- --------------- ----------------- ------
 net0   192.168.1.62    192.168.1.0     192.168.1.62    192.168.1.1     08:00:27:FB:18:44 1500  
 net1   172.168.1.62    172.168.1.0     172.168.1.62    192.168.1.1     08:00:27:AE:EC:AC 1500  
 
 
Interface information for node "vzwc1"
 Name   IP Address      Subnet          Gateway         Def. Gateway    HW Address        MTU   
 ------ --------------- --------------- --------------- --------------- ----------------- ------
 net0   192.168.1.61    192.168.1.0     192.168.1.61    192.168.1.1     08:00:27:43:92:4C 1500  
 net1   172.168.1.61    172.168.1.0     172.168.1.61    192.168.1.1     08:00:27:DC:D1:AE 1500  
 
 
Check: Node connectivity of subnet "192.168.1.0"
  Source                          Destination                     Connected?      
  ------------------------------  ------------------------------  ----------------
  vzwc2[192.168.1.62]             vzwc1[192.168.1.61]             yes             
Result: Node connectivity passed for subnet "192.168.1.0" with node(s) vzwc2,vzwc1
 
 
Check: TCP connectivity of subnet "192.168.1.0"
  Source                          Destination                     Connected?      
  ------------------------------  ------------------------------  ----------------
  vzwc1:192.168.1.61              vzwc2:192.168.1.62              passed          
Result: TCP connectivity check passed for subnet "192.168.1.0"
 
 
Check: Node connectivity of subnet "172.168.1.0"
  Source                          Destination                     Connected?      
  ------------------------------  ------------------------------  ----------------
  vzwc2[172.168.1.62]             vzwc1[172.168.1.61]             yes             
Result: Node connectivity passed for subnet "172.168.1.0" with node(s) vzwc2,vzwc1
 
 
Check: TCP connectivity of subnet "172.168.1.0"
  Source                          Destination                     Connected?      
  ------------------------------  ------------------------------  ----------------
  vzwc1:172.168.1.61              vzwc2:172.168.1.62              passed          
Result: TCP connectivity check passed for subnet "172.168.1.0"
 
 
Interfaces found on subnet "192.168.1.0" that are likely candidates for VIP are:
vzwc2 net0:192.168.1.62
vzwc1 net0:192.168.1.61
 
Interfaces found on subnet "172.168.1.0" that are likely candidates for VIP are:
vzwc2 net1:172.168.1.62
vzwc1 net1:172.168.1.61
 
WARNING: 
Could not find a suitable set of interfaces for the private interconnect
Checking subnet mask consistency...
Subnet mask consistency check passed for subnet "192.168.1.0".
Subnet mask consistency check passed for subnet "172.168.1.0".
Subnet mask consistency check passed.
 
Result: Node connectivity check passed
 
Checking multicast communication...
 
Checking subnet "192.168.1.0" for multicast communication with multicast group "230.0.1.0"...
Check of subnet "192.168.1.0" for multicast communication with multicast group "230.0.1.0" passed.
 
Checking subnet "172.168.1.0" for multicast communication with multicast group "230.0.1.0"...
Check of subnet "172.168.1.0" for multicast communication with multicast group "230.0.1.0" passed.
 
Check of multicast communication passed.
 
Check: Total memory 
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  vzwc2         5GB (5242880.0KB)         2GB (2097152.0KB)         passed    
  vzwc1         5GB (5242880.0KB)         2GB (2097152.0KB)         passed    
Result: Total memory check passed
 
Check: Available memory 
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  vzwc2         4.0248GB (4220352.0KB)    50MB (51200.0KB)          passed    
  vzwc1         3.5546GB (3727320.0KB)    50MB (51200.0KB)          passed    
Result: Available memory check passed
 
Check: Swap space 
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  vzwc2         6GB (6291452.0KB)         5GB (5242880.0KB)         passed    
  vzwc1         6GB (6291452.0KB)         5GB (5242880.0KB)         passed    
Result: Swap space check passed
 
Check: Free disk space for "vzwc2:/var/tmp/" 
  Path              Node Name     Mount point   Available     Required      Status      
  ----------------  ------------  ------------  ------------  ------------  ------------
  /var/tmp/         vzwc2         /var          35.8776GB     1GB           passed      
Result: Free disk space check passed for "vzwc2:/var/tmp/"
 
Check: Free disk space for "vzwc1:/var/tmp/" 
  Path              Node Name     Mount point   Available     Required      Status      
  ----------------  ------------  ------------  ------------  ------------  ------------
  /var/tmp/         vzwc1         /var          32.7638GB     1GB           passed      
Result: Free disk space check passed for "vzwc1:/var/tmp/"
 
Check: User existence for "grid" 
  Node Name     Status                    Comment                 
  ------------  ------------------------  ------------------------
  vzwc2         passed                    exists(1100)            
  vzwc1         passed                    exists(1100)            
 
Checking for multiple users with UID value 1100
Result: Check for multiple users with UID value 1100 passed 
Result: User existence check passed for "grid"
 
Check: Group existence for "oinstall" 
  Node Name     Status                    Comment                 
  ------------  ------------------------  ------------------------
  vzwc2         passed                    exists                  
  vzwc1         passed                    exists                  
Result: Group existence check passed for "oinstall"
 
Check: Group existence for "dba" 
  Node Name     Status                    Comment                 
  ------------  ------------------------  ------------------------
  vzwc2         passed                    exists                  
  vzwc1         passed                    exists                  
Result: Group existence check passed for "dba"
 
Check: Membership of user "grid" in group "oinstall" [as Primary]
  Node Name         User Exists   Group Exists  User in Group  Primary       Status      
  ----------------  ------------  ------------  ------------  ------------  ------------
  vzwc2             yes           yes           yes           yes           passed      
  vzwc1             yes           yes           yes           yes           passed      
Result: Membership check for user "grid" in group "oinstall" [as Primary] passed
 
Check: Membership of user "grid" in group "dba" 
  Node Name         User Exists   Group Exists  User in Group  Status          
  ----------------  ------------  ------------  ------------  ----------------
  vzwc2             yes           yes           yes           passed          
  vzwc1             yes           yes           yes           passed          
Result: Membership check for user "grid" in group "dba" passed
 
Check: Run level 
  Node Name     run level                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  vzwc2         3                         3                         passed    
  vzwc1         3                         3                         passed    
Result: Run level check passed
 
Check: Hard limits for "maximum open file descriptors" 
  Node Name         Type          Available     Required      Status          
  ----------------  ------------  ------------  ------------  ----------------
  vzwc2             hard          65536         65536         passed          
  vzwc1             hard          65536         65536         passed          
Result: Hard limits check passed for "maximum open file descriptors"
 
Check: Soft limits for "maximum open file descriptors" 
  Node Name         Type          Available     Required      Status          
  ----------------  ------------  ------------  ------------  ----------------
  vzwc2             soft          65536         1024          passed          
  vzwc1             soft          65536         1024          passed          
Result: Soft limits check passed for "maximum open file descriptors"
 
Check: Hard limits for "maximum user processes" 
  Node Name         Type          Available     Required      Status          
  ----------------  ------------  ------------  ------------  ----------------
  vzwc2             hard          29995         16384         passed          
  vzwc1             hard          29995         16384         passed          
Result: Hard limits check passed for "maximum user processes"
 
Check: Soft limits for "maximum user processes" 
  Node Name         Type          Available     Required      Status          
  ----------------  ------------  ------------  ------------  ----------------
  vzwc2             soft          29995         2047          passed          
  vzwc1             soft          29995         2047          passed          
Result: Soft limits check passed for "maximum user processes"
 
Check: System architecture 
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  vzwc2         64-bit amd64 kernel modules  64-bit amd64 kernel modules  passed    
  vzwc1         64-bit amd64 kernel modules  64-bit amd64 kernel modules  passed    
Result: System architecture check passed
 
Check: Kernel version 
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  vzwc2         5.11                      5.11                      passed    
  vzwc1         5.11                      5.11                      passed    
Result: Kernel version check passed
 
Checking for multiple users with UID value 0
Result: Check for multiple users with UID value 0 passed 
 
Check: Current group ID 
Result: Current group ID check passed
 
Starting check for consistency of primary group of root user
  Node Name                             Status                  
  ------------------------------------  ------------------------
  vzwc2                                 passed                  
  vzwc1                                 passed                  
 
Check for consistency of root user's primary group passed
 
Starting Clock synchronization checks using Network Time Protocol(NTP)...
 
NTP Configuration file check started...
Network Time Protocol(NTP) configuration file not found on any of the nodes. Oracle Cluster Time Synchronization Service(CTSS) can be used instead of NTP for time synchronization on the cluster nodes
No NTP Daemons or Services were found to be running
 
Result: Clock synchronization check using Network Time Protocol(NTP) passed
 
Checking Core file name pattern consistency...
Core file name pattern consistency check passed.
 
Checking to make sure user "grid" is not in "root" group
  Node Name     Status                    Comment                 
  ------------  ------------------------  ------------------------
  vzwc2         passed                    does not exist          
  vzwc1         passed                    does not exist          
Result: User "grid" is not part of "root" group. Check passed
 
Check default user file creation mask
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  vzwc2         0022                      0022                      passed    
  vzwc1         0022                      0022                      passed    
Result: Default user file creation mask check passed
Checking consistency of file "/etc/resolv.conf" across nodes
 
Checking the file "/etc/resolv.conf" to make sure only one of domain and search entries is defined
File "/etc/resolv.conf" does not have both domain and search entries defined
Checking if domain entry in file "/etc/resolv.conf" is consistent across the nodes...
domain entry in file "/etc/resolv.conf" is consistent across nodes
Checking if search entry in file "/etc/resolv.conf" is consistent across the nodes...
search entry in file "/etc/resolv.conf" is consistent across nodes
Checking DNS response time for an unreachable node
  Node Name                             Status                  
  ------------------------------------  ------------------------
  vzwc2                                 passed                  
  vzwc1                                 passed                  
The DNS response time for an unreachable node is within acceptable limit on all nodes
 
File "/etc/resolv.conf" is consistent across nodes
 
Check: Time zone consistency 
Result: Time zone consistency check passed
 
Pre-check for cluster services setup was successful. 
grid@vzwc1:~/grid$

查看本欄目更多精彩內容:http://www.bianceng.cn/OS/unix/

Copyright © Linux教程網 All Rights Reserved