下節概述 ZFS 檔案系統的新增功能。
支援 ZFS 與 Flash 安裝 – 在 Solaris 10 10/09 發行版本,您可以設定 JumpStart 設定檔來識別 ZFS 根池的 Flash 歸檔。如需更多資訊,請參閱「Solaris ZFS Administration Guide」。
設定 ZFS 使用者與群組配額 – 在先前的 Solaris 發行版本中,您可以將配額與保留套用到 ZFS 檔案系統上,以管理和保留空間。在本 Solaris 發行版本中,您可以針對特定使用者或群組所擁有的檔案所使用的空間容量設定配額。在擁有大量使用者與群組的環境中,您可以考慮設定使用者與群組的配額。可依照下列方式透過使用 zfs userspace 與 zfs groupspace 特性來設定使用者或群組配額:
# zfs set userquota@user1=5G tank/data # zfs set groupquota@staff=10G tank/staff/admins |
可依照下列方式顯示使用者或群組目前的配額設定:
# zfs get userquota@user1 tank/data NAME PROPERTY VALUE SOURCE tank/data userquota@user1 5G local # zfs get groupquota@staff tank/staff/admins NAME PROPERTY VALUE SOURCE tank/staff/admins groupquota@staff 10G local |
使用 ZFS ACL 通過繼承以取得執行權限 – 您可以在先前的 Solaris 發行版本中套用 ACL 繼承,讓所有的檔案透過 0664 或 0666 權限來建立。如果您想要選擇性地從檔案建立模式將執行位元包含到繼承的 ACL 中,則您可以使用通過繼承在此發行版本中取得執行權限。
如果在 ZFS 資料集中啟用 aclinherit=passthrough-x,您可以針對從 cc 或 gcc 工具產生的輸出檔案包含執行權限。如果繼承的 ACL 未包含執行權限,則在未使用 chmod 指令變更檔案的權限之前,將無法執行編譯器的可執行檔輸出。
在 ZFS 儲存池中使用快取裝置 – 在 Solaris 10 10/09 發行版本中,您可以建立儲存池並指定快取裝置,用來快取儲存池資料。快取裝置可提供額外一層快取,而此快取是在主要記憶體與磁碟之間進行。使用快取裝置,可針對大多數靜態內容的隨機讀取工作負荷量提供最顯著的效能增進。
建立儲存池時,可以指定一或多個快取裝置。例如:
# zpool create pool mirror c0t2d0 c0t4d0 cache c0t0d0 # zpool status pool pool: pool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM pool ONLINE 0 0 0 mirror ONLINE 0 0 0 c0t2d0 ONLINE 0 0 0 c0t4d0 ONLINE 0 0 0 cache c0t0d0 ONLINE 0 0 0 errors: No known data errors |
如需有關確定對您的環境使用快取裝置是否合適的資訊,請參閱「Solaris ZFS Administration Guide」。
ZFS 特性增強 – Solaris 10 10/09 發行版本提供下列 ZFS 特性增強:
您可以在建立池時設定 ZFS 檔案系統特性。在下列範例中,建立池時建立的 ZFS 檔案系統已啟用壓縮。
# zpool create -O compression=on pool mirror c0t1d0 c0t2d0 |
您可以在 ZFS 檔案系統上設定兩個可讓您控制主快取記憶體 (ARC) 或輔助快取記憶體 (L2ARC) 快取內容的快取特性。快取特性已設定如下:
primarycache – 控制 ARC 的快取內容。
secondarycache – 控制 L2ARC 的快取內容。
您可以在現有的檔案系統中或在建立檔案系統時設定這些特性。例如:
# zfs set primarycache=metadata tank/datab # zfs create -o primarycache=metadata tank/newdatab |
有些資料庫環境可能不適合快取使用者資料。您需確定設定快取特性是否適合您的環境。
如需更多資訊,請參閱「Solaris ZFS Administration Guide」。
您可以使用空間使用情況特性來識別複製、檔案系統及磁碟區 (但不含快照) 的空間使用情況。各種特性如下:
usedbychildren – 可識別由此資料集子項使用的空間容量,如果所有的資料集子項都已銷毀,則此容量將被釋放。此特性的縮寫為 usedchild。
usedbydataset – 可識別資料集本身使用的空間容量,如果在第一次銷毀任何快照並移除任何 refreservation 之後銷毀該資料集,此容量將被釋放。此特性的縮寫為 usedds。
usedbyrefreservation – 可識別此資料集的 refreservation 集使用的空間容量,如果已移除 refreservation,則此容量將被釋放。此特性的縮寫為 usedrefreserv。
usedbysnapshots – 可識別此資料集的快照所使用的空間容量。尤其當此資料集的所有快照都已銷毀,此容量將被釋放。請注意,這不只是該快照 used 特性的總和,因為空間可由多個快照共用。此特性的縮寫為 usedsnap。
這些新特性可將 used 特性的值區分成各種使用空間的方式。尤其是 used 特性的值可作出以下的區分:
used property = usedbychildren + usedbydataset + usedbyrefreservation + usedbysnapshots |
您可以使用 zfs list -o space 指令來檢視這些特性。例如:
# zfs list -o space NAME AVAIL USED USEDSNAP USEDDS USEDREFRESERV USEDCHILD pool 33.2G 72K 0 21K 0 51K rpool 27.0G 6.27G 20.5K 97K 0 6.27G rpool/ROOT 27.0G 4.73G 0 21K 0 4.73G rpool/ROOT/zfsBE 27.0G 4.73G 97.5M 4.63G 0 0 rpool/dump 27.0G 1.00G 16K 1.00G 0 0 rpool/export 27.0G 60K 16K 23K 0 21K rpool/export/home 27.0G 21K 0 21K 0 0 rpool/swap 27.5G 553M 0 41.5M 512M 0 |
在此發行版本中,zfs list 輸出已略過快照。listsnaps 池特性可以控制是否可由 zfs list 指令來顯示快照資訊。如果您使用 zfs list -t snapshots 指令,則會顯示快照資訊。預設值為 off,這表示預設不會顯示快照資訊。
ZFS 記錄裝置回復 –在 Solaris 10 10/09 發行版本中,ZFS 可識別 zpool status 指令中的意向記錄失敗。FMA 也可以報告這些錯誤。ZFS 與 FMA 兩者都可以說明如何從意向記錄失敗回復。
例如,如果系統在針對具有不同記錄裝置的池進行同步寫入作業之前突然關閉,則您會在 zpool status 輸出中看到意向記錄相關的錯誤訊息。如需有關解決記錄裝置失敗的資訊,請參閱「Solaris ZFS Administration Guide」。
使用 ZFS ACL 集 – Solaris 10 10/09 發行版本能夠以集的方式套用多個 NFSv4 樣式 ACL,而不必個別地套用多個不同的 ACL 權限。提供的 ACL 集如下:
full_set = 所有權限
modify_set = 除了 write_acl 與 write_owner 以外的所有權限
read_set = read_data、read_attributes、read_xattr 以及 read_acl
write_set = write_data、append_data、write_attributes 以及 write_xattr
這些 ACL 集都是預先定義的,無法加以修改。
如需有關這些改善和變更的更多資訊,請參閱「Solaris ZFS Administration Guide」。
如需相關 ZFS 功能資訊,請參閱下列各個「新增功能」小節: