Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mounting multiple directories to one partition
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
<3
Veteran
Veteran


Joined: 21 Oct 2004
Posts: 1081

PostPosted: Sun Oct 13, 2013 10:52 pm    Post subject: mounting multiple directories to one partition Reply with quote

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
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21490

PostPosted: Mon Oct 14, 2013 12:13 am    Post subject: Reply with quote

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
View user's profile Send private message
<3
Veteran
Veteran


Joined: 21 Oct 2004
Posts: 1081

PostPosted: Wed Oct 23, 2013 3:11 am    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21490

PostPosted: Wed Oct 23, 2013 9:46 pm    Post subject: Reply with quote

That looks correct. What was the error when you tried it?
Back to top
View user's profile Send private message
<3
Veteran
Veteran


Joined: 21 Oct 2004
Posts: 1081

PostPosted: Fri Oct 25, 2013 7:22 am    Post subject: Reply with quote

I didn't see any errors
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum