Allocating space to ufs /usr by using ZFS in solaris

Hi,

Im currently having my diskspace allocation of my UFS filesystem in solris as 100% for /usr
directory.I have created a zfs pool of 3 gb.I want to allocate space from my zfs pool to /usr so that i can free space in /usr.Please help me it is quiet urgent.

Well, you can't allocate zfs to ufs, but you can create a symlink to zfs. Figure out 1+ subdirectories of /usr you can move and move them to the zvol.

example:

zfs create zpool/vol1
cd /usr
mv local /zpool/vol1/
ln -s /zpool/vol1/local local

I would probably do that while booting off cd and mounting your root disk to /a, just to be safe. Of course, you could just move the entire /usr volume to the zfs pool and do a
zfs set mountpoint=/usr zpool/vol1, but you just wanted to clear some space.

Beware that relocating the whole /usr to a zfs filesystem might possibly make your system unbootable.
Relocating parts of /usr using symbolic links (outside /usr/local which isn't part of Solaris) would likely render your system un-patchable, un-upgradeable and of certainly unsupported.

Correct, that's why i kind of suggested /usr/local, as that's usually patches or packages installed from sunfreeware or what not.

I only offered moving the entire /usr if it was a last resort.

A very painful last resort then. I strongly suspect the OS won't be bootable after that.

We have one box here that was able to boot with a migration to /usr on zfs, but the root was booting off ZFS, so that probably helped.

I would probably suggest creating, instead of a ZFS slice, UFS and moving /usr onto that.

You could also remove packages that are not needed. For example, if this system is not used to host user desktops, you could remove the GNOME packages. Next you could remove any unnecessary fonts and language packages. You could also remove the StarOffice packages.

HTH