Re: IOError: [Errno 28] No space left on device

Discussion in 'Python' started by hong zhang, Nov 18, 2009.

  1. hong zhang

    hong zhang Guest

    --- On Tue, 11/17/09, Tim Chase <> wrote:

    > From: Tim Chase <>
    > Subject: Re: IOError: [Errno 28] No space left on device
    > To: "Lie Ryan" <>
    > Cc:
    > Date: Tuesday, November 17, 2009, 7:47 PM
    > >> for i in

    > glob.glob('/sys/kernel/debug/ieee80211/phy*/iwlagn/data/continuous_tx'):
    > >>     with open(i, 'w') as f:
    > >>         print
    > >>f, cont_tx
    > >>
    > >> work perfectly.
    > >>
    > >> But following get error like:
    > >> print >>f, cont_tx
    > >> IOError: [Errno 28] No space left on device

    > >
    > > Apparently the harddisk where you stored the file is

    > full?
    >
    > Likely a misinterpretation of the error.  I'm guessing
    > either one needs to be root to write to this [likely
    > virtual] file, or a member of an associated group..  It
    > would help to have the output of
    >
    > bash$ whoami
    > bash$ id
    >
    > and
    >
    > bash$ ls -lsF
    > /sys/kernel/debug/ieee80211/phy*/iwlagn/data/continuous_tx


    It is root. see following.

    File "../henry-cont-tx", line 186, in do_cont_tx
    print >>f, cont_tx
    IOError: [Errno 28] No space left on device
    root@tester-laptop:/home/tester/Desktop/sv-project/scripts/scripts# whoami
    root
    root@tester-laptop:/home/tester/Desktop/sv-project/scripts/scripts# id
    uid=0(root) gid=0(root) groups=0(root)
    root@tester-laptop:/home/tester/Desktop/sv-project/scripts/scripts# ls -lsF /sys/kernel/debug/ieee80211/phy*/iwlagn/data/continuous_tx
    0 -rw------- 1 root root 0 2009-11-17 17:51 /sys/kernel/debug/ieee80211/phy2/iwlagn/data/continuous_tx


    >
    > I'd be particularly interested in the group association and
    > the permission bits.
    >
    > -tkc
    >
    >
    >
    >
    >
    >
    > -- http://mail.python.org/mailman/listinfo/python-list
    >
     
    hong zhang, Nov 18, 2009
    #1
    1. Advertising

  2. hong zhang

    Lie Ryan Guest

    hong zhang wrote:
    >
    > --- On Tue, 11/17/09, Tim Chase <> wrote:
    >
    >> From: Tim Chase <>
    >> Subject: Re: IOError: [Errno 28] No space left on device
    >> To: "Lie Ryan" <>
    >> Cc:
    >> Date: Tuesday, November 17, 2009, 7:47 PM
    >>>> for i in

    >> glob.glob('/sys/kernel/debug/ieee80211/phy*/iwlagn/data/continuous_tx'):
    >>>> with open(i, 'w') as f:
    >>>> print
    >>>> f, cont_tx
    >>>>
    >>>> work perfectly.
    >>>>
    >>>> But following get error like:
    >>>> print >>f, cont_tx
    >>>> IOError: [Errno 28] No space left on device
    >>> Apparently the harddisk where you stored the file is

    >> full?
    >>
    >> Likely a misinterpretation of the error. I'm guessing
    >> either one needs to be root to write to this [likely
    >> virtual] file, or a member of an associated group.. It
    >> would help to have the output of
    >>
    >> bash$ whoami
    >> bash$ id
    >>
    >> and
    >>
    >> bash$ ls -lsF
    >> /sys/kernel/debug/ieee80211/phy*/iwlagn/data/continuous_tx

    >
    > It is root. see following.
    >
    > File "../henry-cont-tx", line 186, in do_cont_tx
    > print >>f, cont_tx
    > IOError: [Errno 28] No space left on device
    > root@tester-laptop:/home/tester/Desktop/sv-project/scripts/scripts# whoami
    > root
    > root@tester-laptop:/home/tester/Desktop/sv-project/scripts/scripts# id
    > uid=0(root) gid=0(root) groups=0(root)
    > root@tester-laptop:/home/tester/Desktop/sv-project/scripts/scripts# ls -lsF /sys/kernel/debug/ieee80211/phy*/iwlagn/data/continuous_tx
    > 0 -rw------- 1 root root 0 2009-11-17 17:51 /sys/kernel/debug/ieee80211/phy2/iwlagn/data/continuous_tx
    >


    Where is the output file? Could it possibly be located in a device that
    is impossible to write even for root (e.g. filesystem mounted as
    read-only or CD or floppy with the readonly switch active or NTFS
    partition without ntfs-3g driver)?

    Can you write to this file from outside python (try echo-ing to the
    file)? What's the permission of the folder?

    The output of your 'df' shows that you only have one partition (for
    root) and nothing else; it is quite uncommon for linux/unix to be setup
    with only one partition, you didn't trim anything right?

    What's the output of:
    $ mount
     
    Lie Ryan, Nov 18, 2009
    #2
    1. Advertising

  3. Lie Ryan schrieb:
    > hong zhang wrote:
    >>
    >> --- On Tue, 11/17/09, Tim Chase <> wrote:
    >>
    >>> From: Tim Chase <>
    >>> Subject: Re: IOError: [Errno 28] No space left on device
    >>> To: "Lie Ryan" <>
    >>> Cc:
    >>> Date: Tuesday, November 17, 2009, 7:47 PM
    >>>>> for i in
    >>> glob.glob('/sys/kernel/debug/ieee80211/phy*/iwlagn/data/continuous_tx'):
    >>>>> with open(i, 'w') as f:
    >>>>> print
    >>>>> f, cont_tx
    >>>>>
    >>>>> work perfectly.
    >>>>>
    >>>>> But following get error like:
    >>>>> print >>f, cont_tx
    >>>>> IOError: [Errno 28] No space left on device
    >>>> Apparently the harddisk where you stored the file is
    >>> full?
    >>>
    >>> Likely a misinterpretation of the error. I'm guessing
    >>> either one needs to be root to write to this [likely
    >>> virtual] file, or a member of an associated group.. It
    >>> would help to have the output of
    >>>
    >>> bash$ whoami
    >>> bash$ id
    >>>
    >>> and
    >>>
    >>> bash$ ls -lsF
    >>> /sys/kernel/debug/ieee80211/phy*/iwlagn/data/continuous_tx

    >>
    >> It is root. see following.
    >> File "../henry-cont-tx", line 186, in do_cont_tx
    >> print >>f, cont_tx
    >> IOError: [Errno 28] No space left on device
    >> root@tester-laptop:/home/tester/Desktop/sv-project/scripts/scripts#
    >> whoami
    >> root
    >> root@tester-laptop:/home/tester/Desktop/sv-project/scripts/scripts# id
    >> uid=0(root) gid=0(root) groups=0(root)
    >> root@tester-laptop:/home/tester/Desktop/sv-project/scripts/scripts# ls
    >> -lsF /sys/kernel/debug/ieee80211/phy*/iwlagn/data/continuous_tx
    >> 0 -rw------- 1 root root 0 2009-11-17 17:51
    >> /sys/kernel/debug/ieee80211/phy2/iwlagn/data/continuous_tx
    >>

    >
    > Where is the output file? Could it possibly be located in a device that
    > is impossible to write even for root (e.g. filesystem mounted as
    > read-only or CD or floppy with the readonly switch active or NTFS
    > partition without ntfs-3g driver)?
    >
    > Can you write to this file from outside python (try echo-ing to the
    > file)? What's the permission of the folder?
    >
    > The output of your 'df' shows that you only have one partition (for
    > root) and nothing else; it is quite uncommon for linux/unix to be setup
    > with only one partition, you didn't trim anything right?


    /sys is not a block-device, it's similar to /proc (or replaces it, I
    forgot). It displays system-information and device-trees and whatnot,
    and some of those files can be written to change settings.

    I think the error the OP sees is a mis-interpretion or unlucky re-map of
    an error-code the kernel gives when things go wrong, I can only guess
    but maybe he writes to fast to the files, or to often.


    Diez
     
    Diez B. Roggisch, Nov 18, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jay Donnell

    IOError: [Errno 32] Broken pipe

    Jay Donnell, Jun 28, 2004, in forum: Python
    Replies:
    2
    Views:
    8,443
    Donn Cave
    Jun 29, 2004
  2. Nigel King

    IOError: [Errno 32] Broken pipe

    Nigel King, Sep 29, 2004, in forum: Python
    Replies:
    3
    Views:
    9,890
    Vinay Sajip
    Oct 11, 2004
  3. hong zhang
    Replies:
    2
    Views:
    918
    Tim Chase
    Nov 18, 2009
  4. Diez B. Roggisch
    Replies:
    2
    Views:
    356
    Terry Reedy
    Nov 19, 2009
  5. Kurtis Rainbolt-greene
    Replies:
    6
    Views:
    158
    Ilan Berci
    Oct 20, 2009
Loading...

Share This Page