Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-16-2012, 08:15 AM   #1
Registered: Dec 2006
Location: Russia,52
Posts: 125

Rep: Reputation: 6
Question how to move /var to other partition?

Hello! I tryed to move my /var to other partiton. (/dev/md0)
So, I
1) mkdir /newvar
2) mount /dev/md40 /newvar
3) cp -Rax /var /newvar
4) mv /var /oldvar
4) change fstab to mount /var to /dev/md40

So, after reboot I'got errors:
Calling the system activity data collector (sadc): Cannot open /var/log/sa/sa11: Permission denide

System logger [FAILED]

And system run at 1 runlevel, why?
Old 02-16-2012, 06:15 PM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
I tryed to move my /var to other partiton. (/dev/md0)
2) mount /dev/md40 /newvar
4) change fstab to mount /var to /dev/md40
So, which is the correct partition; /dev/md0 or /dev/md40?
Old 02-16-2012, 11:55 PM   #3
Registered: Dec 2006
Location: Russia,52
Posts: 125

Original Poster
Rep: Reputation: 6
Originally Posted by bigrigdriver View Post
So, which is the correct partition; /dev/md0 or /dev/md40?

sorry, it is md40
1 members found this post helpful.
Old 02-22-2012, 04:42 AM   #4
Senior Member
Registered: Apr 2004
Location: Currumbin Valley, Australia
Distribution: Devuan
Posts: 3,431
Blog Entries: 33

Rep: Reputation: 228Reputation: 228Reputation: 228
I've found it difficult to move /var while the system is running with /var mounted.

What I have done is,

copy /var... to the new partition.

reboot using a live distro, like arch-linux, gparted or slax (I use gparted live cd (allows "make active boot" per HDD)).

edit the "/etc/fstab", changing the address of the relevant line (my system has multiple partitions, /var is one of them).


then you may remove the data from the old /var "partition".

If it is just a directory, you'd be best off, doing a re-install with partitioning in mind.

Cheers, Glenn

Last edited by GlennsPref; 02-22-2012 at 04:43 AM. Reason: spelling


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
Need to move /var jrodger Linux - Newbie 5 02-15-2010 02:39 PM
Best way to move /var? Cyberman Debian 2 04-05-2009 07:59 PM
How do I move /var to a logical volume? bret Linux - General 5 02-03-2006 12:59 PM
Post installation re-partitioning: how to move /var? wolfpeach Debian 4 06-30-2004 11:17 AM
/var move killed ftp server jeffpoulsen Linux - Networking 1 10-24-2002 08:46 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:25 PM.

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