cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
vijji123
Level 6

is there any way to calculate dissk space in pre-install phase

Hi,

Is there any way to calculate disk space requirements in the pre-install phase.

I think we have two variables $REQUIRED_DISK_SPACE_BYTES$ and $FREE_DISK_SPACE_BYTES$ which are available during install phase,but i want these two values prior to install phase i.e during pre-install phase.

Please help me out.

Thanks,
vijji123
Labels (1)
0 Kudos
(4) Replies
emptyhell
Level 3

Use custom action with code like
InstallerResources resource = (InstallerResources) proxy.getService(InstallerResources.class);
long spaceRequired = resource.getRequiredDiskSpace()

But it works not precisely, especially when you have 3rd party jars included as dependency for custom code - it doesn't calculate them
0 Kudos
vijji123
Level 6

Thanks, for u r reply.
0 Kudos
wangnijie860304
Level 2

I meeting the same problem, and I can't get correct return value of getAvailableDiskSpace(), it only happened on NFS disk, not local disk.

InstallerResources resource = (InstallerResources)ip.getService(InstallerResources.class);
long spaceAvailable = resource.getAvailableDiskSpace(); //return -1


Does anyone know why? Or Is there any other way to get available disk space during pre-installing phase?
0 Kudos
mionse
Level 2

wangnijie860304, I also wonder about it ..
0 Kudos