Extending the /var partition on a Citrix NetScaler VPX

E

last update: March 2023

There is a question coming up every now and then: How to extend space on a Citrix ADC formerly called NetScaler. First of all: There is absolutely no supported way to do so!

With this in mind, we can continue.

Is there a real need to extend the disk space?

The answer is no. There is plenty of space for all needs.

You said, there is space enough, why did I run out of diskspace?

That’s hard to answer. There may be several reasons. Probably, you have plenty of data that could get erased:

    1. You have plenty of old firmware in /var/nsinstall. You may delete these remains. They are not needed at all.
    2. You have core dumps in /var/core. The intention of these dumps is, to send them to Citrix, so Citrix can fix firmware bugs. There is absolutely no reason to keep them if you didn’t do so in a timely manner.
    3. You have crash dumps in /var/crash. The intention of these dumps is, to send them to Citrix, so Citrix can fix firmware bugs. There is absolutely no reason to keep them if you didn’t do so in a timely manner.
    4. There is something wrong with your log-file rotation. Check, if there are over-sized logs in /var/log or /var/nslog

I am pretty sure, you will have space enough if you clean up your installation, and no more need to extend /var. You should now have about 50% of free space.


No matter, I want to extend space on /var

I warned you about disk space extensions not being supported. I never do so, however, I think it’s not that dangerous to do. There are two methods:

Add a second vDisk

That’s more or less simple. You might mount it to /var/nsinstall and you’ll always have plenty of space to upgrade your Citrix ADC / NetScaler. It takes rather little knowledge to do so.

Extend the existing vDisk

  1. Extend the vDisk to whatever size you like.
  2. Boot the VM using a BSD boot CD, run life-CD (it had not b
  3. Wen needed, in VMWare, I could extend my drive under VM-Ware during running my ADC, but not under XEN without Le-BSD)
  4. execute gpart show to prove, there is some free (unalocated) space on the drive. It will also tell you the name of the current drive (i.E. da0, ad0)
  5. execute gpart resize -i 1 ad0 (or what ever name your drive has)
  6. execute gpart commit ad0s1 (to commit changes)
  7. execute gpart show to see the extended partition. There should now be unused space on the partition.
  8. execute gpart resize -i 5 ad0s1 to extend /var (or -i 1 to extend /flash, -i2 for swap)
  9. execute growfs -M /var /dev/ad0s1 to adapt the file-system (thanks, Lukas, I’ve forgotten to mention this one)

That’s all. Reboot, double-check, your /var should be bigger now 🙂


I hope that helped. Drop me a comment, if you are happy with this blog

About the author

Johannes Norz

Johannes Norz is a Citrix Certified Citrix Technology Advocate (CTA), Citrix Certified Instructor (CCI) and Citrix Certified Expert on Application Delivery and Security (CCE-AppDS).

He frequently works for Citrix international Consulting Services and several education centres all around the globe.

Johannes lives in Austria. He had been borne in Innsbruck, a small city (150.000 inhabitants) in the middle of the most beautiful Austrian mountains (https://www.youtube.com/watch?v=UvdF145Lf2I)

3 comments

By Johannes Norz

Recent Posts

Recent Comments