Solaris

在 solaris 上監視和報告磁碟使用情況的最佳方法是什麼?

  • September 27, 2015

dfdu提供使用情況的總體視圖,但問題在於它們沒有按使用者細分。

有沒有一個工具可以做到這一點?我發現quot但這僅適用於ufs。zfs 或 nfs 是否有等價物?

要細分用法,可以編寫一個腳本。那是唯一的選擇嗎?


從輸出zfs userspace filesystem

$ zfs userspace filesystem
cannot access dataset filesystem: dataset does not exist

從輸出zpool upgrade -v

$ zpool upgrade -v
This system is currently running ZFS pool version 32.

The following versions are supported:

VER  DESCRIPTION
---  --------------------------------------------------------
1   Initial ZFS version
2   Ditto blocks (replicated metadata)
3   Hot spares and double parity RAID-Z
4   zpool history
5   Compression using the gzip algorithm
6   bootfs pool property
7   Separate intent log devices
8   Delegated administration
9   refquota and refreservation properties
10  Cache devices
11  Improved scrub performance
12  Snapshot properties
13  snapused property
14  passthrough-x aclinherit
15  user/group space accounting
16  stmf property support
17  Triple-parity RAID-Z
18  Snapshot user holds
19  Log device removal
20  Compression using zle (zero-length encoding)
21  Reserved
22  Received properties
23  Slim ZIL
24  System attributes
25  Improved scrub stats
26  Improved snapshot deletion performance
27  Improved snapshot creation performance
28  Multiple vdev replacements
29  RAID-Z/mirror hybrid allocator
30  Reserved
31  Improved 'zfs list' performance
32  One MB blocksize

對於 zfs,根據zfs 手冊頁,用於zfs userspace filesystem獲取文件系統上所有使用者的列表,並用於zfs get [-r] userused@user filesystem獲取文件系統上特定使用者使用的空間。也可以使用該-r選項來zfs get ...獲取文件系統所有後代的使用者使用情況。請注意,這不僅會返回後代文件系統,還會返回後代複製和快照。

據我所知,NFS 不直接支持此類操作——必須通過 NFS 伺服器上的本機文件系統來完成。

引用自:https://serverfault.com/questions/699855