ラベル solaris の投稿を表示しています。 すべての投稿を表示
ラベル solaris の投稿を表示しています。 すべての投稿を表示

2012/10/08

RAID-Z2 が壊れた

% zpool status pool01
  pool: pool01
 state: DEGRADED
status: One or more devices are faulted in response to persistent errors.
        Sufficient replicas exist for the pool to continue functioning in a
        degraded state.
action: Replace the faulted device, or use 'zpool clear' to mark the device
        repaired.
  scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        pool01      DEGRADED     0     0     0
          raidz2-0  DEGRADED     0     0     0
            c3t2d0  FAULTED      0     0     0  too many errors
            c3t3d0  ONLINE       0     0     0
            c3t4d0  ONLINE       0     0     0
            c3t5d0  ONLINE       0     0     0

errors: No known data errors

ディスク入れ替えて

% pfexec zpool clear pool01 c3t2d0

% zpool status pool01
  pool: pool01
 state: ONLINE
status: One or more devices is currently being resilvered.  The pool will
        continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
  scan: resilver in progress since Mon Oct  8 17:39:22 2012
    10.1M scanned out of 1.55T at 2.01M/s, 224h28m to go
    2.32M resilvered, 0.00% done
config:

        NAME        STATE     READ WRITE CKSUM
        pool01      ONLINE       0     0     0
          raidz2-0  ONLINE       0     0     0
            c3t2d0  ONLINE       0     0     0  (resilvering)
            c3t3d0  ONLINE       0     0     0
            c3t4d0  ONLINE       0     0     0
            c3t5d0  ONLINE       0     0     0

errors: No known data errors

2012/07/08

LinkAggregation

% pfexec dladm create-aggr -l e1000g0 -l e1000g1 aggr1
% dladm show-aggr
LINK            POLICY   ADDRPOLICY           LACPACTIVITY  LACPTIMER   FLAGS
aggr32          L4       auto                 off           short       -----

2011/09/26

iSCSIを使ってみたかった

完全に自分用のメモ

% /sbin/zpool list
NAME     SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT
pool01  7.25T   416K  7.25T     0%  1.00x  ONLINE  -
% /sbin/zfs list pool01
NAME     USED  AVAIL  REFER  MOUNTPOINT
pool01   202K  3.55T  46.3K  /pool01
% pfexec /sbin/zfs create -V 20G pool01/iscsi01
% /sbin/zfs list pool01/iscsi01
NAME             USED  AVAIL  REFER  MOUNTPOINT
pool01/iscsi01  20.6G  3.55T  23.9K  -
% pfexec /usr/sbin/svcadm enable iscsi/target; pfexec /usr/sbin/svcadm enable stmf
% pfexec /usr/sbin/sbdadm create-lu /dev/zvol/rdsk/pool01/iscsi01
Created the following LU:

              GUID                    DATA SIZE           SOURCE
--------------------------------  -------------------  ----------------
600144f0065fcd0000004e7f45b80001  21474836480          /dev/zvol/rdsk/pool01/iscsi01
% pfexec /usr/sbin/itadm create-target
Target iqn.1986-03.com.sun:02:15340606-cbaf-eb49-e4fb-c5b6f8a3fa14 successfully created
% pfexec /usr/sbin/stmfadm add-view 600144f0065fcd0000004e7f45b80001

2011/09/08

RAID-Z2を使ってみたかった

RAID-Z2がどんなもんか見てみたかったので.

% iostat -E
(snip)
sd1       Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 
Vendor: ST2000DL Product: 003-9VT166       Revision:  Serial No:  
Size: 2000.40GB <2000398934016 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 
Illegal Request: 172 Predictive Failure Analysis: 0 
sd2       Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 
Vendor: SAMSUNG  Product: HD204UI          Revision:  Serial No:  
Size: 2000.40GB <2000398934016 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 
Illegal Request: 216 Predictive Failure Analysis: 0 
sd3       Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 
Vendor: WDC WD20 Product: EARX-00PASB0     Revision:  Serial No:  
Size: 2000.40GB <2000398934016 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 
Illegal Request: 216 Predictive Failure Analysis: 0 
sd4       Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 
Vendor: Hitachi  Product: HDS5C3020ALA632  Revision:  Serial No:  
Size: 2000.40GB <2000398934016 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 
Illegal Request: 216 Predictive Failure Analysis: 0 
(snip)

% pfexec /usr/sbin/zpool create pool01 raidz2 c3t0d{0,1,2,3}
% /usr/sbin/zpool status
(snip)
  pool: pool01
 state: ONLINE
 scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        pool01      ONLINE       0     0     0
          raidz2-0  ONLINE       0     0     0
            c3t0d0  ONLINE       0     0     0
            c3t0d1  ONLINE       0     0     0
            c3t0d2  ONLINE       0     0     0
            c3t0d3  ONLINE       0     0     0

errors: No known data errors
(snip)

% pfexec /usr/sbin/zfs create pool01/export
% /usr/sbin/zfs list pool01{,/export}
NAME            USED  AVAIL  REFER  MOUNTPOINT
pool01          199K  3.55T  46.3K  /pool01
pool01/export  44.8K  3.55T  44.8K  /pool01/export

% pfexec /usr/sbin/zfs get sharenfs pool01/export
% /usr/sbin/share
-@pool01/expor  /pool01/export   rw   ""

すごく楽.次はiSCSIでもして遊んでみる.

2011/09/07

OpenIndianaでSATA port multiplier+ZFSがしたかった

勢い余って,eSATA 2 portのPCI Express x1カードを購入. まだまだ右も左も分からんのでメモ.

prtconf(1)やscanpci(1)を使ってデバイスを探す.

$ pfexec scanpci
(snip)
pci bus 0x0020 cardnum 0x00 function 0x00: vendor 0x1095 device 0x3132
 Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
(snip)
$ /usr/sbin/prtconf -vD
(snip)
pci1095,3132, instance #0 (driver name: si3124)
(snip)

(driver name: si3124)と出ているのでsi3124ドライバがアタッチされている.

んで,manを見てみると…

# man si3124
DESCRIPTION
     The si3124 driver is a SATA framework-compliant  HBA  driver
     that  supports Silicon Image 3124 and 3132 SATA controllers.
     Note that while the Silicon Image controllers supports stan-
     dard  SATA  features  including SATA-II disks, NCQ, hotplug,
     port multiplier and ATAPI disks, the si3124 driver currently
     does not support NCQ, port multiplier or ATAPI features.

port multiplierは未対応だそうで…ショック.

2011/08/13

pfexec

Solaris のシステム管理 (セキュリティサービス)

solarisではRBACで必要最小限な特権をユーザに割り当てるらしい. とりあえず自分に全ての権限を渡しておく.

# usermod -P 'Primary Administrator' user
% id -a
uid=100(user) gid=1(other) groups=1(other)
% pfexec id -a
uid=0(root) gid=0(root) groups=1(other)

で,root権限が必要なcmdが実行できる.

2011/08/01

キーボードレイアウトの変更

OpenIndiana Build 148をインストールした. キーボードレイアウトの変更方法がBuild 145から変わっているらしい.

OpenSolaris keyboard configuration moved to SMF

# svccfg
svc:> select keymap:default
svc:/system/keymap:default> setprop keymap/layout=US-English
svc:/system/keymap:default> exit

でテキトーにrefreshしたり再起動したり.