Announcement

Collapse
No announcement yet.

root partition full

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #46
    Can you use those snapshots to restore to a new drive, or are they tied to the original data?

    I use Timeshift because it is set-and-forget, until I need it. Which has been rare. It doesn't support sending snapshots elsewhere, for simplicity I think. I don't *need* that sort of feature myself, and I have deliberately chosen to stick to GUI tools for this, except for that one time I did recover, and used timeshift on the command line.

    My NAS drives are using BTRFS, and Openmediavault does take snapshots, but doesn't have any interface to restore or do much else with them. I did this as a lark, just to see if there is any noticeable performance difference on spinny HDDS between this and a raid array using ext4. I can tell. Only time will tell if snaphots and more disk space vs parity and less drive space wins on these ollllddddd drives.

    Comment


      #47
      Originally posted by claydoh View Post
      Can you use those snapshots to restore to a new drive, or are they tied to the original data?
      "Sent" snapshots are independent full copies of the source subvolume, so no they are not tied to the original data and yes they can be restored to the original (or any other) drive.

      The process is to take a read-only snapshot and then "send" it to another BTRFS file system. Once received, it can be mounted, browsed, edited (if you change it to RW), booted, whatever.
      If you do this regularly like I do, the previous snapshot can be used like a filter to reduce the time and amount of data to send the backup. It's called an "incremental" backup. Once you do the original "send" the incremental sends are 90-95% less time consuming depending on the amount of data changes.

      When I built my latest system, I copied (using send|receive) all my subvolumes from an older 250GB sata SSD to the new NVMEv4 drive, changed the UUID of the receiving file system, set the subvolumes as RW, and booted.

      Please Read Me

      Comment


        #48
        Hello everyone,

        I apologize in advance for the long message.

        I had managed to reclaim space using several solutions you suggested (cleaning APT cache, shrinking log files to 50M, purging all residual configs for uninstalled package), and I thought I was good to go but apparently not, since the warning about the space left in my root partition came back again. I tried to free some space by erasing some docker image. I expected to reclaim at least 1GB of space since the images were bigger than that, but the warning repeats and now I even less memory (29 MiB if I believe the warning). So I guess that my docker images were not saved in the root partition.

        Here is the output of "sudo du -hd1 -x /":
        (note that I seem to have freed 1G of memory in the /var directory if I compare this output to the output in my message of the 08.07.2023):
        Code:
        blabla:~/Desktop$ sudo du -hd1 -x /
        [sudo] password for me:  
        13M     /root
        8.0K    /media
        64K     /snap
        4.0K    /cdrom
        4.0K    /mnt
        256M    /boot
        16K     /lost+found
        du: cannot access '/tmp/.mount_jetbraYuOHFe': Permission denied
        196K    /tmp
        11G     /usr
        4.0K    /srv
        13M     /etc
        11G     /var
        679M    /opt
        23G     /

        At that point, I thought it might be time to completely reformat my disk, and make bigger partitions, but first, I wanted to use deja-dub backup (I try to update my backup every week but the last one is actually 29 days old). It turns out that I have so little memory left that the back-up fails:
        "Giving up after 5 attempts. Error: Error splicing file: No space left on device"

        Nevertheless, I was able do a "classic" back-up by copy pasting the files towards an external hard drive. Now I'm trying to set-up Kubuntu 22.04 on an old machine, one which I will copy my data (as an extra safety measure) and that I will use to browse internet in case the installation of Kubuntu 22.04 on my current (main) machine doesn't go well. This will also serve me as a warm-up to set-up these partitions in a better way than I did last time. Regarding this, I'm wondering if you have some recommendations about the way to partition my disk. It seems that different people had different ideas, but I don't have the knowledge to assess which one is the best for me. I would like something simple. I do not play video games on my computer (a humble but solid Lenovo T460p), but I want to be able to use containers to run some local experiments like playing with minikube or have some toy database to experiment with. Ideally, I would like to be able to update my system at every new Long Time Release of Ubuntu without having to re-install my system from scratch. I kept Windows since I bought my computer in case I would need to use it for some Windows software, but almost never use it. To avoid wasting space, I save movies on the Windows partition. Here is the current state of my disk (output from "lsblk -f"):
        NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
        loop0
        squash 4.0 0 100% /snap/bare/5
        loop1
        squash 4.0 0 100% /snap/core/15419
        loop2
        squash 4.0 0 100% /snap/core/15511
        loop3
        squash 4.0 0 100% /snap/core18/2751
        loop4
        squash 4.0 0 100% /snap/core18/2785
        loop5
        squash 4.0 0 100% /snap/core20/1950
        loop6
        squash 4.0 0 100% /snap/core20/1974
        loop7
        squash 4.0 0 100% /snap/core22/806
        loop8
        squash 4.0 0 100% /snap/core22/817
        loop9
        squash 4.0 0 100% /snap/firefox/2850
        loop10
        squash 4.0 0 100% /snap/firefox/2908
        loop11
        squash 4.0 0 100% /snap/gnome-3-28-1804/194
        loop12
        squash 4.0 0 100% /snap/gnome-3-28-1804/198
        loop13
        squash 4.0 0 100% /snap/gnome-3-38-2004/140
        loop14
        squash 4.0 0 100% /snap/gnome-3-38-2004/143
        loop15
        squash 4.0 0 100% /snap/gnome-42-2204/111
        loop16
        squash 4.0 0 100% /snap/gnome-42-2204/120
        loop17
        squash 4.0 0 100% /snap/gtk-common-themes/1534
        loop18
        squash 4.0 0 100% /snap/gtk-common-themes/1535
        loop19
        squash 4.0 0 100% /snap/remarkable-desktop/2
        loop20
        squash 4.0 0 100% /snap/skype/287
        loop21
        squash 4.0 0 100% /snap/skype/289
        loop22
        squash 4.0 0 100% /snap/wine-platform-6-stable/19
        loop23
        squash 4.0 0 100% /snap/wine-platform-runtime/348
        loop24
        squash 4.0 0 100% /snap/wine-platform-runtime/349
        sda
        ├─sda1
        │ vfat FAT32 SYSTEM
        │ D83C-5AC4 221M 14% /boot/efi
        ├─sda2

        ├─sda3
        │ ntfs Windows
        │ 96943F91943F733B
        ├─sda4
        │ ntfs WinRE_DRV
        │ 5C2C3FDF2C3FB33E
        ├─sda5
        │ ext4 1.0 8e00456f-4fe4-4faf-b820-75e735c5f8db 28.1M 95% /var/snap/firefox/common/host-hunspell
        │ /
        ├─sda6
        │ ext4 1.0 c49de744-7baa-4273-980b-0ffcf1bd9808 78.7G 45% /home
        ├─sda7
        │ swap 1 00072d64-416d-4566-8c59-0a3b469c6524 [SWAP]
        └─sda8
        ext4 1.0 backup
        302f611e-26af-483d-aa59-81f160509a14

        I didn't forget other recommendations that you made in order to reclaim some space, but there were still some aspects which I didn't understand:
        Schwarzer Kater First, thanks for your help. But I'm a bit confused by the explanation given in https://www.kubuntuforums.net/forum/...partition-full . Am I correct that when there are two sub-bullet points, these are different options? Anyway, since I have Google Chrome that I can use as a temporary replacement, I still ran
        Code:
        sudo snap remove firefox
        ​thinking that it would free some space but after that, I got a new warning notification telling me that now I have 0M free (so it looks like somehow I used the little space I had left). I guess that something was cached, but I have no idea. I also apologize for not replying to your offer to modify your personal script. I wanted to try out first the Debian step-by-step instructions and then I forgot. I guess that I'll use it after having re-installed Kubuntu on my machine. For now it's not a priority.

        oshunluvr First, thanks for your help. Then, you mention this swap file. From what I understand from reading about it online, this is some memory on my hard drive which is used when the RAM is full. From what you write, this memory is taken from the root partition and you suggest moving it to the home partition. That sounds like a good idea but I don't really know how to do it. Is it as simple as moving a file from one place to another? Also, I'm not sure where to find it. I don't have any "/swapfile" subdirectory in my root directory. I asked ChatGPT about it and it told me that I can find relevant information using "swapon --show". Here is the output which seems to indicate that I have a specific partition for this:
        Code:
        blabla:~/Desktop$ swapon --show
        NAME      TYPE      SIZE USED PRIO
        /dev/sda7 partition   4G 9.8M   -2
        What should I do next?

        Then you gave me more details about this procedure to move the content of /var to /backup:
        1. Boot to a Live USB (or another install if you have one)
        2. Mount the root and /backup partitions
        3. Move ALL the contents of /var on the root partition to the /backup partition.
        4. Edit /etc/fstab on the root partition and change the mount point of /backup to /var
        5. Reboot
        but there are still points which are unclear to me:
        About "Boot to a Live USB", I guess this means boot from a USB key on which I "burned" the iso file of Kubuntu 22.04 and select the option "Try out Kubuntu" (or similar phrasing), right? May I ask why I can't do the following steps from my current Kubuntu session?
        About the mounting of the root and /backup partitions, I guess I can use the GUI, right?
        The about this editing of the /etc/fstab, I'm not sure which part I should change. Currently, my file look like this:
        Code:
        # /etc/fstab: static file system information.
        #
        # Use 'blkid' to print the universally unique identifier for a
        # device; this may be used with UUID= as a more robust way to name devices
        # that works even if disks are added and removed. See fstab(5).
        #
        # <file system> <mount point>   <type>  <options>       <dump>  <pass>
        # / was on /dev/sda5 during installation
        UUID=8e00456f-4fe4-4faf-b820-75e735c5f8db /               ext4    errors=remount-ro 0  
            1
        # /boot/efi was on /dev/sda1 during installation
        UUID=D83C-5AC4  /boot/efi       vfat    umask=0077      0       1
        # /home was on /dev/sda6 during installation
        UUID=c49de744-7baa-4273-980b-0ffcf1bd9808 /home           ext4    defaults        0    
          2
        # swap was on /dev/sda7 during installation
        UUID=00072d64-416d-4566-8c59-0a3b469c6524 none            swap    sw              0    
          0
        I don't really see the "mount point of /backup".


        You also suggest using BTRFS instead of EXT4. As you've realized by now, I'm really not an expert, so it's hard for me to really understand the pros and contra (the different messages in this thread regarding this went way above my head), but since I'm about to re-install Kubuntu, it might be the right time to do it. But I would need detailed instructions.


        Anyway, I can't thank you enough for your precious support. I realize that it must be a bit tedious to help me given that I barely understand basic concepts of linux, but be assured that your help is appreciated. I would understand if you don't have more time for this topic, in which case, I'll just wipe out my current Kubuntu partitions and copy the data which is now on my hard drive using a good old Copy and Paste.

        Thanks again.


        Comment


          #49
          Originally posted by Robert24 View Post
          For the root partition which seems to be full. I googled a bit and learned about the ncdu and the du commands.
          Thanks Robert, I wasn’t aware of either ncdu and the du commands. I just installed ncdu now and it is tiny, powerful and useful. Many thanks.

          Sorry but I’m not able to help you with your problem because I don’t have an answer (lack the experience).

          Comment


            #50
            Dear JeffRedd,
            Thanks for your message! I'm glad that this thread was useful to you.

            Have a great day in California!

            Comment


              #51
              OK, one step at a time I suppose. First, you need to decide what you're going to do. Do you want to try and fix your current situation or are you going to re-install?

              No point in going forward with other advice if you're just going to wipe it and re-install - which BTW is not a bad idea. It's generally faster than any fixes you'll have to do. It depends on how much time you have invested in your current install and how much work you'll lose by re-installing. If you're going to re-install, delete the swap partition, make the install partition 40GB, the rest /home and forget about the backup partition. If you choose to try BTRFS instead of EXT4, you need only a single partition for root and home. The installer will automatically separate root and home in it's own way which you can learn about later. The installer will (or should) also make a swap file if you don't have a swap partition. Swap files are much more flexible than a partition.

              About "Boot to a Live USB", I guess this means boot from a USB key on which I "burned" the iso file of Kubuntu 22.04 and select the option "Try out Kubuntu" (or similar phrasing), right? May I ask why I can't do the following steps from my current Kubuntu session?
              You can't move or resize partitions or move open files from a running session. Any open file system is locked to prevent you from killing your entire install. This advice is necessary if you are going to move /var to the backup partition.

              SWAP: You obviously have a swap partition. You don't need that anymore unless you're booting more than one Linux OS (you're not).
              To remove SWAP, edit fstab and remove this line:
              Code:
              UUID=00072d64-416d-4566-8c59-0a3b469c6524 none swap sw 0 0​
              Then enter "sudo swapoff -a"
              You can now delete sda7 and have 4G free space available on your drive.

              In conclusion, the problem you have is not a shortage of drive space. Rather it's that it's poorly partitioned. 24GB is plenty for root if you don't use snaps and a lot of other stuff, but why restrict yourself artificially?

              You either need to reallocate your drive space somehow or reinstall. You have to decide which way you want to proceed.

              Please Read Me

              Comment


                #52
                Dear Oshunluvr,
                Thanks a lot for your message. At this stage, I think that the best for me is to re-install my system. I rebooted my computer (hopping that some cached files would disappear) but now I can't even login anymore. When I enter my password to login after having rebooted, I get the following error message:

                Xsession: Warning: Unable to write to /tmp: X session may exit with an error

                I'm now writing from my old laptop. All I want now is to re-install kubuntu 22.04 and fix this partition problem. I already have the USB live key.

                Comment


                • GreyGeek
                  GreyGeek commented
                  Editing a comment
                  Since you are reinstalling, now would be a good time to switch to BTRFS and bypass that fixed partition nonsense.

                #53
                Originally posted by Robert24 View Post
                […]
                I didn't forget other recommendations that you made in order to reclaim some space, but there were still some aspects which I didn't understand:
                Schwarzer Kater First, thanks for your help. But I'm a bit confused by the explanation given in https://www.kubuntuforums.net/forum/...partition-full . Am I correct that when there are two sub-bullet points, these are different options? Anyway, since I have Google Chrome that I can use as a temporary replacement, I still ran
                Code:
                sudo snap remove firefox
                ​thinking that it would free some space but after that, I got a new warning notification telling me that now I have 0M free (so it looks like somehow I used the little space I had left). I guess that something was cached, but I have no idea.
                […]
                Sorry, but I can't find what you are referring to by "… that when there are two sub-bullet points, these are different options?" - the link does not lead to a specific post…

                As to sudo snap remove firefox:
                Simply removing a Snap does indeed create a cache, I missed that!
                You would have to sudo snap purge a Snap to avoid this behavior, but you would also loose settings etc. with purge - good if you don't need them anyway in the future, bad if you do…
                Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                Comment


                  #54
                  GreyGeek Thank you for your suggestion! I will follow your advice and try my best.

                  Comment


                    #55
                    Schwarzer Kater Thank you for your reply. I was referring to the instructions to install firefox that you had shared with me, but anyway, I made up my mind, and I will just re-install my system.

                    Comment


                      #56
                      Originally posted by Robert24 View Post
                      […]
                      I'm now writing from my old laptop. All I want now is to re-install kubuntu 22.04 and fix this partition problem. I already have the USB live key.
                      Do you need any further information or help to do so?
                      Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                      Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                      get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                      install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                      Comment


                        #57
                        Thanks a lot for your reply Schwarzer Kater. Yes, I'm a bit stuck here with an issue. I'm in the middle of tge installation process, at the "Disk setup" step after having chosen "Manual", and I'm not sure what I should keep, what I should throw away, and what I should change. I guess I can delete the partition for the swap and the one for the backup. How do I create one which has this BTRFS format and "bypass that fixed partition nonsense"?

                        Comment


                          #58
                          Should I do the following:
                          1) delete the home partion
                          2) change the root partition and select "use as" = "btrfs journaling file system" and thick the box "Format the partition" and select "Mount point" = "/"?
                          I don't see the option to put the free space into this new root partition.

                          Comment


                            #59
                            Ok, I'm going to bed, it's past midnight here in Switzerland. Have a great day!

                            Comment


                              #60
                              Originally posted by Robert24 View Post
                              […] How do I create one which has this BTRFS format and "bypass that fixed partition nonsense"?
                              This is an easy thing to to say for some of the more computer-savvy users here, but I would not advise you to do that in *Ubuntu unless you e.g. are an advanced user and like to do some things in the terminal.

                              But if you want to use btrfs in the future, there is a whole sub-forum for this here: https://www.kubuntuforums.net/forum/...llaneous/btrfs
                              Last edited by Schwarzer Kater; Aug 03, 2023, 04:57 PM.
                              Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                              Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                              get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                              install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                              Comment

                              Working...
                              X