LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-23-2020, 11:19 AM   #1
d745fba1cb70ab9dc02a80ee
Member
 
Registered: Nov 2017
Location: Earth
Distribution: Arch btw
Posts: 82

Rep: Reputation: 1
Any way to union-mount filesystems as a rootfs with preference for faster one?


My laptop has died, and the new one I'm thinking of getting has both a 256GB NVMe drive and space for a 2.5in drive. I plan to populate that space with the 240GB SATA SSD from my old laptop. (It's a year old, has 90% lifetime remaining, and should see less intense use here than before, so it's unlikely to break.) This will get me a total of 496GB of space.

However, I am lazy and would prefer not to have to decide which files go on which drive. That should be automatic. I want them merged into one filesystem, mounted as my rootfs. I want the system to be smart and put often-used files on the NVMe drive, bumping infrequently used files onto the SATA drive if the NVMe drive runs out. If possible, I'd also prefer to be able to mount each disk on its own for disaster recovery and reliability purposes. I also don't want FUSE because it has too much overhead.

However, I can't find anything that looks to be able to do exactly what I want:

One filesystem on RAID 0: NVMe will get bottlenecked by the SATA drive, will cause some storage space to go to waste, one drive failure causes loss of all data

One filesystem on LVM: As far as I can tell, data goes wherever it feels like with no preference for the faster drive, one drive failure causes loss of all data

Two filesystems joined with overlayfs: Looks like one fs must be read only

Two joined with mergerfs/mhddfs: FUSE, can't find mentions of it supporting preference for the faster drive so I don't think it's supported

Unionfs/aufs: can't find mentions of it supporting preference for the faster drive so I don't think it's supported

I think joining two filesystems is the way to go, but I can't find anything that looks to do quite what I need. Was I wrong about the capabilities of something I dismissed, is there something I didn't find, or is there actually nothing that does what I want? (I'm on Arch Linux if it matters.)
 
Old 11-23-2020, 11:48 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
I think you need to split your files/dirs first, for example /home will be stored on ssd and /usr /etc (and so on) on your NVMe. There is no easy way to achieve what you want.
Looks like a persistent cache for me. I think a smart solution like this will need a lot of resources and makes the system complicated.
 
Old 11-23-2020, 07:11 PM   #3
d745fba1cb70ab9dc02a80ee
Member
 
Registered: Nov 2017
Location: Earth
Distribution: Arch btw
Posts: 82

Original Poster
Rep: Reputation: 1
I don't think a smart solution will make the system complicated. It's just another layer of abstraction, on top of filesystems, LUKS, LVM, and device drivers that are already there. I think the real reason it doesn't exist is because not enough people want it.

Anyways, since it doesn't exist, I'll split my data manually.
 
Old 11-24-2020, 01:37 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
Quote:
Originally Posted by d745fba1cb70ab9dc02a80ee View Post
I don't think a smart solution will make the system complicated. It's just another layer of abstraction, on top of filesystems, LUKS, LVM, and device drivers that are already there. I think the real reason it doesn't exist is because not enough people want it.

Anyways, since it doesn't exist, I'll split my data manually.
Probably you are right, yes. Probably not that easy to implement....
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS rootfs: mount: only root can mount proc on /proc John Rama Linux - Software 4 12-14-2016 08:17 AM
[SOLVED] Filesystems supported by the kernel (/proc/filesystems) gacanepa Linux - Newbie 5 08-22-2013 02:15 PM
Any one can build a ubuntu UML rootfs successfully ? 5883 Linux - Virtualization and Cloud 1 11-26-2011 08:01 AM
BSD style mount union on Linux andrewholt Linux - General 1 05-03-2006 01:41 AM
windows filesystems vs. linux filesystems irfanhab General 8 05-25-2004 07:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration