How to find out which area of ​​the tanning bed takes up so much disk space?

IF I use the df command, I can only see on the Solaris server how much disk space is being used. But I want to know how many disks a particular area of ​​the solarium occupies.

+3
source share
6 answers

The problem I found with these solutions is that they do not consider directory inheritance. Yes, you will find out how much “space” is under a specific directory. But if you want to know how much extra space a zone occupies, you need to go a different path. Do

zonecfg -z zonename info

where zonename is the name of the zone. Take a look at each line of inherit-pkg-dir.

inherit-pkgdir-dir:
      dir: /lib
inherit-pkgdir-dir:
      dir: /sbin

. , ,

du -sh /zonepath/zonename

(/proc , , /tmp ), inherit-pkg-dir.

cd /zonepath/zonename/root

du -sh /bin /dev /etc /home /kernel opt /system /var etc....
+4

du

+2

- su root, .

:/usr/xpg4/bin/du -sk -h -x/zonepath/zonename , UFS .

,/usr/xpg4/bin/du -sk -h -x/zonepath/zonename
: 3.5G/zonepath/zonename

-x , , , .

, -x- du :/usr/xpg4/bin/du

zfs ! zfs lun /zoneepath/zonename/data "zfs list" :

#/usr/xpg4/bin/du -sk -h -x/zonepath/zoneneame/
 11G/zonepath/zoneneame/data​​p >

#/usr/xpg4/bin/du -sk -h -x/zonepath/zoneneame
, :
53G/zonepath/zonename

NFS , , root.

, !

+2

John Pierre-Luc, :

  • ( )

:

tcsh>zoneadm list -civ
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              native   shared
   1 myZone1          running    /export/zones/myZone1          native   shared
   2 myZone2          running    /export/zones/myZone2          native   shared
  • du -sk root ( , du -sk root)

:

 tcsh>s du -sk /export/zones/myZone1  
 9930978 /export/zones/myZone1
+1

zfs, zfs ( "zfs list" ), , .

"du", ( ).

0

Source: https://habr.com/ru/post/1703677/


All Articles