Removing swap and other filesystems

These are the filesystems listed using df :

# df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t0d0s0    237770199 138839515 96552983    59%    /
/devices                   0       0       0     0%    /devices
ctfs                       0       0       0     0%    /system/contract
proc                       0       0       0     0%    /proc
mnttab                     0       0       0     0%    /etc/mnttab
swap                 28019728    1208 28018520     1%    /etc/svc/volatile
objfs                      0       0       0     0%    /system/object
sharefs                    0       0       0     0%    /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1
                     237770199 138839515 96552983    59%    /lib/libc.so.1
fd                         0       0       0     0%    /dev/fd
swap                 30710920 2692400 28018520     9%    /tmp
swap                 28018552      32 28018520     1%    /var/run
swap                 28018520       0 28018520     0%    /dev/vx/dmp
swap                 28018520       0 28018520     0%    /dev/vx/rdmp
/dev/odm                   0       0       0     0%    /dev/odm
/dev/vx/dsk/bgw1dg/vol01
                     1394485248 1238489538 146614026    90%    /var/opt/BGw/Serv                                                                                        erGroup1
/dev/vx/dsk/soa1dg/vol09
                     20971520 10677761 9650500    53%    /u09

This is the vfstab :

# cat /etc/vfstab
#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
#
fd      -       /dev/fd fd      -       no      -
/proc   -       /proc   proc    -       no      -
#/dev/dsk/c0t0d0s1      -       -       swap    -       no      -
/dev/dsk/c0t0d0s0       /dev/rdsk/c0t0d0s0      /       ufs     1       no      -
/devices        -       /devices        devfs   -       no      -
sharefs -       /etc/dfs/sharetab       sharefs -       no      -
ctfs    -       /system/contract        ctfs    -       no      -
objfs   -       /system/object  objfs   -       no      -
swap    -       /tmp    tmpfs   -       yes     -
/dev/vx/dsk/soa1dg/vol09 /dev/vx/rdsk/soa1dg/vol09 /u09  vxfs  0  yes  -
L28bi02:/MP_UDR/MP/EMMUDR       -       /var/opt/BGw/ServerGroup1/CBiO/BSCS     nfs     -       yes     rw
#

This is mnttab :

# cat /etc/mnttab
/dev/dsk/c0t0d0s0       /       ufs     rw,intr,largefiles,logging,xattr,onerror=panic,dev=780040       1398071817
/devices        /devices        devfs   dev=4cc0000     1398071772
ctfs    /system/contract        ctfs    dev=4d40001     1398071772
proc    /proc   proc    dev=4d00000     1398071772
mnttab  /etc/mnttab     mntfs   dev=4d80001     1398071772
swap    /etc/svc/volatile       tmpfs   xattr,dev=4dc0001       1398071772
objfs   /system/object  objfs   dev=4e00001     1398071772
sharefs /etc/dfs/sharetab       sharefs dev=4e40001     1398071772
/usr/lib/libc/libc_hwcap1.so.1  /lib/libc.so.1  lofs    dev=780040      1398071816
fd      /dev/fd fd      rw,dev=4fc0001  1398071817
swap    /tmp    tmpfs   xattr,dev=4dc0002       1398071818
swap    /var/run        tmpfs   xattr,dev=4dc0003       1398071818
swap    /dev/vx/dmp     tmpfs   xattr,dev=4dc0004       1398071825
swap    /dev/vx/rdmp    tmpfs   xattr,dev=4dc0005       1398071825
/dev/odm        /dev/odm        odm     smartsync,dev=50c0000   1398071888
/dev/vx/dsk/bgw1dg/vol01        /var/opt/BGw/ServerGroup1       vxfs    rw,suid,delaylog,largefiles,qio,cluster,ioerror=mdisable,crw,mntlock=VCS,dev=4254050    1412612652
-hosts  /net    autofs  nosuid,indirect,ignore,nobrowse,dev=5080002     1491552593
L28emmfe1:vold(pid8624) /vol    nfs     ignore,noquota,dev=5040005      1491552604
/dev/vx/dsk/soa1dg/vol09        /u09    vxfs    rw,suid,delaylog,largefiles,qio,ioerror=mwdisable,dev=4246d60   1491831682
#

I need to clear up some space in this server to create a different filesystem with the size of 500G.

How do I remove the swap files, and also /lib/libc.so.1?
Also is it possible to shrink the size of / ? How do I do this?

These are the steps I have done to remove /lib/libc.so.1 :

# umount -f /lib/libc.so.1
umount: Operation not supported
umount: cannot unmount /lib/libc.so.1
#

Why do I get this error, and how do I resolve it and of course remove this partition?

These are the steps I have taken to remove swap :

# swap -d /var/run
/var/run: Is a directory

Please help.

The only real swap space was the

#/dev/dsk/c0t0d0s1      -       -       swap    -       no      -

where the fstype (column 4) is swap. But now disabled by the leading comment sign.
The current real swap space is shown with swap -l (in blocks = half kilobytes).
The swap in the first column means the filesystem is mapped to the virtual system memory (that consists of RAM + swap and is shown with swap -s ).
Likewise the lofs filesystem is mapped to the filesystem it is mounted from.
To find unused disk space you can try Veritas volume manager commands like vxprint or vxdisk list ; please consult your Veritas documentation.

If you do manage to sucessfully unmount /lib/libc.so.1, you'll likely have to pull the plug to reboot - and hope /lib/libc.so.1 comes back.

See Whats this lofs mount onto /lib/libc.so.1 in Solaris 10 ? | Oracle darren_moffat@blog$ cat /dev/mem | grep /dev/urandom Blog