Sponsored Content
Top Forums UNIX for Advanced & Expert Users Solaris 10 & 11 ZFS Space Monitoring Post 303036931 by GazinLincoln on Wednesday 17th of July 2019 02:46:53 PM
Old 07-17-2019
Solaris 10 & 11 ZFS Space Monitoring

Hi Folks!
Its been a while since I worked with ZFS but basically, I need to monitor free space for Solaris 10 & 11 systems (with & without zones)
I am hoping that any space commands only need to be run from the global zone (to simplify matters)
However, I'm not not sure if there are exceptions to this (meaning a space check would need to be performed on zones)
Any feedback would be great.

For Solaris 11, I could. parse the output from the following two commands...
  • 1) zpool list (get health & free space)
  • 2) zfs list -p|grep -v NAME|awk '{printf "%-75s %12d %12d %12d\n", $1,$2,$3,($2/$3)*100}'

The 2nd command lists the space usage and percentage used and is easily parsed,

However this only works on Solaris 11. I've been looking but can't find a similar command for Solaris 10.
The closest command I have found is "zfs get -o value name,used,available" but this splits the output over new lines so is no good for parsing.

Does anyone know how to get the percentage of space used for every dataset in Solaris 10 that can be easily parsed?

Thanks for your time.
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Space Monitoring option

thrld=`bdf /u01/|grep u01|awk {'print $5'}|sed 's/'%'//'` thrld1=`bdf /u12/|grep u02|awk {'print $5'}|sed 's/'%'//'` ch="" echo "------------------" echo " " echo "------------------" echo "1)/u01" echo "2)/u12" echo " Please select : \c" read ch case "$ch" in... (3 Replies)
Discussion started by: killboy
3 Replies

2. Solaris

Allocating space to ufs /usr by using ZFS in solaris

Hi, Im currently having my diskspace allocation of my UFS filesystem in solris as 100% for /usr directory.I have created a zfs pool of 3 gb.I want to allocate space from my zfs pool to /usr so that i can free space in /usr.Please help me it is quiet urgent. (6 Replies)
Discussion started by: navjotmannan
6 Replies

3. Shell Programming and Scripting

ZFS file system - memory monitoring

I am working on a server where the 'root' user ZFS filesystem. Now when I do Top commands it says only 750M free .But when I count the actual memory utilized it comes only to 12 GB and the total size of the server is 32G. I think rest of the space is held up by ZFS file system. Is there a... (5 Replies)
Discussion started by: prasperl
5 Replies

4. Solaris

dual boot solaris/solaris zfs file system

Hi, I am running into a some problems creating a dual boot system of 2 solaris instances using ZFS file system and I was wondering if someone can help me out. First some back ground. I have been asked to change the file system of our server from UFS to ZFS. Currently we are using Solaris... (3 Replies)
Discussion started by: estammis
3 Replies

5. Solaris

Setting up Solaris & ZFS for the first time

Hello All I’ve made the decision to switch my storage server from FreeNAS to Solaris. I opted to use FreeNAS as it has ZFS and until BTRFS is stable, it’s the best option (IMHO) for backup and network storage. The switch was facilitated by the USB stick that FreeNAS was on got lost during a... (1 Reply)
Discussion started by: BlueDalek
1 Replies

6. Solaris

Need help to understand zfs rpool space allocation

Hi, I am unable to understand that, in one of my servers while df -kh Filesystem Size Used Available Capacity Mounted on rpool/ROOT/solaris-2 98G 11G 29G 29% / Even the Root FS filled on 40gb and system becomes unstable. it is showing... (4 Replies)
Discussion started by: anuragr
4 Replies

7. Solaris

Zfs out of disk space

hi, have no a lot of experience with zfs so perhaps the question is quite simple but i didn't find any reasonable info how to resolve it. thus, fresh solaris installation 14GB in 86 files copied after that got msg No space left on device (28) in spite of according to stat there is... (4 Replies)
Discussion started by: bindto
4 Replies

8. Solaris

Understanding ZFS Snapshots - why will it utilize space ?

Hi all, I am moving to Solaris11 and is trying to understand how ZFS snapshot works. Chances upon this Oracle Blog and can't wrap my head around it. https://blogs.oracle.com/solaris/understanding-the-space-used-by-zfs-v2 Hope gurus here can shed some light . ======= ... (4 Replies)
Discussion started by: javanoob
4 Replies
lx(5)							Standards, Environments, and Macros						     lx(5)

NAME
lx - Linux branded zone DESCRIPTION
The lx brand uses the branded zones framework described in brands(5) to enable Linux binary applications to run unmodified on a machine with a Solaris Operating System kernel. The lx brand includes the tools necessary to install a CentOS 3.x or Red Hat Enterprise Linux 3.x distribution inside a non-global zone. The brand supports the execution of 32-bit Linux applications on x86/x64 machines running the Solaris system in either 32-bit or 64-bit mode. Supported Linux Distributions The lx brand emulates the system call interfaces provided by the Linux 2.4.21 kernel, as modified by Red Hat in the RHEL 3.x distributions. This kernel provides the system call interfaces consumed by the glibc version 2.3.2 released by Red Hat. In addition, the lx brand partially emulates the Linux /dev and /proc interfaces. Configuration and Administration The lx brand supports the whole root non-global zone model. All of the required linux packages are installed into the private file systems of the zone. The zonecfg(1M) utility is used to configure an lx branded zone. Once a branded zone has been installed, that zone's brand cannot be changed or removed. The zoneadm(1M) utility is used to report the zone's brand type and administer the zone. The zlogin(1) utility is used to log in to the zone. Application Support The lx zone only supports user-level Linux applications. You cannot use Linux device drivers, Linux kernel modules, or Linux file systems from inside an lx zone. You cannot add any non-standard Solaris devices to a Linux zone. Any attempt to do so will result in a zone that zonecfg(1M) will refuse to verify. You cannot run Solaris applications inside an lx zone. Solaris debugging tools such as DTrace (see dtrace(1M)) and mdb (see mdb(1)) can be applied to Linux processes executing inside the zone, but the tools themselves must be running in the global zone. Any core files generated are produced in the Solaris format, and such files can only be debugged with Solaris tools. ATTRIBUTES
See attributes(5) for a description of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWlxr, SUNWlxu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
mdb(1), zlogin(1), zonename(1), dtrace(1M), zoneadm(1M), zonecfg(1M), brands(5), zones(5), lx_systrace(7D) SunOS 5.11 19 Sep 2006 lx(5)
All times are GMT -4. The time now is 05:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy