Write to 1 failed [No space left on device] Error


 
Thread Tools Search this Thread
Operating Systems Solaris Write to 1 failed [No space left on device] Error
# 1  
Old 07-15-2017
Write to 1 failed [No space left on device] Error

Running a installation on Solaris 11 and getting error write to 1 failed [No space left on device]

If anyone can advise ?

Code:
ORIGINAL_PATH="${PATH}"
  # prepend /usr/xpg4/bin to PATH as needed
  temporaryPath=`expr "${PATH}:" : '\(/usr/xpg4/bin:\)'`
  if [ "X${temporaryPath}" = "X" ]
  then
    PATH="/usr/xpg4/bin:${PATH}"

seem to have space available

Code:
df -h
Filesystem             Size   Used  Available Capacity  Mounted on
rpool/ROOT/solaris      50G   879M        49G     2%    /
/dev                     0K     0K         0K     0%    /dev
/opt                   2.0G   130M       1.9G     7%    /opt
/opt/bmc                20G   414M        19G     3%    /opt/bmc
/opt/bmc/remedy        100G    23G        76G    24%    /opt/bmc/remedy
rpool/ROOT/solaris/var
                        50G    83M        49G     1%    /var
proc                     0K     0K         0K     0%    /proc
ctfs                     0K     0K         0K     0%    /system/contract
mnttab                   0K     0K         0K     0%    /etc/mnttab
objfs                    0K     0K         0K     0%    /system/object
swap                   353M   504K       352M     1%    /system/volatile
sharefs                  0K     0K         0K     0%    /etc/dfs/sharetab
fd                       0K     0K         0K     0%    /dev/fd
swap                   353M   232K       352M     1%    /tmp
rpool/VARSHARE          50G   5.7M        49G     1%    /var/share
rpool/export            50G    32K        49G     1%    /export
rpool/export/home       50G    46K        49G     1%    /export/home
rpool/export/home/acw2012
                        50G    46K        49G     1%    /export/home/acw2012
rpool/export/home/bzm2301
                        50G    45K        49G     1%    /export/home/bzm2301
rpool/export/home/gallium
                        50G   137K        49G     1%    /export/home/gallium
rpool/export/home/mnl1901
                        50G    46K        49G     1%    /export/home/mnl1901
rpool/export/home/mym1202
                        50G    37K        49G     1%    /export/home/mym1202
rpool/export/home/opscman
                        50G    33K        49G     1%    /export/home/opscman
rpool/export/home/opsunix
                        50G    36K        49G     1%    /export/home/opsunix
rpool/export/home/passman
                        50G    36K        49G     1%    /export/home/passman
rpool/export/home/storeadm
                        50G    36K        49G     1%    /export/home/storeadm
rpool/export/home/sv_mont
                        50G    38K        49G     1%    /export/home/sv_mont
rpool/export/home/unixadm
                        50G    36K        49G     1%    /export/home/unixadm
rpool/export/home/unixdna
                        50G    37K        49G     1%    /export/home/unixdna
rpool/export/home/uxmgt
                        50G    37K        49G     1%    /export/home/uxmgt
rpool                   50G    31K        49G     1%    /rpool
rpool/VARSHARE/pkg      50G    32K        49G     1%    /var/share/pkg
rpool/VARSHARE/pkg/repositories
                        50G    31K        49G     1%    /var/share/pkg/repositories

Moderator's Comments:
Mod Comment edit by bakunin: please use CODE- (not ICODE-) tags for terminal output too. Thank you.

Last edited by bakunin; 07-15-2017 at 07:11 PM..
# 2  
Old 07-15-2017
Quote:
Originally Posted by Mpumi
Running a installation on Solaris 11 and getting error write to 1 failed [No space left on device]
My suspicion is that the installation routine is trying to write in /dev or something such, where nothing at all should be written. "1" looks more like an I/O descriptor (for stdout) rather than a filename and i suppose there is something garbled in the installation routine so that output is going to a file named "1! rather than the I/O-desciptor 1.

You might debug the installation routine (if it is a script it should be relatively easy) to find where the error originates from.

I hope that helps.

bakunin
# 3  
Old 07-18-2017
Hi Bakunin,

some part of the script code is as per below, the first line is returned as error...

Code:
ORIGINAL_PATH="${PATH}"
  # prepend /usr/xpg4/bin to PATH as needed
  temporaryPath=`expr "${PATH}:" : '\(/usr/xpg4/bin:\)'`
  if [ "X${temporaryPath}" = "X" ]
  then
    PATH="/usr/xpg4/bin:${PATH}"


Moderator's Comments:
Mod Comment Please use CODE tags correctly as required by forum rules!

Last edited by RudiC; 07-18-2017 at 02:33 PM.. Reason: Changed CODE tags.
# 4  
Old 07-18-2017
Quote:
Originally Posted by Mpumi
some part of the script code is as per below, the first line is returned as error...

Code:
ORIGINAL_PATH="${PATH}"
  # prepend /usr/xpg4/bin to PATH as needed
  temporaryPath=`expr "${PATH}:" : '\(/usr/xpg4/bin:\)'`
  if [ "X${temporaryPath}" = "X" ]
  then
    PATH="/usr/xpg4/bin:${PATH}"

I have no idea what that is supposed to do, but: whatever it is, it should be done differently. Anyway, the only program external to the shell called in this part is the expr command, the rest is just variable manipulation inside the shell, which can't cause the error you are describing.

Either the error comes from somewhere else or it comes from line 3 of the part you have shown. But again: whatever it is supposed to do, i doubt that it does it and i am sure that even if it would do it it should be done differently.

If this is supposed to test if the path /usr/xpg4/bin is alraedy in the PATH it should be:

Code:
  # prepend /usr/xpg4/bin to PATH as needed
  if ! echo "$PATH" | grep -q '\/usr\/xpg4\/bin' ; then
    PATH="/usr/xpg4/bin:${PATH}"

instead of these ridiculous expr-gymnastics.

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
# 5  
Old 07-19-2017
Quote:
Originally Posted by bakunin
I have no idea what that is supposed to do, but: whatever it is, it should be done differently. Anyway, the only program external to the shell called in this part is the expr command, the rest is just variable manipulation inside the shell, which can't cause the error you are describing.

Either the error comes from somewhere else or it comes from line 3 of the part you have shown. But again: whatever it is supposed to do, i doubt that it does it and i am sure that even if it would do it it should be done differently.

If this is supposed to test if the path /usr/xpg4/bin is alraedy in the PATH it should be:

Code:
  # prepend /usr/xpg4/bin to PATH as needed
  if ! echo "$PATH" | grep -q '\/usr\/xpg4\/bin' ; then
    PATH="/usr/xpg4/bin:${PATH}"

instead of these ridiculous expr-gymnastics.

I hope this helps.

bakunin
That's not quite correct. Unlike grep, expr searches from the beginning.
The following is correct
Code:
if echo x"${PATH}:" | grep '^x/usr/xpg4/bin:' >/dev/null
then
  :
else
  PATH="/usr/xpg4/bin:${PATH}"

Or
Code:
if expr x"${PATH}:" : x'/usr/xpg4/bin:' >/dev/null
then
  :
else
  PATH="/usr/xpg4/bin:${PATH}"

Also avoids potential problems with Solaris 10 /bin/sh and /bin/grep, and with strange characters in PATH.
But the original is okay. As was already stated, the problem is elsewhere.
# 6  
Old 07-19-2017
Why not use internal parameter expansion in lieu of external grep?
Code:
[ ${PATH/"/usr/xpg4/bin"} = ${PATH} ] || PATH="/usr/xpg4/bin:${PATH}"

This User Gave Thanks to RudiC For This Post:
# 7  
Old 07-19-2017
Because 1. the Solaris 10 /bin/sh does not have all the Posix modifiers, and this one is not even Posix.
Also 2. this modifier has some pitfalls:
${PATH/"/usr/xpg4/bin"} works in bash-4 only while bash-3 takes ${PATH/\/usr\/xpg4\/bin}. And it is hard to add a : character (to form a separator).
Anyway, the following standard expression is readable and has no pitfalls:
Code:
[[ ${PATH}: == /usr/xpg4/bin:* ]] || PATH="/usr/xpg4/bin:${PATH}"

The Solaris 10 /bin/sh needs the less readable
Code:
case ${PATH}: in /usr/xpg4/bin:*);; *)PATH="/usr/xpg4/bin:${PATH}";; esac

This User Gave Thanks to MadeInGermany For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Sol11 - Error at prompt (no space left on device)

user1@:/$ -ksh: line 3: write to 1 failed user11@:/$ -ksh: line 3: write to 1 failed user1@:/$ -ksh: line 3: write to 1 failed user1@:/$ -ksh: line 3: write to 1 failed user1@:/$ -ksh: line 3: write to 1 failed But theres plenty of space :- user1@:/$ df -kh Filesystem ... (9 Replies)
Discussion started by: psychocandy
9 Replies

2. Linux

No space left on device while there is plenty of space available

Hello all posting here after scanning the net and tried most of the things offered still no solution that worked when I do : $ df -h Filesystem Size Used Avail Use% Mounted on footmpfs 7.9G 60K 7.9G 1% /dev tmpfs 7.9G 0 7.9G 0% /dev/shm /dev/da1 ... (3 Replies)
Discussion started by: umen
3 Replies

3. UNIX for Advanced & Expert Users

Sed: couldn't write 1378 items to stdout: No space left on device

Hi , In file first line start with "",when trying to remove using sed i am getting the below error .Please advise sed -e 's///g' -e 's/$]//g' segment1.txt >>segment_m1 sed: couldn't write 1378 items to stdout: No space left on device Thanks, Mohan (1 Reply)
Discussion started by: mohan705
1 Replies

4. AIX

Cpio: copy failed - No space left on device when I use rpm

Hello, I want to install GCC gcc-4.8.1-2.src.rpm for AIX 6.1 when I lance my command rpm -i gcc-4.8.1-2.src.rpm I have this error unpacking of archive failed on file gcc-4.8.1.tar.bz2: cpio: copy failed - No space left on device I checked the free space and I am surpise becouse I have... (7 Replies)
Discussion started by: tatab355
7 Replies

5. Shell Programming and Scripting

Write to 1 failed [No space left on device]

I am getting error in a shell script having a simple date command. Error is " write to 1 failed ". We saw that /tmp folder was 100% full. When we cleared some space in /tmp folder then script worked fine. Why does date command(or any other command) require space in /tmp folder? Which settings... (6 Replies)
Discussion started by: mahish20
6 Replies

6. HP-UX

Received error as Not enough space left on device

Hi Forum, We have observed one problem in one of our HP-UX machines which runs a software which connects the radio frequency scan devices and the scanned information is stored in the database through the same software. This software has thrown an error like "Not enough space left on the... (4 Replies)
Discussion started by: Nishant.Jvk
4 Replies

7. Solaris

visudo: write error: No space left on device

Hi All, This is Sandeep Gupta, I am facing a problem with sudo command. Whenever i am executing the command "visudo" i am getting the error "visudo: write error: No space left on device". but i have checked on my Solaris Box everything is ok, i have enough free space on my box, and also... (13 Replies)
Discussion started by: Sandeepgupta
13 Replies

8. Solaris

No space left on device but free space and inodes are available...

hi guys, me again ;) i recently opened a thread about physical to zone migration. My zone is mounted over a "bigger" LUN (500GB) and step is now to move the old files, from the physical server, to my zone. We are talking about 22mio of files. i used rsync to do that and every time at... (8 Replies)
Discussion started by: beta17
8 Replies

9. UNIX for Dummies Questions & Answers

cat: write error: No space left on device

I am trying to create new files under my directory...but i getting the following message... cat: write error: No space left on device How do we handle this error. I am not getting this error when I login as the super user (3 Replies)
Discussion started by: igandu
3 Replies

10. UNIX for Advanced & Expert Users

no space left on device

I have a SCO UNIX on my Server. When I last tried to shutdown my system, I got an error message “no space left on device”. Now when I try to boot the system again, I just can't and I get the same error message. Please help! (2 Replies)
Discussion started by: anjane
2 Replies
Login or Register to Ask a Question