Fedora Linux Support Community & Resources Center
  #1  
Old 16th February 2012, 01:15 PM
sluge Offline
Registered User
 
Join Date: Jun 2009
Location: Russia,52
Posts: 93
windows_7ie
Exclamation 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?
Reply With Quote
  #2  
Old 16th February 2012, 01:33 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,847
linuxfedorafirefox
Re: how to move /var to other partition?

Boot single user mode and be sure all mounts are up, then try "restorecon /var".

I bet the security labels are wrong.

another possibility is that the boot system (systemd if using F15/16) requires /var to be available immediately after mounting root read write so it can start dbus... which makes /var impossible to move to a different filesystem (yeah sucks).

You might try delaying the system logger till after it mounts.
Reply With Quote
  #3  
Old 17th February 2012, 05:16 AM
sluge Offline
Registered User
 
Join Date: Jun 2009
Location: Russia,52
Posts: 93
windows_7ie
Smile Re: how to move /var to other partition?

Yes, you are right, it was selinux. I run restorecon /var and ot boottime selinux restored all security data
Reply With Quote
  #4  
Old 17th February 2012, 08:33 PM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Birmingham, UK
Age: 31
Posts: 2,771
linuxfirefox
Re: how to move /var to other partition?

Quote:
Originally Posted by jpollard View Post
another possibility is that the boot system (systemd if using F15/16) requires /var to be available immediately after mounting root read write so it can start dbus... which makes /var impossible to move to a different filesystem (yeah sucks).
It wouldn't be that, I have /var on a separate partition and it's never caused a problem.

Merging / and /usr is one thing, but any boot system that couldn't cope with a separate /var would be fundamentally broken...

Gareth
Reply With Quote
  #5  
Old 17th February 2012, 08:44 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,847
linuxfirefox
Re: how to move /var to other partition?

And that is also my opinion on mergins / and /usr.

It completely defeats the meaning of "read only root" since you can no longer do it.

well, without resorting to a union mount of some kind.
Reply With Quote
  #6  
Old 5th April 2014, 04:27 AM
jlmontes Offline
Registered User
 
Join Date: Apr 2014
Location: TX
Posts: 1
linuxfirefox
Re: how to move /var to other partition?

Hi Gents,

The restorecon tip was a life-saver for me as I was having similar issues and also having problems with auditd not starting. I did have to make a slight command-line modification to tell restorecon to update all files and sub-directories under /var, posted below.

$ restorecon -vr /var

Had the issue on CentOS and RedHat VM's where I needed to move /var to a new drive that had more space
Reply With Quote
Reply

Tags
/var, or var, partition

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to move / partition Breeze Using Fedora 6 31st March 2011 12:37 PM
Move partition on disk dmarkd Using Fedora 5 14th January 2010 10:00 PM
Can't resize/move partition? WysiWyg Using Fedora 6 16th November 2007 12:37 PM
Move swap partition glennzo Using Fedora 3 10th June 2007 06:49 PM
move /home to new partition dtra Using Fedora 5 12th March 2007 02:54 PM


Current GMT-time: 10:04 (Sunday, 21-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat