Announcement
Collapse
No announcement yet.
root partition full
Collapse
This topic is closed.
X
X
-
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.
- Top
- Bottom
-
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.
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.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?
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:
Then enter "sudo swapoff -a"Code:UUID=00072d64-416d-4566-8c59-0a3b469c6524 none swap sw 0 0
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.
- Top
- Bottom
- Likes 1
Leave a comment:
-
Dear JeffRedd,
Thanks for your message! I'm glad that this thread was useful to you.
Have a great day in California!
- Top
- Bottom
- Likes 1
Leave a comment:
-
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.Originally posted by Robert24 View PostFor the root partition which seems to be full. I googled a bit and learned about the ncdu and the du commands.
Sorry but I’m not able to help you with your problem because I don’t have an answer (lack the experience).
- Top
- Bottom
- Likes 1
Leave a comment:
-
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
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.Code:sudo snap remove firefox
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:
What should I do next?Code:blabla:~/Desktop$ swapon --show NAME TYPE SIZE USED PRIO /dev/sda7 partition 4G 9.8M -2
Then you gave me more details about this procedure to move the content of /var to /backup:
but there are still points which are unclear to me:- Boot to a Live USB (or another install if you have one)
- Mount the root and /backup partitions
- Move ALL the contents of /var on the root partition to the /backup partition.
- Edit /etc/fstab on the root partition and change the mount point of /backup to /var
- Reboot
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:
I don't really see the "mount point of /backup".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
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.
- Top
- Bottom
Leave a comment:
-
"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.Originally posted by claydoh View PostCan you use those snapshots to restore to a new drive, or are they tied to the original data?
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.
- Top
- Bottom
Leave a comment:
-
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.
- Top
- Bottom
Leave a comment:
-
IMO BTRFS send|receive IS a backup tool. I send weekly backups of @ and @home from my desktop to my server via RSH. And you can send a subvolume to a file for more mobility if desired.
BTRFS alone isn't a backup management tool, I'll give you that. But seemless, on-line, single command, browseable, backups are a joy. I'm sure one of the various BTRFS tools does backup management, I just don't need it.
- Top
- Bottom
Leave a comment:
-
Naw, BTRFS definitely isn't a backup tool per se, it is more a recovery tool, as part of one's backup and recovery strategy. I see them as part of the same banana.
Restoring after a fubar saves time in reinstalling and recovering etc.
I can easily browse my snapshots in Dolphin (via Timeshift, I am lazy) to find specific files quite quickly. So in a sense these are some of my 'local' backups.
I still have a few somewhat overlapping backup plans sent to my NAS, and/or USB drives. My 'on-site' backups. I can access these a little less quickly, either from Dolphin accessing my synced stuff directly on the NAS, or via Kup Backup's file browser for the incremental ones on the same server. Before the NAS, these were stored on an external USB drive.
Then I do some online storage for some things, from those external backups.
- Top
- Bottom
Leave a comment:
-
jglen490, you and I have sparred over this issue enough I was pretty confident you could take the jab in the nature it was intended...
...until we cross swords again! Huzzah! LOL
- Top
- Bottom
Leave a comment:
-
Many thanks
Over the many years that I've used Kubuntu and been a member here, it's just like family. Sometimes there seems to be a need to punch a brother in the nose, but it's better to just let it be, 'cause it's all good and all the brothers and sisters are great
- Top
- Bottom
Leave a comment:
-
jglen:Over the (many) years here, there's been very few -- if any -- things that you & I have disagreed on! Including file systems and hand crank drills.I kind of like handcrank drills
👍
- Top
- Bottom
Leave a comment:
Users Viewing This Topic
Collapse
There are 0 users viewing this topic.
Leave a comment: