LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-26-2007, 01:30 PM   #1
parv
Member
 
Registered: Jul 2004
Location: USA
Distribution: Mint, Scientifc Linux, Ubuntu
Posts: 180

Rep: Reputation: 30
how to create a new partition to replace current /home?


The output of df -h is:

Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
108G 64G 40G 62% /
/dev/sda1 99M 19M 75M 21% /boot
none 501M 0 501M 0% /dev/shm

I want to create a separate partition such that I can
move all user data currently located at /home to it.
And I still want to keep the new partition name "/home".
There is no /home entry in the current /etc/fstab

Please tell me the details of the series of commands
I shall use since I am afraid I may lose the current data
for multi-users.

Thanks very much.
 
Old 02-26-2007, 02:21 PM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
It looks like you have your entire file system, excluding /boot and swap, on a single partition, so naturally you don't have an fstab entry for /home. Putting it on a separate partition, or even a separate drive, is certainly a good idea.

I'm not going to give you all the commands, that's too much trouble for me and doing the research yourself will help you learn the system, but here's the basic plan you should probably follow.

0. Back up all of your /home data to a safe location.
1. No, I mean really back up all of your /home data to a safe location, preferably to an off-computer medium.
2. Create the new partition. I'm assuming you already have free drive space to do this.
3. Mount the new partition to a temporary location.
4. Copy all the contents of the old /home directory into to the new partition (but not /home itself), then unmount it again.
5. Log out all users and X servers, if you haven't already. For maximum safety, switch to runlevel 1.
6. As root, empty the /home directory of all files, but leave the main directory itself in place to serve as the new mount point.
7. Edit fstab and add a new line so that the new partition mounts to /home.
8. Mount your new partition ("mount /home").
9. If all went as planned, you should now see the contents of the new partition in /home.
10. Operation complete. You may now return everything to normal.

If you need more than this, there are certainly other threads concerning this same question. Try a forum search.
 
Old 02-26-2007, 02:24 PM   #3
parv
Member
 
Registered: Jul 2004
Location: USA
Distribution: Mint, Scientifc Linux, Ubuntu
Posts: 180

Original Poster
Rep: Reputation: 30
Thanks very much, David.
I am planing to add another hard disk first
and then create the partition to accommodate /home.
It's definitely not a good idea to have only
one partition, but I have to live up to it,
at least for now.
 
  


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
Can Ubuntu replace Debian without loss of /home/ ? OldakQuill Ubuntu 1 10-04-2006 03:24 AM
Delete Windows, Replace Without Losing Current Installation. rickh Debian 2 06-13-2006 11:12 AM
Create RPM of current Kernel? lets-eat-gary Linux - Software 1 07-26-2005 10:44 PM
Create a /home partition. Michael Johnson Linux - General 3 07-06-2005 10:09 AM
Create a partition for /home FiveFlat Linux - Newbie 5 05-02-2005 05:40 PM

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

All times are GMT -5. The time now is 08:22 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
Open Source Consulting | Domain Registration