You are not logged in.

#1 2013-01-19 19:27:45

arobson73
Member
From: uk
Registered: 2013-01-19
Posts: 34

freeing up space from root

currently im low in space in my root drive, but i have loads of space in /home and /home1.

if i edit the pacman.conf and make it so that

#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log

is changed from  to  this

RootDir     = /home1
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log

what else would i need to do to move the current libs in /var/lib and /var/cache to get them to my /home1 location.

thanks

Offline

#2 2013-01-19 19:48:34

kaszak696
Member
Registered: 2009-05-26
Posts: 543

Re: freeing up space from root

RootDir = path/to/root
           Set the default root directory for pacman to install to. This option is used if you want to install a package on a temporary mounted partition which is "owned" by another system, or for a chroot install.

This means that pacman will start installing programs in /home1, you sure you want this? Simply symlinking these directories might be sufficient.

Last edited by kaszak696 (2013-01-19 19:49:52)


'What can be asserted without evidence can also be dismissed without evidence.' - Christopher Hitchens
'There's no such thing as addiction, there's only things that you enjoy doing more than life.' - Doug Stanhope
GitHub Junkyard

Offline

#3 2013-01-19 20:05:24

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: freeing up space from root

As kaszak696 said...

Why are you especially concerned about moving the current contents of /var/lib and /var/cache? I mean why not be just as concerned about moving the current contents of, say, /usr and /etc?

Do you basically want to move everything to a different partition (or a different partition on a different drive)? That is, abandon the current / and put everything on what is currently /home1? If so, take a look at the wiki guides on moving or copying an installation and see what works best for you. You'll need to boot a live environment to do the moving, of course. Don't forget the edit fstab and any other relevant config files, including reconfiguring your boot loader or equivalent.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#4 2013-01-19 20:43:47

arobson73
Member
From: uk
Registered: 2013-01-19
Posts: 34

Re: freeing up space from root

sorry i mean all those libs in /usr/lib and /usr/include. pacman seems to install packages to here, but i only have about 5G left in /
i made the mistake of installing only 20G / partiion. my home1 is 1TB and empty.
rather than re partition i though it might be easier to just change pacman.conf rootDir from / to /work1.

reason i want this is i noticed some xilnx fpga suite at over 6G. so might need to free up space

Offline

#5 2013-01-19 21:30:04

Fixxer
Member
From: Sosnowiec/Poland
Registered: 2011-08-29
Posts: 105
Website

Re: freeing up space from root

Show result of command:

du -BM /var/log/journal

Did you ever perform command? (answers are twice yes):

pacman -Scc

Show also:

pacman -Qqtd

The last one command shows orphaned packages and dependencies. Be carefull with removing that sort of packages! Removing too much pakckages without knowledge what do they serve for may damage your system.

su -c "pacman -Rcns $(pacman -Qqtd)"

Last edited by Fixxer (2013-01-19 22:01:18)


marcin'82

Offline

#6 2013-01-19 22:03:05

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: freeing up space from root

Rather than running pacman -Scc, you might want to look at paccache which is included in the package pacman-contrib. This lets you keep, say, the most recent couple of versions of a package around so that you can easily rollback while allowing you to free up space by removing older versions you no longer need. The wiki page on pacman has details.

I don't think there is any point in passing the -c flag in the last command suggested by Fixxer. Since you are only applying it to unrequired packages (-t), there cannot be a cascade (-c), can there?

I'd also recommend not using -n. Config files typically take little room and may come in handy. move them elsewhere after uninstalling packages if necessary.

@arobson73,

Do you mean that you want to leave existing packages where they are (under /usr/lib etc.) but have new ones installed to /home1 (/home1/usr/lib etc.)? I don't think you can do that without breaking your system. How, for example, would pacman upgrade your existing packages if it is using /home1 as /?

EDIT: What is your partition set up altogether? 20G is really quite a lot for / but if it include /var, that can accumulate stuff very quickly as Fixxer has indicated.

Rather than changing pacman's target, have you considered creating e.g. a dedicated partition for /var by resizing one of your other partitions? You can then transfer stuff from /var to the new partition and have fstab mount that at /var. I also use a separate partition for /usr/local but I suspect most people don't have much stuff there so it is unlikely to be helpful. (I have a full installation of both TeX Live 2011 and 2012 there so it is worth it in my case.)

Last edited by cfr (2013-01-19 22:08:17)


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#7 2013-01-19 22:14:54

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,532
Website

Re: freeing up space from root

"Only" about 5Gb left?  Is that a typo?  Or why on earth is this a concern?

My entire root partition uses less that 5Gb (with /var nd /usr/ and everything but /home).

EDIT: sorry, I had missed the 6Gb thing you want to install.  (Why on earth is is 6Gb).

Last edited by Trilby (2013-01-19 22:16:16)


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#8 2013-01-19 22:16:10

Fixxer
Member
From: Sosnowiec/Poland
Registered: 2011-08-29
Posts: 105
Website

Re: freeing up space from root

cfr wrote:

EDIT: What is your partition set up altogether? 20G is really quite a lot for / but if it include /var, that can accumulate stuff very quickly as Fixxer has indicated.

Unconfigured journald may take a lot of HDD space.
arobson73
Show also result of command:

su -c "du -aBM /var/log"

Last edited by Fixxer (2013-01-19 22:17:11)


marcin'82

Offline

#9 2013-01-20 20:17:32

arobson73
Member
From: uk
Registered: 2013-01-19
Posts: 34

Re: freeing up space from root

@Fixxer
du -BM /var/log/journal
1M      /var/log/journal
su -c "du -aBM /var/log"
Password: 
1M      /var/log/user.log.1
1M      /var/log/errors.log.3
1M      /var/log/journal
1M      /var/log/syslog.log.1
1M      /var/log/pacman.log
1M      /var/log/daemon.log.4
1M      /var/log/crond.log.1
1M      /var/log/crond.log.2
1M      /var/log/user.log.2
1M      /var/log/cups
1M      /var/log/daemon.log.1
1M      /var/log/wtmp
1M      /var/log/dmesg.log
1M      /var/log/auth.log.4
1M      /var/log/kernel.log.3
1M      /var/log/auth.log.1
1M      /var/log/auth.log.3
2M      /var/log/kernel.log.2
1M      /var/log/btmp
0M      /var/log/errors.log
1M      /var/log/messages.log.4
1M      /var/log/crond.log
2M      /var/log/everything.log.2
1M      /var/log/messages.log.2
0M      /var/log/user.log
1M      /var/log/daemon.log.2
1M      /var/log/user.log.4
1M      /var/log/errors.log.2
1M      /var/log/crond.log.4
1M      /var/log/kernel.log.4
1M      /var/log/kernel.log.1
1M      /var/log/everything.log.3
1M      /var/log/syslog.log.3
1M      /var/log/Xorg.0.log
1M      /var/log/syslog.log
1M      /var/log/user.log.3
1M      /var/log/old
1M      /var/log/errors.log.1
0M      /var/log/kernel.log
1M      /var/log/auth.log.2
1M      /var/log/faillog
1M      /var/log/Xorg.0.log.old
1M      /var/log/everything.log.4
1M      /var/log/speech-dispatcher
1M      /var/log/boot
1M      /var/log/crond.log.3
1M      /var/log/syslog.log.4
1M      /var/log/ConsoleKit
1M      /var/log/everything.log.1
1M      /var/log/daemon.log.3
1M      /var/log/wtmp.1
1M      /var/log/lastlog
1M      /var/log/errors.log.4
1M      /var/log/messages.log.1
1M      /var/log/syslog.log.2
1M      /var/log/btmp.1
1M      /var/log/everything.log
1M      /var/log/messages.log
0M      /var/log/daemon.log
1M      /var/log/auth.log
1M      /var/log/messages.log.3
9M      /var/log

yes i did the pacman -Scc
the
pacman -Qqtd
shows a few packages, maybe i can delete some of these, there is nothing big.

@cfr

>Do you mean that you want to leave existing packages where they are
>(under /usr/lib etc.) but have new ones installed to
> /home1 (/home1/usr/lib etc.)? I don't think you can do that without
>breaking your system. How, for example, would pacman upgrade your existing packages
>if it is using /home1 as /?

YES that is what i would like ideally.
i did read up on cd live boot with gparted, so might have to resort to that.
as you say it would mean resising the partition.

@Trilby
yes altera design suite is 6.5 G, not sure where all the files are installed
but if its / then i'm going to be short.

Last edited by ewaller (2013-01-20 20:20:05)

Offline

#10 2013-01-20 20:22:34

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 12,438

Re: freeing up space from root

arobson73:
Welcome to Arch Linux.  Please use BBCode code tags when posting program output.  Your readers will appreciate it.  I edited your last post, you can edit it to see what I did.
There is a link under every post box in the forums that links to a brief description as to how to use them.

Thanks.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Like you, I have no idea what you are doing, but I am pretty sure it is wrong...Jasonwryan
----
How to Ask Questions the Smart Way

Offline

#11 2013-01-20 20:30:16

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: freeing up space from root

arobson73 wrote:

@cfr

cfr wrote:

Do you mean that you want to leave existing packages where they are (under /usr/lib etc.) but have new ones installed to /home1 (/home1/usr/lib etc.)? I don't think you can do that without breaking your system. How, for example, would pacman upgrade your existing packages if it is using /home1 as /?

YES that is what i would like ideally.
i did read up on cd live boot with gparted, so might have to resort to that.
as you say it would mean resising the partition.

I don't see how that could possibly work. If you tell pacman to treat /home1 as /, then it will treat /home1 as /. So when the kernel gets updated, it will install to /home1/lib/, /home1/boot/ etc. etc. You will, in other words, completely break your system.

I'm not sure if you could, for example, move /var to /home1 and then just create a link /var pointing at the new location. I have /var on a separate partition but it gets mounted at /var. I would think it should work but I wouldn't be sure until I'd tried it. Depending on what altogether you have in /var, this might or might not make you sufficient room.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#12 2013-01-20 20:43:01

arobson73
Member
From: uk
Registered: 2013-01-19
Posts: 34

Re: freeing up space from root

after clearing the cache, my  /var is only just above 100M.

Offline

Board footer

Powered by FluxBB