LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 06-01-2008, 07:08 AM   #1
villumanati
Member
 
Registered: Jun 2008
Posts: 48

Rep: Reputation: 15
Separate OS and data


I have read that it is good practice to separate the OS and data onto separate partitions, the problem is however that most of the sources that I found don't really explain how to do this.

Would someone go into detail and explain how to do this? I already have my drive partitioned and formated with ext3. If i wanted to move say /home to the "data partition" what are the steps?
 
Old 06-01-2008, 07:18 AM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
0. backup (or if you're really 'brave', skip this step)
1. create and format the partition that you want to be the new 'home'
2. mount it - say something like: mount /dev/hdb1 /mnt
3. copy the contents of 'home': cp -a /home/* /mnt/.
4. unmount it (not really necessary, but don't be sloppy): umount /mnt
5. remount it at /home: mount /dev/hdb1 /home
6. make sure everything is OK
7. unmount it - make very very sure you've unmounted it
8. nuke the old home to free disk space: rm -rf /home/*
9. edit /etc/fstab to make sure it's automounted on boot - the entry would be something like:
/dev/hdb1 /home ext3 defaults,errors=remount-ro 0 2
That says mount /dev/hdb1 at the point /home with the 'ext3' filesystem using the default options, and if there's an error remount it as read-only. The 0 and 2 have to do with filesystem checks - you may have noticed that the root file system has 0 1 and all removable storage such as CDROM have 0 0. For more info on those strange numbers, read the fstab manual.

10. Remount one final time to make sure you got the fstab entry right:
mount /home
(since there is an fstab entry, mount will do the right thing - if you didn't make a mistake)

And that's it - every time you reboot, 'home' will be that shiny new partition.
 
Old 06-01-2008, 07:58 AM   #3
villumanati
Member
 
Registered: Jun 2008
Posts: 48

Original Poster
Rep: Reputation: 15
Thanks for the quick reply. I mistyped I don't have a separate partition but rather a raid 1 configuration (with 2 hard disk) that i want to put the /home directory on. I understand your response still though, but i have one question.

If the disk in the RAID 1 config are set to 'Linux autodetect' how should i put that into the fstab file where you have the ext3 file?
 
  


Reply



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
How hard to get MySQL data served from a separate physical drive? sneakyimp Linux - Software 2 09-18-2007 09:53 PM
Processing data from a 'foreign' database with mysql, or tools to pre-process data. linker3000 Linux - Software 1 08-14-2007 08:36 PM
Encoding separate audio channels to separate files omnio Linux - Software 0 06-01-2007 07:46 AM
Looking for a tool to auto crop and separate images in to separate files.. mlsfit Linux - Software 2 08-06-2006 03:13 PM
Separate Partitions for Separate User groups volvic Slackware - Installation 2 09-16-2004 02:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 09:56 AM.

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
Open Source Consulting | Domain Registration