Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: No space left on device, uncommon cause?

  1. #1

    Unhappy No space left on device, uncommon cause?

    Hi OpenSUSE community,
    Although I am noob, it has been two years that I enjoy LEAP without troubleshouting, usually I always find the answer on forum.
    Here I am stuck on a more serious problem (than usual): my GUI does not start from today: "no space left on device".
    I check with
    Code:
    df -Th
    and indeed my root partition of 40GB (btrfs filesystem) is full.



    Here are my snapshots:
    Code:
    snapper -c root list


    Before that, I had a problem while installing the package "kernel-devel": I received an error which I ignored (unwise!) resulting on a problem with my packages, no matter what I tried with YaST or zypper I was receiving an error message "failed to move cache to final destination" (my guess is a mismatch between the the version of "kernel-devel" and my kernel version, but could not inquire further...).
    Once I restarted my laptop and lunch YaST, it reinstalled all the packages. Ever since, when I restart, I run into the error.

    At this point I prefer to ask for help before to deteriorate the situation even more.
    I see two options:
    1. Erase some files in the root partition, but which? I should need snapshots to recover the system before I tried to install "kernel-devel", right?
    2. Save personal file on usb stick and full installation of openSUSE.
    Thanks!

  2. #2
    Join Date
    Jun 2015
    Location
    Toulouse
    Posts
    133

    Default Re: No space left on device, uncommon cause?

    Le 16/11/2017 à 16:26, orsos a écrit :
    >
    > Hi OpenSUSE community,
    > Although I am noob, it has been two years that I enjoy LEAP without


    two years? 42.1??

    anyway your problem is very common specially on older installs (some
    progress have been made on newer defaults)

    the bible is here, first link on google for "opensuse btrfs"

    https://en.opensuse.org/SDB:BTRFS

    The simpler solution is removing older snapshots and editing snappers
    config files to have less snapshots

    by the way df do *not* gives relevant infos on btrfs :-(

    jdd (that was also hit some month ago :-)

  3. #3
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,576

    Default Re: No space left on device, uncommon cause?

    Unfortunately, the openSUSE Btrfs SDB doesn't mention the cron jobs which run if the system is "always on" but, the advice in the sections "Disk Space Full Because of Snapper" and "How to repair a broken/unmountable btrfs filesystem" is valid and, may be the only way you can initially repair the system sufficiently to allow the default Btrfs maintenance cron jobs to be executed.

    Once you have the system in a state which has some free space in the Btrfs system partition, manually execute the Btrfs maintenance scripts located in /etc/cron.monthly/ and /etc/cron.weekly/.

    After the system has booted as far as it can, you'll need to:


    1. activate the first VT (tty1) (<Ctrl-Alt-F1>);
    2. login as the user "root";
    3. shut the system down to "single-user mode" with: systemctl rescue
    4. type in the password of the user "root";
    5. 'cd' to /etc/cron.monthly/ and execute the 'btrfs-scrub' script in that directory;
    6. 'cd' to /etc/cron.weekly/ and execute the 'btrfs-balance' and 'btrfs-trim' scripts in that directory;
    7. wait for each script to execute -- each script will take more than a few minutes to complete;
    8. reboot: systemctl reboot


    Once the system has been repaired and is running normally, check the following (with a "normal" user's CLI):
    systemctl list-unit-files | grep -i 'btrfs'
    -- if it doesn't indicate that, the systemd service is enabled, enable it (with the user "root" or, by means of 'sudo'):
    sudo systemctl enable btrfsmaintenance-refresh.service

  4. #4

    Default Re: No space left on device, uncommon cause?

    Thanks for the reply jdd.
    Yes 42.1 at the beginning, now running on LEAP 42.3.
    Yes I thought about deleting snapshots, but since I need to restore from previous was not sure.
    Say I want to restore to this morning, so # 1026.
    Can I use the following code?
    Code:
    snapper delete 901-1025
    and then
    Code:
    snapper undochange 1026..1047

  5. #5
    Join Date
    Jun 2015
    Location
    Toulouse
    Posts
    133

    Default Re: No space left on device, uncommon cause?

    Le 16/11/2017 à 17:36, orsos a écrit :
    >
    > Thanks for the reply jjd.
    > Yes 42.1 at the beginning, now running on LEAP 42.3.
    > Yes I thought about deleting snapshots, but since I need to restore from
    > previous was not sure.


    are you sure you need it?

    first, list the snapshots with snapper, then remove the older ones, one
    at a time. When sufficient space is available, try rebooting. If the
    default do not boot, try rebooting the previous one *in the grub menu*

    do revert only if the boot is effective

    jdd

  6. #6
    Join Date
    Jun 2015
    Location
    Toulouse
    Posts
    133

    Default Re: No space left on device, uncommon cause?

    Le 16/11/2017 à 17:36, dcurtisfra a écrit :
    >
    > Unfortunately, the openSUSE Btrfs SDB doesn't mention the cron jobs
    > which run if the system is "-always on-"


    the howto you give seems very good, can you add it to the wiki?

    just a warning, balance can be *extremely long*. I tried this on a (very
    old) test computer, had to leave 2 hours later it was not finished.
    Stopping the computer killed the install. I never could recover it. Was
    TW and nothing important on this test machine.

    thanks
    jdd

    >
    > After the system has booted as far as it can, you'll need to:
    >
    >
    >
    > - activate the first VT (tty1) (<Ctrl-Alt-F1>);
    > - login as the user "root";
    > - shut the system down to "single-user mode" with: *systemctl rescue*
    > - type in the password of the user "root";
    > - 'cd' to */etc/cron.monthly/* and execute the '*btrfs-scrub*' script
    > in that directory;
    > - 'cd' to */etc/cron.weekly/* and execute the '*btrfs-balance*' and
    > '*btrfs-trim*' scripts in that directory;
    > - wait for each script to execute -- each script will take more than a
    > few minutes to complete;
    > - reboot: *systemctl reboot*
    >
    >
    > Once the system has been repaired and is running normally, check the
    > following (with a "normal" user's CLI):
    > *systemctl
    > list-unit-files | grep -i 'btrfs'*
    >
    > -- if it doesn't indicate that, the systemd service is enabled, enable
    > it (with the user "root" or, by means of 'sudo'):
    > *sudo systemctl
    > enable btrfsmaintenance-refresh.service*
    >
    >



  7. #7
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,576

    Cool Re: No space left on device, uncommon cause?

    Quote Originally Posted by jdd View Post
    the howto you give seems very good, can you add it to the wiki?
    I'll check with the maintainer -- RBrown: SUSE -- openSUSE manager -- responsible person . . .
    It's OK -- I've met and talked to Richard a couple of times at the openSUSE conferences and, he's located only about 20 km from where I live.

  8. #8
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,925
    Blog Entries
    14

    Default Re: No space left on device, uncommon cause?

    Use snapper to remove snapshots
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  9. #9

    Default Re: No space left on device, uncommon cause?

    Thanks both of you for your replies.
    I will try your proposition.
    Just something that bother me, all along you're assuming the excess number of snapshots is causing my root partition to be full, but my system was fine until I try to install the "kernel-devel" this morning. I am not sure to understand the link here, or at least we can exclude the age of my installation as a cause.

  10. #10
    Join Date
    Jun 2015
    Location
    Toulouse
    Posts
    133

    Default Re: No space left on device, uncommon cause?

    Le 16/11/2017 à 20:56, orsos a écrit :

    > I am not sure to understand the link here, or at least we can exclude
    > the age of my installation as a cause.
    >
    >

    list the snapshots, you will know

    jdd

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •