Ran out of room

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
Sasquatch
Posts: 155
Joined: 26. Mar 2014, 00:50

Ran out of room

Post by Sasquatch »

It seems I goofed when I partitioned this laptop during the original install. I now find myself completely out of space to do anything because there's no room left on the / partition for tmp files or other newly installed stuff. I edited fstab to move /tmp to a ramdisk. But that didn't free up much space on the / partition or create much space in /tmp because there's not much available ram in this machine.

Is there anything I can do to fix this without needing a complete reinstall? I have already removed a bunch of things I added as dependencies for manually installed programs. So it's showing significantly more space now than it was at first. But it's still not sufficient.

Code: Select all

$ df
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/sda1       15355900 15042276    313624  98% /
/dev/sda3      227690472 31245804 196444668  14% /home
tmpfs             817304        0    817304   0% /dev/shm
tmpfs             817304   331264    486040  41% /tmp
User avatar
laprjns
Salix Warrior
Posts: 1113
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: Ran out of room

Post by laprjns »

You could resize sda1 and sda3 making sda3 smaller and sda1 larger, but it a little tricky. I suggest you post the output of

Code: Select all

$ sudo fdisk /dev/sda
so we can see the complete map of the disk.
“The past was erased, the erasure was forgotten, the lie became the truth.”
― George Orwell, 1984
DidierSpaier
Posts: 539
Joined: 20. Jun 2016, 20:15

Re: Ran out of room

Post by DidierSpaier »

Next time, do not set a separate /home partition.

As an ugly workaround you could copy some big directory like /usr to /home/usr (be careful to preserve ownership and permissions).

Then make a symink:
sudo rm -r /usr # Be sure that everything has been properly copied to /home first !!!
sudo ln -s /home/usr /usr

PS At second thought maybe it's not a bad suggestion as during startup possibly some files in /usr are needed before partition that hosts /home be mounted. Oh, well...
User avatar
gapan
Salix Wizard
Posts: 6361
Joined: 6. Jun 2009, 17:40

Re: Ran out of room

Post by gapan »

First run:

Code: Select all

sudo spi --clean
That will probably reclaim a lot of space. After that you can take a look in /var, maybe there are huge logs generated in /var/log for some reason. Using the du command will probably reveal where the most data is used.

I find it hard to believe that you have filled up 15GB. In my current system I have something like 11GB and it feels that I have almost everything installed.
But if you still need more space, you can definitely move your /usb partition inside your home. You can add this in your /etc/fstab:

Code: Select all

/home/usr /usr none bind
and then from

Code: Select all

sudo init 1
or from a live system, you can move your /usr to /home/usr

Code: Select all

mv /usr /home/
mkdir /usr
(adjust the paths for your HD in a live system)

Then

Code: Select all

reboot
and it should be ok.
Image
Image
User avatar
gapan
Salix Wizard
Posts: 6361
Joined: 6. Jun 2009, 17:40

Re: Ran out of room

Post by gapan »

DidierSpaier wrote:PS At second thought maybe it's not a bad suggestion as during startup possibly some files in /usr are needed before partition that hosts /home be mounted. Oh, well...
No, nothing /usr is needed for mounting partitions. You can even rename/delete your /usr and your system will boot. X won't launch, but basic command line functionality will be there (everything in /bin and /sbin).
Image
Image
Sasquatch
Posts: 155
Joined: 26. Mar 2014, 00:50

Re: Ran out of room

Post by Sasquatch »

laprjns wrote:You could resize sda1 and sda3 making sda3 smaller and sda1 larger, but it a little tricky. I suggest you post the output of

Code: Select all

$ sudo fdisk /dev/sda
so we can see the complete map of the disk.

Code: Select all

Welcome to fdisk (util-linux 2.21.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacted.
gapan wrote:First run:

Code: Select all

sudo spi --clean
That will probably reclaim a lot of space.
I'll say! I went from 98% usage to 40%!

Code: Select all

[~]$ df
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/sda1       15355900  5988900   9367000  40% /
/dev/sda3      227690472 31245364 196445108  14% /home
tmpfs             817304        0    817304   0% /dev/shm
tmpfs             817304   299320    517984  37% /tmp
gapan wrote:After that you can take a look in /var, maybe there are huge logs generated in /var/log for some reason. Using the du command will probably reveal where the most data is used.
/var doesn't seem to be the problem.

Code: Select all

90M	/var
gapan wrote:I find it hard to believe that you have filled up 15GB. In my current system I have something like 11GB and it feels that I have almost everything installed.
I find it hard to believe as well. I haven't installed that much. And what I have installed has mostly gone to my /home directory. But the df output tells the story.
gapan wrote:But if you still need more space, you can definitely move your /usb partition inside your home. You can add this in your /etc/fstab:

Code: Select all

/home/usr /usr none bind
and then from

Code: Select all

sudo init 1
or from a live system, you can move your /usr to /home/usr

Code: Select all

mv /usr /home/
mkdir /usr
(adjust the paths for your HD in a live system)

Then

Code: Select all

reboot
and it should be ok.
How does that affect the PATH when launchers or other programs try to find programs that should be in /usr? I might try it. But after the way spi cleaned things up I don't really need that much space.
User avatar
gapan
Salix Wizard
Posts: 6361
Joined: 6. Jun 2009, 17:40

Re: Ran out of room

Post by gapan »

Sasquatch wrote:How does that affect the PATH when launchers or other programs try to find programs that should be in /usr?
It doesn't. /usr will still be /usr. No need to do it if you don't have to though.
Image
Image
Sasquatch
Posts: 155
Joined: 26. Mar 2014, 00:50

Re: Ran out of room

Post by Sasquatch »

gapan wrote:
Sasquatch wrote:How does that affect the PATH when launchers or other programs try to find programs that should be in /usr?
It doesn't. /usr will still be /usr. No need to do it if you don't have to though.
Then I won't. The spi command gave me plenty of room for what I need. I guess I'll just have to make a habit of running that every so often. Thank you very much.
Post Reply