Using java, how do you get the amount of free space on the Solaris zfs file system?
I have a SunFire x4140 with integrated hdd installed as /. It also has a connected JBOD with 7.6 TB of hard disk space, configured as a ZFS file system and mounted as / application.
I use java.io.File.getUsableSpace or java.io.File.getFreeSpace to get the amount of free space in the file system. On / (built-in) HDD FS is working correctly.
On / application (zfs section) File.getFreeSpace, File.getUsableSpace and File.getTotalSpace all return 0 (zero). Does anyone know why? Does java.io.File.getUsableSpace work on ZFS, and if so, how?
The following shows the zfs file system on the machine in question:
/ usr / sbin / zfs list
NAME USED AVAIL REFER MOUNTPOINT
internal 196K 98.4G 1K none
internal/logs 18K 98.4G 18K /logs
j4200-1 442G 7.57T 2.44K none
j4200-1/app 442G 7.57T 153M /app
j4200-1/app@first 442G - 442G -