how to create a new partition to replace current /home?
FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.