Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Seeing as Windows 7 is not supported in steam anymore and windows 10 and 11 are annoying I Decided to try installing Nobara linux and see how many of my Steam games will work on it. On a tip that I found on Discord I decided to mount the NTFS partition I have for steam files read only in a union filesystem with an Ext4 partition to save changes. How this was explained to me to work is that you can make changes to the filesystem and they are saved to the read write partition leaving the read only partition intact.
In practice I am finding it takes root privileges to delete most files even though I have 777 access rights and am set as the group and owner on all files in the partition. If I try to delete a file on the union partition without using sudo it shows the error:
Quote:
rm: cannot remove 'foo.exe': Read-only file system
but I can delete it with root which makes me think its a privileges issue maybe. Also I cannot make directories anywhere on the partition It tells me:
Quote:
mkdir: cannot create directory ‘foo’: No such file or directory
when I try to run any game from steam that is on the union filesystem it shows as needing an update but cannot update and shows a disk write error when I try probably due to the issues I have listed.
I'm wondering if I don't have the configuration right or if I need to look at another filesystem such as aufs, overlay, or a non fuse based version of union.
mount your windows and linux sets
/mnt/overlay/W
/mnt/overlay/L
create a changes folder where all changes will be stored
mkdir /mnt/overlay/changes
create a top level view folder /mnt/overlay/top
alongside that create a empty work folder /mnt/overlay/work (must be on the same filesystem as overlayfs uses that to move files around that when on the same filesystem is just a pointer action, rather than being a full dataset move action if on another filesystem)
and then
Code:
mount -t overlay -o lowerdir=/mnt/overlay/W:/mnt/overlay/L,upperdir=/mnt/overlay/changes,workdir=/mnt/overlay/work /mnt/overlay/top
You view that using the combined/layered view via /mnt/overlay/top
Any change are stored in /mnt/overlay/changes which IIRC can include whiteout files such as .wh.somefile ... that signal that somefile is technically a deleted file.
So a matter of prserving and retoring the /mnt/overlay/changes folder contents (tar or whatever) between 'reboots'.
I'm sorry that I really have forgotten most of what I knew about unionfs, and I don't know how different funiunfs is.
What I DO remember is that it was basically more of a pain than it was worth. Just too fiddly and hard to cajole into doing what I wanted.
So I have a dumb brute force suggestion ... maybe just copy over the data to a simple ext4 partition? How much total space are we talking?
Seeing as Windows 7 is loosing support for steam I downloaded my whole steam library because the games I have already downloaded should still work in offline mode. Its like 1.5 tb but I got a new 8 tb harddrive for Christmas so copying the whole thing is definitely a possibility. I just don't like giving up because I cant figure something out.
Quote:
overlayfs is now the Linux preferred choice
mount your windows and linux sets
/mnt/overlay/W
/mnt/overlay/L
create a changes folder where all changes will be stored
mkdir /mnt/overlay/changes
create a top level view folder /mnt/overlay/top
alongside that create a empty work folder /mnt/overlay/work (must be on the same filesystem as overlayfs uses that to move files around that when on the same filesystem is just a pointer action, rather than being a full dataset move action if on another filesystem)
and then
Code:
mount -t overlay -o lowerdir=/mnt/overlay/W:/mnt/overlay/L,upperdir=/mnt/overlay/changes,workdir=/mnt/overlay/work /mnt/overlay/top
You view that using the combined/layered view via /mnt/overlay/top
Any change are stored in /mnt/overlay/changes which IIRC can include whiteout files such as .wh.somefile ... that signal that somefile is technically a deleted file.
So a matter of prserving and retoring the /mnt/overlay/changes folder contents (tar or whatever) between 'reboots'.
I will look into overlay. The commandline suggested installing overlayfs-tools when I typed overlay and then was able automatically install them. Its probably a lot faster and less fraught with permissions issues than a fuse filesystem.
I'm probably just stating the obvious, but if it's something you do not expect to be able to download again later then you want at least one more copy (on a different drive, not just a different partition) anyway.
Now for something less obvious - once you have a copy on ext4, you can use hardlink "snapshots" to preserve how things were originally, or with "snapshots" later on. No need for wrangling with UnionFS, and you can have as many "snapshots" as you like.
For example, let's say your "live" directory is "/mnt/LinuxSteam/Live/". You can create a hardlink "snapshot" with:
This does a recursive copy, but "-l" means that it will replicate files with hardlinks rather than duplicating their contents. This makes the snapshot pretty fast and it takes up almost no drive space.
The "magic" is that when a file is deleted, it only gets removed from the ext4 file system when the last hardlink pointing to it is deleted.
The bad news is that if a file is modified in place - such as a log file that is appended to - then all hardlinked copies will be modified. So it's not a true snapshot. I don't know how Steam files work, so this may or may not be a problem.
But this snapshot technique is particularly useful when combined with rsync, because rsync will never update a file in place. If rsync transfers over an updated log file, it will delete the old log file and copy over the new log file.
Anyway, this is just food for thought. There are also "COW" file systems that allow true snapshots. These "Copy On Write" rather than modify files in place.
update: switched to overlay and its working now but not automatically on boot. However it will mount correctly if I run sudo mount -a after it has booted. This is my fstab entry:
update: switched to overlay and its working now but not automatically on boot. However it will mount correctly if I run sudo mount -a after it has booted. This is my fstab entry:
if your overlay mount references other non-root disks, there is no deterministic guarantee those will be available when the overlay mount is processed (mounts are forked in parallel). This will cause a mount failure during reboots - and enter into maintenance mode. To avoid this add the noauto to the (4th) options field. And add a post-boot script to mount the overlay when all local disks are up.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.