View previous topic :: View next topic |
Author |
Message |
<3 Veteran
Joined: 21 Oct 2004 Posts: 1081
|
Posted: Sun Oct 13, 2013 10:52 pm Post subject: mounting multiple directories to one partition |
|
|
Hello all I am reinstalling gentoo on a brand new Intel SSD that I just got and I want to mount /var/tmp /tmp and /home directories to a partition on a hard drive off of my main ssd with device file /dev/sdb6. Right now I cannot figure out how to do this during the install process. I am unsure I have already made the directories on the partition but I cannot seem to mount them I never really understood the syntax of the mount command. Can someone please help me out?
This is the syntax that I used before
Code: | mount --bind /dev/sdb6/var/tmp /var/tmp
mount: special device /dev/sdb6/var/tmp does not exist (a path prefix is not a directory) |
Last edited by <3 on Mon Dec 16, 2013 6:08 am; edited 1 time in total |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21624
|
Posted: Mon Oct 14, 2013 12:13 am Post subject: |
|
|
First mount /dev/sdb6 somewhere. Then bind mount the directories that appear under that mount point on the directories you want to cover. Code: | mount /dev/sdb6 /mnt/sdb6 && mount --bind /mnt/sdb6/tmp /tmp && mount --bind /mnt/sdb6/var/tmp /var/tmp && mount --bind /mnt/sdb6/home /home |
|
|
Back to top |
|
|
<3 Veteran
Joined: 21 Oct 2004 Posts: 1081
|
Posted: Wed Oct 23, 2013 3:11 am Post subject: |
|
|
Thank you very much now how would I add this to my fstab? would this be the correct syntax if /dev/sda6 is mounted to /mnt/temp?
Code: |
/mnt/temp/tmp /tmp bind defaults 0 0
/mnt/temp/var/tmp /var/tmp bind defaults 0 0
/mnt/temp/home /home bind defaults 0 0 |
|
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21624
|
Posted: Wed Oct 23, 2013 9:46 pm Post subject: |
|
|
That looks correct. What was the error when you tried it? |
|
Back to top |
|
|
<3 Veteran
Joined: 21 Oct 2004 Posts: 1081
|
Posted: Fri Oct 25, 2013 7:22 am Post subject: |
|
|
I didn't see any errors |
|
Back to top |
|
|
|