Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mounting 2 folders on one device (raid5)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Utsuho Reiuji
Apprentice
Apprentice


Joined: 03 Apr 2013
Posts: 160

PostPosted: Tue Sep 23, 2014 9:55 pm    Post subject: mounting 2 folders on one device (raid5) Reply with quote

Hi,
I finally got around to fix a few things I messed up when installing gentoo, one of which would be the mountpoints.

currently, my /var/log folder goes onto my raid like this:
Code:
/dev/md1      /var/log      ext4   defaults,noatime            0 2


Now, I would like to have both, /var and /home on /dev/md1, though I don't exactly know, how I can do that.
I'm pretty sure that the following won't work for obvious reasons:
Code:
/dev/md1      /home         ext4   defaults,noatime            0 2
/dev/md1      /var          ext4   defaults,noatime            0 2


So basically, I need a way to get this working and thought of the following:
Code:
/dev/md1      /media/raid5        ext4   defaults,noatime            0 2
/home         /media/raid5/home   none   bind                        0 0
/var          /media/raid5/var    none   bind                        0 0


but before I edit my fstab file I would like to know if that works or if there's a better way on solving this dilemma
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Wed Sep 24, 2014 12:02 pm    Post subject: Reply with quote

Why don t you use symlinks or subfolders for that purpose.

mount or link does not care about subfolders, just make links and thats it.
Back to top
View user's profile Send private message
Utsuho Reiuji
Apprentice
Apprentice


Joined: 03 Apr 2013
Posts: 160

PostPosted: Wed Sep 24, 2014 6:04 pm    Post subject: Reply with quote

tw04l124 wrote:
Why don t you use symlinks or subfolders for that purpose.

mount or link does not care about subfolders, just make links and thats it.

That's what I'm doing currently, but this causes some issues with users who would save files on the ssd.
I could fix that with more symlinks, but I'd rather get rid of those and want to use proper mounts.
Back to top
View user's profile Send private message
Utsuho Reiuji
Apprentice
Apprentice


Joined: 03 Apr 2013
Posts: 160

PostPosted: Sun Sep 28, 2014 1:28 pm    Post subject: Re: mounting 2 folders on one device (raid5) Reply with quote

Utsuho Reiuji wrote:
Hi,
--snip--
Code:
/dev/md1      /media/raid5        ext4   defaults,noatime            0 2
/home         /media/raid5/home   none   bind                        0 0
/var          /media/raid5/var    none   bind                        0 0

--snip--


sorry to bump this, but could just someone tell me if these would work in a fstab or if there's something specific I have to watch out for?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Sun Sep 28, 2014 2:30 pm    Post subject: Reply with quote

Utsuho Reiuji,

You can partition /dev/md1.
Better is to make two raid sets.
Best is probably LVM, so you con move space around.

All of the above will destroy any data on /dev/md1
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Utsuho Reiuji
Apprentice
Apprentice


Joined: 03 Apr 2013
Posts: 160

PostPosted: Tue Sep 30, 2014 4:51 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Utsuho Reiuji,

You can partition /dev/md1.
Better is to make two raid sets.
Best is probably LVM, so you con move space around.

All of the above will destroy any data on /dev/md1


Hi NeddySeagoon,
reformatting md1 is sadly no option :/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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