Friday May 30, 2008

unable to install MySQL pkg file in Solaris with a small /var partition

I got a small Solaris 8 old machine with a small /var partition.


When I tried to install the MySQL pkg (package format), I got  "No space left on device " due to a filled up /var.

e.g.

shell:/export/home/bits/mysql> pkgadd -d mysql-5.0.51a-solaris8-sparc.pkg

The following packages are available:
  1  mysql     MySQL Community Server (GPL)
               (sun4u) 5.0.51a

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

Processing package instance <mysql> from </export/home/bits/mysql/mysql-5.0.51a-solaris8-sparc.pkg>

MySQL Community Server (GPL)
(sun4u) 5.0.51a

cpio: Cannot write "reloc/mysql/lib/libmystrings.a", errno 28, No space left on device
cpio: Cannot write "reloc/mysql/lib/libmysys.a", errno 28, No space left on device
cpio: Cannot write "reloc/mysql/lib/libz.a", errno 28, No space left on device
cpio: Cannot write "reloc/mysql/man/man1/myisamchk.1", errno 28, No space left on device
cpio: Cannot write "reloc/mysql/man/man1/myisampack.1", errno 28, No space left on device
cpio: Cannot write "reloc/mysql/man/man1/mysql-stress-test.pl.1", errno 28, No space left on device
cpio: Cannot write "reloc/mysql/man/man1/mysql-test-run.pl.1", errno 28, No space left on device
cpio: Cannot write "reloc/mysql/man/man1/mysql.1", errno 28, No space left on device
cpio: Cannot write "reloc/mysql/man/man1/mysql_tableinfo.1", errno 28, No space left on device
cpio: Cannot write "reloc/mysql/man/man1/mysqlaccess.1", errno 28, No space left on device
cpio: Cannot write "reloc/mysql/man/man1/mysqladmin.1", errno 28, No space left on device
.........
pkgadd: ERROR: attempt to process datastream failed
    - process </usr/bin/cpio -icdumD -C 512> failed, exit code 107
pkgadd: ERROR: unable to unpack datastream

Installation of <mysql> failed (internal error).
No changes were made to the system.

Then I checked the df ,

shell:/export/home/bits/mysql> df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c1t1d0s0    5046030  492972 4502598    10%    /
/dev/dsk/c1t1d0s3    5046030 2459989 2535581    50%    /usr
/proc                      0       0       0     0%    /proc
fd                         0       0       0     0%    /dev/fd
mnttab                     0       0       0     0%    /etc/mnttab
/dev/dsk/c1t1d0s4     498039  347600  100636    78%    /var
swap                 3132008      24 3131984     1%    /var/run
swap                 3148128   16144 3131984     1%    /tmp
/dev/dsk/c1t1d0s5    5046030 2990222 2005348    60%    /opt
/dev/dsk/c1t1d0s7    52857951 39795138 12534234    77%    /export/home
/dev/dsk/c1t2d0s7    35009161 26781384 7877686    78%    /export/home0

I watched df again during install , and found a full /var,

/dev/dsk/c1t1d0s4     498039  469731       0   100%    /var

so the above error.

To workaround this , I use the TMPDIR to let pkgadd to use another partition with enough space,
e.g.

shell:/export/home/bits/mysql> mkdir tmp
shell:/export/home/bits/mysql> export TMPDIR=/export/home/bits/mysql/tmp   \*\*\*

then pkgadd again,

shell:/export/home/bits/mysql> pkgadd  -d mysql-5.0.51a-solaris8-sparc.pkg

The following packages are available:
  1  mysql     MySQL Community Server (GPL)
               (sun4u) 5.0.51a

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

Processing package instance <mysql> from </export/home/bits/mysql/mysql-5.0.51a-solaris8-sparc.pkg>

MySQL Community Server (GPL)
(sun4u) 5.0.51a

........
/usr/bin/mysql <symbolic link>
/usr/bin/mysql-config <symbolic link>
/usr/bin/mysql_config <symbolic link>
....
/usr/sbin/safe_mysqld <symbolic link>
[ verifying class <none> ]
## Executing postinstall script.
scripts/mysql_install_db: !: not found
scripts/mysql_install_db: !: not found
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/opt/mysql/mysql/bin/mysqladmin -u root password 'new-password'
/opt/mysql/mysql/bin/mysqladmin -u root -h <host> password 'new-password'

Alternatively you can run:
/opt/mysql/mysql/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

Please report any problems with the ./bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com

Installation of <mysql> was successful.

So, this can be used as a workaround to install MySQL package format when /var is too small.
The same workaround (by setting TMPDIR to somewhere large enough) can be used for other pkgadd install when /var is not large enough.

About

Wing-Yip Walter Lee

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today