container on another drive/partition?

Moderator: BarryK

Post Reply
scsijon
Posts: 188
Joined: Fri Jul 24, 2020 10:11 am
Has thanked: 6 times
Been thanked: 17 times

container on another drive/partition?

Post by scsijon »

I was wondering if it's possible to have a EasyOS Container on a separate drive or partition?

The idea being to allow development of new packages/systems and thorough comparative testing with total isolation being possible across a number of versions.

User avatar
BarryK
Posts: 2273
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 93 times
Been thanked: 564 times

Re: container on another drive/partition?

Post by BarryK »

The first thought that comes to me, you could mount another partition at the container.

For example, say you have another partition sdb3:

# mount -t ext4 /dev/sdb3 /mnt/sdb3
# cp -a /mnt/wkg/containers/www /mnt/sdb3/www
# sync
# mount -o bind /mnt/sdb3/www /mnt/wkg/containers/www

I think if you then start "www" on the desktop, all writes will be to the www folder in sdb3.

But the default is not directly, as running in ram. If you want to write directly to sdb3, will need to tick "Toggle-off sesssion in ram", see the "save" icon.

Or, you could just bind-mount onto /mnt/wkg/containers/www/.session

User avatar
BarryK
Posts: 2273
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 93 times
Been thanked: 564 times

Re: container on another drive/partition?

Post by BarryK »

Um, not quite, you want it to be independent of whatever version of EasyOS you are running.
In that case, all required sfs files will need to be in the other partition.

When you install a sfs, say blender, as a container, look in /mnt/wkg/containers/blender, you will see easy.sfs and blender.sfs symlinks to the actual files in /mnt/wkg/sfs/....

You could replace those symlinks with the actual sfs files.

scsijon
Posts: 188
Joined: Fri Jul 24, 2020 10:11 am
Has thanked: 6 times
Been thanked: 17 times

Re: container on another drive/partition?

Post by scsijon »

Unfortunately, that's not going to work. I need all the contents of the drive/partition to be totally independant and appear as files, not a sfs or container when access normally. Thanks anyway.

I shall have to rethink the idea, and maybe build an updated quirky (was to be based on your oe packages) but now thinking of building a alicelinux instead, to run it with instead as it needs to be accessable cross-linux distributions.

Last edited by scsijon on Mon Nov 06, 2023 2:32 am, edited 1 time in total.
User avatar
BarryK
Posts: 2273
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 93 times
Been thanked: 564 times

Re: container on another drive/partition?

Post by BarryK »

A step toward total independence would be to start the container, then:

# cp -a /mnt/wkg/containers/blender/container /mnt/sdb3/blender

Folder 'blender' will then have everything as files.

Should then be able to chroot into it from any distro, but there will be of course details needed to get X etc to work in a chroot.

Post Reply

Return to “EasyOS”