You are not logged in.

#1 2009-08-15 03:15:27

dvl
Member
From: TM, RO
Registered: 2009-02-14
Posts: 27
Website

How to move safely /usr/lib

Hey there!

Dunno if it sounds crazy or not, correct me please if it is big_smile. I want to free a little space on my eee-pc 901's system partition so i was thinking to move /usr/lib to the bigger partition. I have 2 ssd-s, one of 4 gb mounted as root partition (/) and one of 16 gb mounted as /home.
The root partition is starting to fill up, so i already had to symbolic link the pacman cache directory to a dir in /home (i didnt -Syu for like 2 months and i had no space for the packages), i have 270mb only...

So, my question is witch is the safest way to move /usr/lib to the other partidion/harddrive?
Should i move something else instead of /usr/lib because of speed issue or summin else?

I'm looking for a good sollution to solve this free-space related problem.
Thanks for the replies,


With respect,
dvl


Arch. Xfce4

Offline

#2 2009-08-15 03:23:35

dvl
Member
From: TM, RO
Registered: 2009-02-14
Posts: 27
Website

Re: How to move safely /usr/lib

or should i move /usr/share ?


Arch. Xfce4

Offline

#3 2009-08-15 04:20:48

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,544

Re: How to move safely /usr/lib

In this situation, I'd actually vote for LVM. I've had trouble with recovering LVM data before, so backup (20GB isn't much to back up anyways), but LVM would let you use the 2 SSDs like JBOD RAID: as one virtual physical volume, which you could then make one giant partition on. With only 20GB of space, it isn't worth having multiple partitions: you run into the problems you've talked about.

Also, you should look into transparently compressing filesystems. Reiser4 I know has it (though it is undesirable for a number of obvious reasons), Btrfs does but it is not yet stable... the ReiserFS wiki page says it does, but I've never heard of such a thing. Huh. Well, give it a look into.

Offline

#4 2009-08-15 04:27:31

Arisna
Member
Registered: 2009-02-13
Posts: 81

Re: How to move safely /usr/lib

Out of those two options, moving /usr/share sounds like a better idea to me.  Were you going to do this as a symlink as well, or are you actually going to make a new partition on the other card?  Partitioning the card would be riskier, and I don't even know if it can/should be done, but that's the cleaner solution if it's reasonable.  Maybe consider putting /var, /tmp, and /home all on the larger card.  That will get you the pacman cache where you want it without any symlinking or weird mount points and maybe free enough space for you.  For that matter, maybe you could even move all of /usr.

Doing this would involve backing up all of your data, editing partitions, using the cpio command to copy system files super safely, editing /etc/fstab, deleting the original files, and booting with crossed fingers.  Going into single user mode or using a live cd may also be necessary or convenient somewhere along the line.

Offline

#5 2009-08-15 04:41:49

dvl
Member
From: TM, RO
Registered: 2009-02-14
Posts: 27
Website

Re: How to move safely /usr/lib

thanks for the quick reply
i dont wanna complicate that much, especially because the 2 ssd-s arent with the same speed and so on. The 4 gb ssd is designed specially for the OS (higher transfer speed) and the second one is a bit slower.
i need just a little space ~1-1,5 gb to free only if i'd like to try some new programs to have space for it, because i have all programs i use already installed and for upgrades i dont need much space.. thats why i thought on moving the /usr/lib or /usr/share only (to keep the system on the faster ssd).

I was thinking on something like this too (but dunno realy much about how the filesistem works sad ):
to create a dir on the "big" harddisk and move there some dirs from /usr/share (games for example, or progs i dont use that ofter, but not all of them) and then create a symbolic link to /usr/share
but what i dunno is that if i install some new stuff it will be installed witch of the dirs? will the 2 directories contents "mix" normally?

sorry for the noobish questions, i just wanna ask things like this before i f*ck up something :>


Arch. Xfce4

Offline

#6 2009-08-15 04:47:35

dvl
Member
From: TM, RO
Registered: 2009-02-14
Posts: 27
Website

Re: How to move safely /usr/lib

thanks Arisna too for the reply

i was thinking on some simple symlinking too only but i didnt know witch dir will be better and how to copy safely...
i think i will symlink /usr/share to a dir made on the bigger ssd, and i'll move the files using a livecd (usb 'because i have no cd-drive :>)


Arch. Xfce4

Offline

#7 2009-08-15 04:58:16

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: How to move safely /usr/lib

One other option you could consider, particularly if you are happy with your current setup and don't want to screw it up: use an external drive to back up /var/ and regularly flush the package cache.

I do this on my Eee and it keeps my / (on the 4GB drive) at around 2.2-2.5GB. If I need to downgrade a package, I just connect the external drive & pacman -U


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2009-08-15 07:56:11

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: How to move safely /usr/lib

Symlinking system dirs into your /home is a horrible kludge - avoid it if you can. I give a +1 to the LVM idea, but if you don't like that create a new partition on the larger card, and move whatever you want in there.

Offline

#9 2009-08-15 17:31:55

dvl
Member
From: TM, RO
Registered: 2009-02-14
Posts: 27
Website

Re: How to move safely /usr/lib

first of all, thankss for the replies!

finally i decided to make a little cleanup (changed from deluge to vuze to avoid use of libtorrent-rassterbar + boost; cleaned up some not used pkgs and so on) and a freed up 500mb space so i have around 800megs now, what is eenough...
if i will need to do this thread again i think i will go for creating a partition on the bigger disk and mounting in fstab as /usr.

thanks in advice!

with respect,
dvl


Arch. Xfce4

Offline

Board footer

Powered by FluxBB