Focus On Oracle

Installing, Backup & Recovery, Performance Tuning,
Troubleshooting, Upgrading, Patching, Zero-Downtime Upgrade, GoldenGate

Oracle Exadata ,Oracle ODA, Oracle ZDLRA


当前位置: 首页 » 技术文章 » Oracle

Oracle SPARC ZFS文件系统

要用zfs文件系统,首先需要建立一个pool,pool本身就是一个zfs文件系统,也是所有在它上面的文件系统共享的存储空间。ZFS支持一套丰富的机制,用于处理设备故障和数据损坏。会对所有元数据和数据进行校验和计算,在检测到数据损坏时,ZFS 会自动根据好的副本修复坏数据。为了利用这些功能,池必须采用某种形式的冗余(使用镜像组或raidz 组)。虽然ZFS支持在非冗余配置下运行,但在每个根vdev都只是一个磁盘或文件的情况下,强烈建议不要这样做。只要出现一个数据位损坏,就会导致部分或所有数据不可用。

创建一个mirror的pool
root@sparcvm:~# zpool create datapool mirror c0t5000CCA07D067040d0 c0t5000CCA07D067F28d0
root@sparcvm:~# zpool status datapool
  pool: datapool
 state: ONLINE
  scan: none requested
config:

        NAME                       STATE     READ WRITE CKSUM
        datapool                   ONLINE       0     0     0
          mirror-0                 ONLINE       0     0     0
            c0t5000CCA07D067040d0  ONLINE       0     0     0
            c0t5000CCA07D067F28d0  ONLINE       0     0     0

errors: No known data errors
root@sparcvm:~#

root@sparcvm:~# zfs mount
rpool/ROOT/solaris              /
rpool/ROOT/solaris/var          /var
rpool/VARSHARE                  /var/share
rpool/export                    /export
rpool/export/home               /export/home
rpool                           /rpool
rpool/VARSHARE/zones            /system/zones
rpool/VARSHARE/pkg              /var/share/pkg
rpool/VARSHARE/pkg/repositories  /var/share/pkg/repositories
datapool                        /datapool
root@sparcvm:~#
root@sparcvm:~$ zpool list
NAME      SIZE  ALLOC  FREE  CAP  DEDUP  HEALTH  ALTROOT
datapool  556G    94K  556G   0%  1.00x  ONLINE  -
rpool     556G   179G  377G  32%  1.00x  ONLINE  -
root@sparcvm:~$

为系统盘做镜像,ZFS镜像就相当于RAID1,这个很方便

root@sparcvm:~# zpool attach rpool c0t5000CCA07D067838d0  c0t5000CCA07D0681E0d0 
Make sure to wait until resilver is done before rebooting. 
root@sparcvm:~# zpool status -v 
  pool: rpool
 state: DEGRADED
status: One or more devices is currently being resilvered.  The pool will
        continue to function in a degraded state.
action: Wait for the resilver to complete.
  scan: resilver in progress since Tue Mar 28 20:47:51 2017
    134G scanned
    113G resilvered at 199M/s, 84.04% done, 1m50s to go
config:

        NAME                       STATE     READ WRITE CKSUM
        rpool                      DEGRADED     0     0     0
          mirror-0                 DEGRADED     0     0     0
            c0t5000CCA07D067838d0  ONLINE       0     0     0
            c0t5000CCA07D0681E0d0  DEGRADED     0     0     0  (resilvering)

device details:

        c0t5000CCA07D0681E0d0    DEGRADED         scrub/resilver needed
        status: ZFS detected errors on this device.
                The device is missing some data that is recoverable.
           see: http://support.oracle.com/msg/ZFS-8000-QJ for recovery


errors: No known data errors

在resilver完成之前,ILOM会报错,完成之后,错误消失

SUNW-MSG-ID: ZFS-8000-QJ, TYPE: Fault, VER: 1, SEVERITY: Minor
EVENT-TIME: Wed Mar 29 20:57:40 CST 2017
PLATFORM: SPARC S7-2, CSN: AK99999999, HOSTNAME: sparcvm
SOURCE: zfs-diagnosis, REV: 1.0
EVENT-ID: ef930420-4f99-413d-863c-a8186ae1282e
DESC: Missing data on ZFS device 'id1,sd@n5000cca07d0681e0/a' in pool 'rpool'. Applications are unaffected if sufficient replicas exist.
AUTO-RESPONSE: An attempt will be made automatically to recover the data. The device and pool will be degraded.
IMPACT: The device and pool may continue functioning in degraded state until data is recovered.

查看pool的状态

root@sparcvm:~# zpool status

root@sparcvm:~# zpool status
  pool: rpool
 state: ONLINE
  scan: resilvered 134G in 11m51s with 0 errors on Tue Mar 28 20:59:42 2017

config:

        NAME                       STATE     READ WRITE CKSUM
        rpool                      ONLINE       0     0     0
          mirror-0                 ONLINE       0     0     0
            c0t5000CCA07D067838d0  ONLINE       0     0     0
            c0t5000CCA07D0681E0d0  ONLINE       0     0     0

errors: No known data errors
root@sparcvm:~# 

root@sparcvm:~# bootadm install-bootloader -P rpool
root@sparcvm:~# prtconf -vp | grep bootpath


Reference

http://docs.oracle.com/cd/E56344_01/html/E54077/zpool-1m.html



关键词:zfs sparc 

相关文章

Oracle-通过ILOM消除高温告警
通过ILOM和ISO文件安装Oracle服务器操作系统
Oracle SPARC ZFS文件系统
SPARC诊断工具explorer
SPARC S7-2初始化加载
Oracle ILOM Issue
Oracle服务器前部面板介绍
ILOM: The system appears to be in manufacturing test mode.
Install and config Oracle ZFS Storage
如何配置Exadata + ZFS
在Sparc T5-2上安装和配置PCIe闪存卡
Oracle SuperCluster 软件架构简介
Top