Hello,

That should work quite well Kir Thank you. I'll just have to do the reverse at 
the end of the script to remove the extra added since its only a temp increase 
to get the update installed across the node.

THanks,

On 02/08, Kir Kolyshkin wrote:
> 
> 
> On 02/08/2016 12:56 PM, Scott Dowdle wrote:
> >Greetings,
> >
> >----- Original Message -----
> >>Is there an easy way to add/subtract  diskspace/inodes without
> >>needing to know the current numbers?
> >>
> >>For example, user is near or at their max numbers but cPanel just
> >>released an update that requires immediate updating before they
> >>release the full disclosure, so need to add 5G or 500k inodes to get
> >>said upcp to run and then remove the extra space/inodes?
> >>
> >>I did not see anything that would indicate it is possible via the
> >>vzctl docs, but figured I would ask.
> >Are you talking about simfs?
> >
> >You can sniff the current values out of the config and calculate the desired 
> >new value.  Not quite what you wanted... but still.
> >
> >vzctl set {ctid} --diskinodes  {n}:{n} --save
> >
> > From the vzctl man page:
> >
> >- - - - -
> >--diskinodes num[:num]
> >      sets soft and hard disk quota limits, in i-nodes. First parameter is 
> > soft limit, second is hard limit.
> >
> >Note that this parameter is ignored for ploop layout.
> 
> ...unless specified during container creation. For more details,
> see https://openvz.org/Ploop/diskinodes
> 
> >- - - - -
> >
> >I seem to remember some form that allowed you to do math in the parameter 
> >value... but darn if I can find an example of that now.
> 
> Should be pretty trivial
> 
> DI_S=$(vzlist -H -o diskinodes.s $CTID)
> DI_H=$(vzlist -H -o diskinodes.h $CTID)
> NEW_DI_S=$((DI_S + 500000))
> NEW_DI_H=$((DI_H + 500000))
> echo "CTID $CTID: increasing diskinodes from $DI_S:$DI_H to
> $NEW_DI_S:$NEW_DI_H"
> vzctl set $CTID --diskinodes $NEW_DI_S:$NEW_DI_H --save
> 
> Same for diskspace.
> _______________________________________________
> Users mailing list
> Users@openvz.org
> https://lists.openvz.org/mailman/listinfo/users
_______________________________________________
Users mailing list
Users@openvz.org
https://lists.openvz.org/mailman/listinfo/users

Reply via email to