LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to create folders in 2nd and 3rd partions and how to mount /home on 3rd Partition (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-create-folders-in-2nd-and-3rd-partions-and-how-to-mount-home-on-3rd-partition-4175440364/)

AnApproach2DigestLinux 12-06-2012 10:07 PM

How to create folders in 2nd and 3rd partions and how to mount /home on 3rd Partition
 
I have three partitions /dev/sda1, dev/sdb1, and /dev/sdc1. My redhat is installed in /dev/sda1.

/dev/sdb1 & /dev/sdb2 have already file system (ext4) created and both of them are empty.

I want to create 2 empty folders in /dev/sdb1 and 2 empty folders in /dev/sdc1. I just want to store few things in these empty folders.

One folder of /dev/sdc1, I want to use to mount the /home directory of /dev/sda1.

Please let me know how to perform these tasks amd how to access folders on different partitions after storing the data and how to acces one folder that is used to mount /home directory of IST partition.

chrism01 12-06-2012 10:25 PM

If the /home dir is empty, you can just edit /etc/fstab
Code:

/dev/sdc1                /home ext4    defaults        1 1
If it has data in it either copy the content temporarily elsewhere, then do above and copy content back or rename /home => /old_home, then create a new /home, edit fstab as above and copy content from /old_home to /home.
Note that the new home dir must have the same ownerships, permissions and SELinux settings as the original.

Can you show us what distro+version you have
Code:

cat /etc/*release*

uname -a

Also current disk layout
Code:

df -h

fdisk -l

Lowercase L for fdisk param


All times are GMT -5. The time now is 12:42 PM.