moving /var and /home to a new partition

Janina Sajka janina at rednote.net
Wed Mar 30 16:41:06 EST 2005


One of the drawbacks of the mv command is permissions and ownership.
Instead, you might want to use rsync which will allow you to preserve
those with the -p switch.

Also, rsync is safer--in case something happens during the big job.

Once moved, you can just rm -rf.

Raul A. Gallegos writes:
> Hi.  I have FC3 installed and currently use the following on one hdd:
> 
> /hda1 swap
> /hda2 /
> /hda3 /usr/local
> /hda4 /home
> 
> I did this because at time of install I only had one drive.  Now I will be 
> installing a second drive for /home only.  So what I want to do is move 
> /home to /hdc1 and then move /var to home's current partition /hda4.
> 
> I boot into single user mode first and edit fstab.
> 
> I know how to edit /etc/fstab but my question is what parameters I should 
> give mv when moving the directories.
> 
> I figured I could temporarily mount /hdc1 as /newhome then:
> 
> cd /home
> mv * /newhome
> 
> Now I can umount /newhome
> 
> Now for /var I could do:
> 
> cd /var
> mv * /home
> 
> So when I reboot all the /var files will be in /home's old partition /hda4 
> and the new /home will be on /hdc1.
> 
> What I'm worried about is preserving all permissions, ownerships, etc.
> 
> Does this all look right?
> 
> 
> _______________________________________________
> Speakup mailing list
> Speakup at braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup

-- 

Janina Sajka				Phone: +1.202.494.7040
Partner, Capital Accessibility LLC	http://www.CapitalAccessibility.Com

Chair, Accessibility Workgroup		Free Standards Group (FSG)
janina at freestandards.org		http://a11y.org

If Linux can't solve your computing problem, you need a different problem.





More information about the Speakup mailing list