LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

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
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
Quote:
I tryed to move my /var to other partiton. (/dev/md0)
Quote:
2) mount /dev/md40 /newvar
Quote:
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
sluge
Member
 
Registered: Dec 2006
Location: Russia,52
Posts: 116

Original Poster
Rep: Reputation: 6
Quote:
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
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Posts: 3,366
Blog Entries: 33

Rep: Reputation: 216Reputation: 216Reputation: 216
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).

reboot.

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
 
  


Reply


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


All times are GMT -5. The time now is 08:02 PM.

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