LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 05-03-2020, 09:17 PM   #1
Gnusboy
LQ Newbie
 
Registered: Jul 2009
Posts: 26

Rep: Reputation: 0
Ubuntu Swap file 100% full


Hi y'all

I'm in a pickle. I am a long time Ubuntu user, but don't have a lot of time under the hood.

Can I increase the size of the 1.1 GB swap partition? If not, when it fails does it make the system completely unusable?
Also, can I use a live CD to stabilize the system before it dies completely?

Any help will be appreciated. Thank you.

I attached a df -hT output below.

I have two partitions on a 650GB HDD (divided roughly 50-50)
Partition 1 = Ubuntu 14.04
Partition 2 = Ubuntu 16.04
External HDD 1 TB 2 partitions; 462 GB and 537 GB
When I installed the 650 GB drive,
I kept Ubuntu 14.04 to save a lot of my data.
In the other drive I installed Ubuntu 16.04

Background:
The two partitions worked well until a few months ago. There seemed to be plenty of space available, except the 1.1 GB Swap file was getting full.
Long story short, I planned to copy everything to the external drive and nuke the entire drive. Then I was going to install Ubuntu 18.04.

About 6 months went by without doing the project.
I was also adding many new and important files to both partitions.
I used the partitions interchangeably. I had important files stuck in numerous folders scattered through both partitions and had transferred many to the external drive as a backup.
My naming scheme made it impossible for me to be certain if the duplicate folders contained all the files I wanted to save. To be certain, I had to check each folder and cross reference them to the external HDD. It took enormous time.

So, through the months, the 14.04 partition was getting more unstable. The 16.04 partition is also going bad.
I did not realize the swap partition had become full, causing more problems as it progressed.

=============================

ubuntu@ubuntu:~$ df -hT

ubuntu@ubuntu:~$ df -hT
Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 1.8G 0 1.8G 0% /dev
tmpfs tmpfs 370M 6.2M 364M 2% /run
/dev/sr0 iso9660 1.5G 1.5G 0 100% /cdrom
/dev/loop0 squashfs 1.4G 1.4G 0 100% /rofs
/cow overlay 1.9G 1.7G 180M 91% /
tmpfs tmpfs 1.9G 768K 1.9G 1% /dev/shm
tmpfs tmpfs 5.0M 8.0K 5.0M 1% /run/lock
tmpfs tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
tmpfs tmpfs 1.9G 528K 1.9G 1% /tmp
tmpfs tmpfs 370M 100K 370M 1% /run/user/999
/dev/sdb1 ext3 976M 60K 976M 1% /media/ubuntu/897fbe47-71a3-4afa-9722-109fc80bc2a4
/dev/sdb3 ext3 431G 77G 354G 18% /media/ubuntu/205504c6-6bf7-4fc0-a732-4ea634c2d00a
/dev/sdb2 ext3 500G 81G 420G 17% /media/ubuntu/d60ed036-350a-4524-833e-c91e7dd76fc3
/dev/sda9 ext4 73G 63G 6.0G 92% /media/ubuntu/abea86ce-98c8-4ae3-bb03-de28109696d1
/dev/sda8 ext4 104G 99G 8.0K 100% /media/ubuntu/a2aad275-090f-490e-a903-e4b68f52eb19
 
Old 05-03-2020, 09:36 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,103

Rep: Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117
What you tell doesn't agree with what you showed us. Run these - from the liveCD is fine; and use [code] tags when posting output to make it readable.
Code:
lsblk -f
sudo parted /dev/sda "print free"
sudo parted /dev/sdb "print free"
swapon -s
Swap can be added at any time - if you really badly run out, things just start getting killed. No big deal, just reboot.

Edit: that swapon needs to be run on a system that is having the "swap full" problem. Filesystems filling up shouldn't cause a swap issue.

Last edited by syg00; 05-04-2020 at 02:38 AM. Reason: edit
 
Old 05-17-2020, 04:25 AM   #3
Crippled
Member
 
Registered: Sep 2015
Distribution: MX Linux 21.3 Xfce
Posts: 595

Rep: Reputation: Disabled
[QUOTE=Gnusboy;6118925]Hi y'all

"I'm in a pickle. I am a long time Ubuntu user, but don't have a lot of time under the hood.

Can I increase the size of the 1.1 GB swap partition?"
Yes, but in order to recommend the swap partition size you need to post what hardware you have especially how much RAM you have.
Copy&paste this in the terminal and post your results. inxi -Fxxxzdr
 
Old 05-17-2020, 08:17 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,692

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
How do you know it is really related to swap?
What you posted contains no any information about the usage of swap.

For me it looks like your root filesystem is full, you need to clean /var/log or some other directory.
 
1 members found this post helpful.
Old 05-24-2020, 08:18 AM   #5
djk44883
Member
 
Registered: Aug 2008
Location: Ohio
Distribution: debian
Posts: 141

Rep: Reputation: 29
an OCD note, because sometimes words matter.
You interchange "swap partition" and "swap file" which are two distinct things and would be handled differently. Whereas swap space is somewhat generic.
 
1 members found this post helpful.
Old 05-24-2020, 09:13 AM   #6
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,131

Rep: Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302
Quote:
Originally Posted by Gnusboy View Post
I kept Ubuntu 14.04 to save a lot of my data.
I used the partitions interchangeably. I had important files stuck in numerous folders scattered through both partitions and had transferred many to the external drive as a backup.
That's why we recommend a separate /home partition — then you get to keep it if you reinstall the OS and all your data is safely in one place.
 
Old 05-25-2020, 03:10 PM   #7
Gnusboy
LQ Newbie
 
Registered: Jul 2009
Posts: 26

Original Poster
Rep: Reputation: 0
OK. I thank y'all you your your help

Here's what I'm running:

AMD Phenom 9850

ubuntu@ubuntu:~$
ubuntu@ubuntu:~$
ubuntu@ubuntu:~$ lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 ext4 d936da7d-f118-4a64-87cb-ea8377a17d59
├─sda2
├─sda5 swap 25ae5248-b524-46b4-a739-efda2adec424 [SWAP]
├─sda6 ext4 77aacfae-f704-422a-82f5-047bb0dcb95f
├─sda7 ext4 0d34764d-6078-49be-846b-3bdf8e675936
├─sda8 ext4 a2aad275-090f-490e-a903-e4b68f52eb19 /media/ubu
└─sda9 ext4 abea86ce-98c8-4ae3-bb03-de28109696d1 /media/ubu
sdb
├─sdb1 ext3 897fbe47-71a3-4afa-9722-109fc80bc2a4 /media/ubu
├─sdb2 ext3 d60ed036-350a-4524-833e-c91e7dd76fc3 /media/ubu
└─sdb3 ext3 205504c6-6bf7-4fc0-a732-4ea634c2d00a /media/ubu
sr0 iso9660 Ubuntu 16.04.1 LTS amd64
2016-07-19-21-27-51-00 /cdrom
loop0 squashf /rofs
ubuntu@ubuntu:~$ sudo parted /dev/sda "print free"
Model: ATA WDC WD6400AAKS-0 (scsi)
Disk /dev/sda: 640GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 32.3kB 93.4GB 93.4GB primary ext4 boot
93.4GB 93.4GB 808kB Free Space
2 93.4GB 640GB 547GB extended
9 93.4GB 172GB 78.7GB logical ext4
7 172GB 328GB 156GB logical ext2
6 328GB 522GB 194GB logical ext4
8 522GB 635GB 113GB logical ext4
635GB 635GB 910kB Free Space
5 635GB 640GB 5388MB logical linux-swap(v1)
640GB 640GB 2613kB Free Space

ubuntu@ubuntu:~$ sudo parted /dev/sdb "print free"
Model: TOSHIBA External USB 3.0 (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
32.3kB 1049kB 1016kB Free Space
1 1049kB 1075MB 1074MB primary ext3
2 1075MB 538GB 537GB primary ext3
3 538GB 1000GB 462GB primary ext3

ubuntu@ubuntu:~$ swapon -s
Filename Type Size Used Priority
/dev/sda5 partition 5261252 2220740 -1
ubuntu@ubuntu:~$
-----------------------------------------------------------------------------------------------
Crippled
Here's what you asked for


ubuntu@ubuntu:~$ inxi -Fxxxzdr
The program 'inxi' is currently not installed. You can install it by typing:
sudo apt install inxi
You will have to enable the component called 'universe'
ubuntu@ubuntu:~$
 
Old 05-25-2020, 03:28 PM   #8
Crippled
Member
 
Registered: Sep 2015
Distribution: MX Linux 21.3 Xfce
Posts: 595

Rep: Reputation: Disabled
Quote:
Originally Posted by Gnusboy View Post
OK. I thank y'all you your your help

Here's what I'm running:

AMD Phenom 9850

----------------------------------------------------------------------------------
Crippled
Here's what you asked for


ubuntu@ubuntu:~$ inxi -Fxxxzdr
The program 'inxi' is currently not installed. You can install it by typing:
sudo apt install inxi
You will have to enable the component called 'universe'
ubuntu@ubuntu:~$
Ten partitions? What a mess. Looks like you have a botched installation. The only thing I could recommend is to do a complete reformat of your drive wiping out all your partitions and re-install Ubuntu. You will loose all your data but you will fix that mess. Make sure you have at least 2GB swap partition but you may need it larger because you never posted the amount of RAM your device has.
 
Old 05-25-2020, 03:57 PM   #9
Gnusboy
LQ Newbie
 
Registered: Jul 2009
Posts: 26

Original Poster
Rep: Reputation: 0
Ubuntu Desktop

I forgot a couple of things:

4GB DDR2 RAM
AMD Phenom 9850 Quad core Western Digital
650 GB internal HDD
1 TB External HDD


I'm using a desktop system I built about 10 years ago.

The 650 GB HDD, If I remember correctly, was originally partitioned into about 2 sections 60% for to Ubuntu 16.04 and about 40% to Ubuntu 14.00 and 1.1 GB partition I thought was the Swap section

Through the years, the drive has gotten chopped up into about 4 or 5 various partitions. I don't know how it happened, but that's what I can remember at the moment.
Almost forgot I have a 1 TB external HDD. which I guess is 3 partitions

But ... I just tried to check it with GParted - it will not load. Maybe it's because I have an out-of-date version of Firefox.
Is there is a way to open GParted from the terminal?

Last edited by Gnusboy; 05-25-2020 at 04:07 PM. Reason: Added more information
 
Old 05-25-2020, 04:10 PM   #10
Crippled
Member
 
Registered: Sep 2015
Distribution: MX Linux 21.3 Xfce
Posts: 595

Rep: Reputation: Disabled
Firefox has nothing to do with it. If you have a USB thumb-drive you can boot up with a live USB and run Gparted that way. If you can't do that with a live USB of Ubuntu, you can download a MX Linux ISO and put it on an USB and run Gparted from it without installing MX Linux. https://mxlinux.org/products/
 
Old 05-25-2020, 08:03 PM   #11
Gnusboy
LQ Newbie
 
Registered: Jul 2009
Posts: 26

Original Poster
Rep: Reputation: 0
Gparted live CD 16.04

I'm running off the Live CD now. But I haven't rebooted for a while. I fear losing my project.
I know it's not supposed to work that way ...

? If I boot off the 16.04 live cd from the terminal how would I get to Gparted? I've never seen an App menu from the terminal
 
Old 05-25-2020, 09:21 PM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
Code:
5 635GB 640GB 5388MB logical linux-swap(v1)
Your /dev/sda5 is a swap partition which is about 5 GB. Where did the 1.1 GB originate from? Version 18 switched from a swap partition to a swap file. 14 and 16 might be sharing the same swap partition but without seeing each /etc/fstab file we can not tell what operating system is associated with what partition(s) or if you are using a swap file. It depends on how you use your computer and what applications you run whether or not your running out of memory. If you have a dozen of tabs open on a old version of firefox that would use up a lot of memory.

Code:
dev/sda9 ext4 73G 63G 6.0G 92% /media/ubuntu/abea86ce-98c8-4ae3-bb03-de28109696d1
/dev/sda8 ext4 104G 99G 8.0K 100% /media/ubuntu/a2aad275-090f-490e-a903-e4b68f52eb19
sda8 being 100% full could pose some problems depending on what it is used for i.e / or /home/ etc. sda9 is 92% which is almost full.

gparted is a graphical front end for parted. You have posted the same information.

Another thing that is interesting is that lsblk reports your sda7 as ext2 but parted reports it as ext4.

Last edited by michaelk; 05-25-2020 at 09:26 PM.
 
Old 05-25-2020, 09:42 PM   #13
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,939

Rep: Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619
"16.04 live cd from the terminal how would I get to Gparted"

If you have enough ram left you can install it by

$ sudo apt-get install gparted

To run.

$ gparted /path-to-your-device1 /path-to-your-device2 (I assume sudo or it will ask) live user may be root.

I'm sure there are command line and maybe one gui based partition program installed by default.

There are dedicated live gparted too. Knoppix has had gparted forever.

Last edited by jefro; 05-25-2020 at 09:44 PM.
 
Old 05-26-2020, 02:17 AM   #14
Gnusboy
LQ Newbie
 
Registered: Jul 2009
Posts: 26

Original Poster
Rep: Reputation: 0
Great. Thanks




Quote:
Originally Posted by jefro View Post
"16.04 live cd from the terminal how would I get to Gparted"

If you have enough ram left you can install it by

$ sudo apt-get install gparted

To run.

$ gparted /path-to-your-device1 /path-to-your-device2 (I assume sudo or it will ask) live user may be root.

I'm sure there are command line and maybe one gui based partition program installed by default.

There are dedicated live gparted too. Knoppix has had gparted forever.
 
Old 05-26-2020, 02:31 AM   #15
Gnusboy
LQ Newbie
 
Registered: Jul 2009
Posts: 26

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by michaelk View Post
Code:
5 635GB 640GB 5388MB logical linux-swap(v1)
Your /dev/sda5 is a swap partition which is about 5 GB. Where did the 1.1 GB originate from? Version 18 switched from a swap partition to a swap file. 14 and 16 might be sharing the same swap partition but without seeing each /etc/fstab file we can not tell what operating system is associated with what partition(s) or if you are using a swap file. It depends on how you use your computer and what applications you run whether or not your running out of memory. If you have a dozen of tabs open on a old version of firefox that would use up a lot of memory. I'm being very careful how many tabs are open.But the system continually slows to a stop, which locks everything. It does come back to operation "in a while." It will gray-out the screen - for a few seconds or several minutes. It also makes typing very slow - I type letters and there is a lag between what I type and the time it takes to appear on screen. I don't know what causes any of that.

Code:
dev/sda9 ext4 73G 63G 6.0G 92% /media/ubuntu/abea86ce-98c8-4ae3-bb03-de28109696d1
/dev/sda8 ext4 104G 99G 8.0K 100% /media/ubuntu/a2aad275-090f-490e-a903-e4b68f52eb19
sda8 being 100% full could pose some problems depending on what it is used for i.e / or /home/ etc. sda9 is 92% which is almost full.

gparted is a graphical front end for parted. You have posted the same information.

Another thing that is interesting is that lsblk reports your sda7 as ext2 but parted reports it as ext4.
The 1.1 partition I think was created when I partitioned the HDD, but not sure. The last time I ran Gparted the sda 7 was not reporting anything. But I'm pretty sure it's not an EXT 2.
 
  


Reply

Tags
hdd, swapfile


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Is possible? link-up between 100 Halt and 100 Full? poplinux Linux - Networking 3 10-07-2014 07:32 PM
Root file system / 100 % full moata_u Solaris / OpenSolaris 15 06-15-2011 10:12 AM
[SOLVED] System File is Full (100%) How can I relieve the situation? mike-member Linux - Newbie 8 03-14-2011 02:32 AM
deleting 100 rows in text file (1-100) via terminal itz2000 Linux - Newbie 5 01-17-2006 11:19 PM
/home file system 100% full gromo Linux - Enterprise 5 11-04-2004 09:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 12:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration