Discussion:
Can't Create DB
(too old to reply)
Jeice Cypher
2011-03-30 17:53:20 UTC
Permalink
So, I decided to do a fresh install of postgresql, but, while following
the steps in Assignment 0, I get an error in the

"initdb" step. I get the following error:

creating template1 database in /u7/namartin/pgdb/base/1 ... FATAL:
could not create semaphores: No space left on device
DETAIL: Failed system call was semget(1, 17, 03600).
HINT: This error does *not* mean that you have run out of disk space.
It occurs when either the system limit for the maximum number
of semaphore sets (SEMMNI), or the system wide maximum number of
semaphores (SEMMNS), would be exceeded. You need to raise the
respective kernel parameter. Alternatively, reduce PostgreSQL's
consumption of semaphores by reducing its max_connections parameter
(currently 10).
The PostgreSQL documentation contains more information about
configuring your system for PostgreSQL.
child process exited with exit code 1
initdb: removing data directory "/u7/namartin/pgdb"


I tried doing what it recommends, but I can't change those values in the
system because they're read-only. I don't know what else to do. Please help.
Earl Oliver
2011-03-30 17:56:49 UTC
Permalink
The "No space left on device" is probably the source of error. Check
your diskquota.

Earl
Post by Jeice Cypher
No space left on device
Jeice Cypher
2011-03-30 18:04:51 UTC
Permalink
Kbytes Used Capacity
2000 1392 70% fs01.student.math:/home
204800 0 00% fs-mail.student.cs:/vol/mbox
1500004 110168 07%
fs-homedirs.student.cs:/vol/homedirs/cs-quota

that's what my diskquota says if I'm on cpu18

Disk quotas for user namartin (uid 6727):
Filesystem blocks quota limit grace files quota limit
grace
fs-homedirs.student.cs:/vol/homedirs/cs-quota
110384 1500004 1500004 6020 4294967295
4294967295

is what it says if I'm on linux006

Do I have no space left? I don't get why I shouldn't have space, I don't
have anything on my system that I didn't have before, and I even got rid
of some more stuff.
The "No space left on device" is probably the source of error. Check
your diskquota.
Earl
Post by Jeice Cypher
No space left on device
Jeice Cypher
2011-03-30 18:14:06 UTC
Permalink
Logged and relogged several times, re installed postgresql several
times, no luck :(
I had the same problem. It's not because of disk space, the error
"HINT: This error does *not* mean that you have run out of disk space."
The error went away for me after logging out of the Linux machines and
then logging back in.
Hope this helps.
Greg
Kbytes Used Capacity
2000 1392 70% fs01.student.math:/home
204800 0 00% fs-mail.student.cs:/vol/mbox
1500004 110168 07% fs-homedirs.student.cs:/vol/homedirs/cs-quota
that's what my diskquota says if I'm on cpu18
Filesystem blocks quota limit grace files quota limit grace
fs-homedirs.student.cs:/vol/homedirs/cs-quota
110384 1500004 1500004 6020 4294967295 4294967295
is what it says if I'm on linux006
Do I have no space left? I don't get why I shouldn't have space, I
don't have anything on my system that I didn't have before, and I even
got rid of some more stuff.
The "No space left on device" is probably the source of error. Check
your diskquota.
Earl
Post by Jeice Cypher
No space left on device
Earl Oliver
2011-03-30 18:31:35 UTC
Permalink
The disk was the most obvious cause (despite the contradictory 'hint').

Do you already have a database created at ~/pgdb ?

You can come by my office hour at 4pm and we'll look at it.

Earl
Post by Jeice Cypher
Logged and relogged several times, re installed postgresql several
times, no luck :(
I had the same problem. It's not because of disk space, the error
"HINT: This error does *not* mean that you have run out of disk space."
The error went away for me after logging out of the Linux machines and
then logging back in.
Hope this helps.
Greg
Kbytes Used Capacity
2000 1392 70% fs01.student.math:/home
204800 0 00% fs-mail.student.cs:/vol/mbox
1500004 110168 07% fs-homedirs.student.cs:/vol/homedirs/cs-quota
that's what my diskquota says if I'm on cpu18
Filesystem blocks quota limit grace files quota limit grace
fs-homedirs.student.cs:/vol/homedirs/cs-quota
110384 1500004 1500004 6020 4294967295 4294967295
is what it says if I'm on linux006
Do I have no space left? I don't get why I shouldn't have space, I
don't have anything on my system that I didn't have before, and I even
got rid of some more stuff.
The "No space left on device" is probably the source of error. Check
your diskquota.
Earl
Post by Jeice Cypher
No space left on device
Earl Oliver
2011-03-30 20:50:34 UTC
Permalink
Just an update. This appears to be a bug in postgresql that has been
fixed in subsequent versions. I've emailed CSCF to see if there are any
quick fixes (i.e. increase the semaphore limit).

In the meantime, I gave this student an account on my own machine. If
anyone else has this problem and wants an account on my machine let me know.

Earl
Post by Earl Oliver
The disk was the most obvious cause (despite the contradictory 'hint').
Do you already have a database created at ~/pgdb ?
You can come by my office hour at 4pm and we'll look at it.
Earl
Post by Jeice Cypher
Logged and relogged several times, re installed postgresql several
times, no luck :(
I had the same problem. It's not because of disk space, the error
"HINT: This error does *not* mean that you have run out of disk space."
The error went away for me after logging out of the Linux machines and
then logging back in.
Hope this helps.
Greg
Kbytes Used Capacity
2000 1392 70% fs01.student.math:/home
204800 0 00% fs-mail.student.cs:/vol/mbox
1500004 110168 07% fs-homedirs.student.cs:/vol/homedirs/cs-quota
that's what my diskquota says if I'm on cpu18
Filesystem blocks quota limit grace files quota limit grace
fs-homedirs.student.cs:/vol/homedirs/cs-quota
110384 1500004 1500004 6020 4294967295 4294967295
is what it says if I'm on linux006
Do I have no space left? I don't get why I shouldn't have space, I
don't have anything on my system that I didn't have before, and I even
got rid of some more stuff.
The "No space left on device" is probably the source of error. Check
your diskquota.
Earl
Post by Jeice Cypher
No space left on device
Fraser Gunn
2011-03-31 21:59:27 UTC
Permalink
If this happens again, the quick fix is to use one of the other
linux.student.cs hosts and remind your friends to kill their old
postgresql servers still running from the last assignment.

We needed to increase the semaphore limits anyway. Boring details follow.


Before, linux006 had run out of semaphore arrays:

linux006$ ipcs -l
...
------ Semaphore Limits --------
max number of arrays = 128
...

linux006$ ipcs -u
...
------ Semaphore Status --------
used arrays = 128
...

After increasing the limits, we have:

linux006$ ipcs -l
...
------ Semaphore Limits --------
max number of arrays = 1024
...

I increased several other related limits on all linux.student.cs host:

linux006$ tail -9 /etc/sysctl.conf
# Increased limits for db2 and postgresql. -- fhg 2011-03-31
kernel.msgmax = 65536
kernel.msgmnb = 65536
kernel.msgmni = 32768
kernel.sem = 250 256000 32 1024
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096

-- Fraser
Post by Earl Oliver
Just an update. This appears to be a bug in postgresql that has been
fixed in subsequent versions. I've emailed CSCF to see if there are any
quick fixes (i.e. increase the semaphore limit).
...

Greg Knox
2011-03-30 18:10:25 UTC
Permalink
I had the same problem. It's not because of disk space, the error
message you have has the following:

"HINT: This error does *not* mean that you have run out of disk space."

The error went away for me after logging out of the Linux machines and
then logging back in.

Hope this helps.

Greg
Post by Jeice Cypher
Kbytes Used Capacity
2000 1392 70% fs01.student.math:/home
204800 0 00% fs-mail.student.cs:/vol/mbox
1500004 110168 07% fs-homedirs.student.cs:/vol/homedirs/cs-quota
that's what my diskquota says if I'm on cpu18
Filesystem blocks quota limit grace files quota limit
grace
fs-homedirs.student.cs:/vol/homedirs/cs-quota
110384 1500004 1500004 6020 4294967295
4294967295
is what it says if I'm on linux006
Do I have no space left? I don't get why I shouldn't have space, I don't
have anything on my system that I didn't have before, and I even got rid
of some more stuff.
The "No space left on device" is probably the source of error. Check
your diskquota.
Earl
Post by Jeice Cypher
No space left on device
Continue reading on narkive:
Loading...