Jump to content

move mountpoint of /var [solved]


tl017
 Share

Recommended Posts

Hallo All,

 

I have only approx. 400 MB on /root partition, normally enough but caused problem during MandrivaUpdate, because 630 MB download volume is needed. The update tool will download to /var/cache/urpmi.

 

On /usr I have lot of space (approx. 1.8 GB), therefore I would like to move /var to /usr/var, but I don'nt know how without breaking my system.

I hope someone out here can help me.

 

Many thanks in advance,

tl017

Link to comment
Share on other sites

Hmmm, not an easy one. You can't really move /var as such. Normally you can mount this to other partitions, but would be hard to mount within /usr/var.

 

You could try this however, and see how you get on, but you'll have to boot in single user mode to do it, usually linux failsafe from your lilo/grub menu.

 

mkdir /usr/var
mv /var/* /usr/var/
rm -rdf /var
ln -s /usr/var /var

 

I don't even know if that will work, you can only try and see if it does. I'm doing symlinking here to point you to the new location. Give it a try, see how the system reacts after doing it. If it craps out, then you have to recover using:

 

rm /var
mkdir /var
mv /usr/var/* /var/

 

Maybe there is a way to configure moving /var/cache/urpmi instead, rather than the whole /var directory. You could use the same process for this using the symlinking. And probably better than moving the whole /var directory as you might break something real badly.

 

mkdir /usr/urpmi
mv /var/cache/urpmi/* /usr/urpmi/
rm -rdf /var/cache/urpmi
ln -s /usr/urpmi /var/cache/urpmi

Link to comment
Share on other sites

It seems you might have set up small partitions for everything that is generally in root.

This is not at all necessary. The 3 main partitions recommended is / (root), /swap, and /home. Any spare space can be partitioned for particular things such as Music or Graphics or anything of your own choosing.

Seperate partitions for var or usr and others in root is a complete waste of time.

I call it the noobie move. How do I know ?? I did it myself when I first started in Linux years ago thinking I was being very technically capable. Only to learn later that it was a useless and unecessary exercise and caused me more problems than it was worth. Just like the problem you have just experienced.

 

If you have a large Hard drive then allow about 5 to 10Gb for root, about 600 to 750Mb for /swap ( more than that is unnecessary) and about 10 Gb for /home (Remember K3B, The GIMP and a number of applications use temp in your home account ) .

 

Cheers. John.

Link to comment
Share on other sites

Seperate partitions for var or usr and others in root is a complete waste of time.
It's may not give much advantage to home users, however, in a server or business environment such separation can be extremely useful and could even save your job/life. With this sort of separation you could loose one partition, but not all, and you can more easily backup and restore important portions of the file system. Also, with NFS, you can mount these partitions to other systems to be used (say, everyone wants to mount /usr/local/ on the main server for access to specific apps instead of installing them on each computer).
Link to comment
Share on other sites

Hello Tyme.

I know the server situation is different. My comment here is for an ordinary user newbie and also meant for other newbies as well.

 

I don't think it is a good thing to over complicate things for average users trying to get acquainted with Linux and leaving Windows.

 

I suspect Windows server users would also mostly be aware of what you say.

 

Cheers. John.

Link to comment
Share on other sites

Desktop systems I partition with /, /home and swap. I put the swap partition as the first partition on the disk (makes it faster to access), followed by / at 10GB and the rest to /home.

 

With the exception of my work desktop, which acts more like a desktop type server, and gets more partitions, one called /data for all my shared vmware stuff. I think I also split up /, /boot, /usr and /var as well.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...