/var slice too small

My /var slice is under 300MB and it's creating issues when I install patches. I copied all the files from /var/sadm/pkg to a bigger drive and created a sym. link in /var/sadm for it but now when I install patches, I get:

Directory is expected, found link - /var/sadm/pkg

Is there a way around this?What are my options? ...Ideally, I'd love to increase the size of /var.

Thanks!

[405 byte] By [ph0enix2002] at [2007-11-26 7:44:57]
# 1

Wait for ZFS? This may fix itself when the new FS is released with the new sol update this month if I remember correctly...

However, my hamfisted approach would be to just copy the var directory to / (will require some mving) and do not mount /var to a particular slice in of itself.That is, if / is big enough. Hopefully nothing is watching inodes...

kjard_us at 2007-7-6 19:56:14 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 2

Hi,

Lots of options!

(i) create a new filesystem, mount on /var2, copy over /var to /var2 (ideally in single user mode!) -- then edit vfstab to point to new /var

(ii) do a patchadd -B <new dir name> - puts backout info here instead

(iii) do(nt!) do a patchadd -d - doesnt save backout info - generally a bad thing to do.

(iv) if /var is on volume manager then grow the filesystem..

Cheers

Stuart

turnstile at 2007-7-6 19:56:14 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 3
Thank you both for the replies. I have two disks in the system and both are partitioned with no space left.Can I copy the existing backout info to the new dir? If so, how does the system know where to look for it?
ph0enix2002 at 2007-7-6 19:56:14 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 4

300Mb is indeed rather small, depending on usage ofcourse. Are there no other places which take up diskspace? For example you probably also have /var/log lying around, if you didn't setup any logrotation that might have taken up too much space as well.

I don't think I ever tried moving /var/sadm/pkg out of the way, but you could always experiment with /var/sadm/patch. It shouldn't be so picky about that. And depending on how you apply the patches you may also benefit from moving /var/sadm/spool out of the way, considering that patches downloaded using smpatch first end up here (and will also be unpacked during installation).

LionO at 2007-7-6 19:56:14 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 5
What kind of system do you have? I was rather limited by the 18 gig drives in my blade1000 but a cheap 150 gb firewire drive has solved all of my problems.... Maybe a new drive is what you need. I would not put var on it, but it will give you wiggle room for rearranging your system.
kjard_us at 2007-7-6 19:56:14 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 6
I only have a Ultra-10 (440Mhz) with a 9GB system disk and 120GB disk for /export/home. My SPARC doesn't have any firewire ports.
ph0enix2002 at 2007-7-6 19:56:14 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 7
Lion-O,My /var/log is only 19K in size. It's /var/sadm/pkg that takes up around 150MB.
ph0enix2002 at 2007-7-6 19:56:14 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 8

Well, then I'm afraid that you're running out of options very fast. To my knowledge it shouldn't be a problem to move the directory somewhere else (as long as you make sure you don't put it on a slice mounted with noexec) but I'm not sure and since you seem to have tried this... Btw; you did create a symlink and not a hardlink I assume? (ln -s ...).

I think my advice can only boil down to setting up your box again, tedious as it may be. However; the latest version should be available very soon now and it offers ZFS. This filesystem will allow you to change space assignment on the fly so you'll never run into problems like these anymore. Perhaps that can be a good alternative.

LionO at 2007-7-6 19:56:14 > top of Java-index,Solaris Operating System,Solaris 10 Features...