[BUGS] An ideal filesystem, as seen on my FreeBSD/ZFS NAS.
Julian Noble
julian at precisium.com.au
Thu Jun 23 20:32:13 AEST 2022
Hi All
After 20+ years of part time freebsd adminery in a vacuum (no colleagues
as far as admin/IT) I still don't feel qualified to have an opinion on
ideal.
I used to have various folders at the root level - and have more
recently kept nearly all customisations that don't relate to me as a
user in a single folder under /usr/local/
Syncing non-system specific things to a single area and linking from
home sounds reasonable.
Now that we have mature zfs support in FreeBSD - with fantastic things
like boot environments for rollback, zfs on root with mirrors etc and
zfs send & receive - I feel much more comfortable in the longevity of
particular vms.
For example, before, I tended to backup the minimum necessary and if the
worst came; it was time to rebuild a whole system with a newer release.
Now - I have most things in jails (iocage) or bhyve vms synchronised
between a few main hosts by syncoid - which uses zfs send receive.
With a bit of scripting (famous last words!) I expect to be able to
'migrate' a vm/jail to another physical machine - or to a 3rd party
cloud system without manual tweaking
Freebsd/opnsense support for vxlans is great for migrating whilst
keeping the same IP address even on systems spread across a few
different subnets in the underlying fabric.
(Not that DNS updates/ip changes aren't scriptable - but it's nice to
have the option to keep that significantly simpler )
Anyway.. all that goes to say I'm not sure what I'd be syncing on a
broad basis to these machines.
If I used multiple freebsd *desktop* systems it'd make sense I guess -
but my intention for most common things I need (generally scripts) is to
put them in gitlab and pull/push them as I need.
I think this is the sort of thing that would be easier for me to
digest/consider as a chat at a meetup.
Without the casual talking to people about different ways they do things
- I don't really get why certain things I do might be clumsy or better
solved in completely different ways.
There are so many (usually outdated) how-tos on the net, which are often
short on the 'why' you'd want to do it that way.
I'm left a little that way here regarding an 'ideal' filesystem too -
probably because I'm missing various bits of understanding about the way
people do things.
I would think that the ideal system is mainly something that doesn't get
in the way of upgrades and makes sense to the individual/admin
especially when something goes wrong - so that compounding errors aren't
made in a panic.
Another ideal might be one that's intuitive, say in a corporate
environment, for others to navigate their way around and understand
what should live where and why.
Presumably mindshare with others is a desirable feature ... hence I
guess trying not to violate the guidelines too much in 'man hier (7)'
makes some sense - even though I've never managed to understand its
logic fully.
I have a vm running nextcloud with which I sync various folders to
workstations for myself and others - and some generally-work-related
samba shares which I intend also to sync with nextcloud to make easy use
of some features such as OCR etc.
I'm probably just not yet using 'home' folders correctly in windows or
freebsd - so It's not immediately obvious to me what the scheme below
might do for me... and how one would create/maintain these symlinks for
other users.
Do they get a standard set of symlinks and that's it? What's to stop
users from just creating folders straight in home and making it a mess
because they're surprised something's not synced when one day they
needed it to be?
Ideally for me - the folders Documents, Pictures etc would be under a
subfolder, the name of which clearly indicates it's synchronised - but
I'm guessing that idea collides with the way most desktop systems work.
I just have a completely separate folder for people outside of home; the
entirety of which they know is synced... but that's probably only
passably ok because my users currently log in at dedicated
workstations... I guess I'll learn more about it when they need to have
hot desks :P
As always.. trying to see the bigger picture going forward is hard, and
it's sometimes easier to get stuck into building something that just
works reasonably for now.
I still don't know if that's entirely good or bad... perfect is the
enemy of the good and all that!
Cheers,
Julian
On 2022-05-26 5:46 pm, Mr Andrew Sinclair wrote:
> Given that the fate of this mailing list has come into question, I offer
> for debate, a map of an ideal file system.
>
> The gist of it is, (1) we start by adding a folder named /sole/ to the
> system root. This folder is always kept in sync between all hosts under
> your control via unison or syncthing. It will never be touched by the
> operating system. The /sole/ folder should contain no vendor
> interpretations of what should be in the user folder by default; Melodies,
> Pictures, .config, .local; that kind of thing. If it does contain any files
> influencing system activity, they would be symbolic links to files the
> operator is comfortable to synchronise in a heterogeneous environment. I
> keep my rclone configuration in such a folder.
>
> The /home/ folder retains its original purpose for system generated files
> deemed impractical for synchronisation; that is to say, application
> configuration and cache folders specific to one host.
>
> (2) We can then speculate on four root-level folders that ought to be seen
> on a NAS, running FreeBSD with a ZFS root ideally.
>
> YYYY,WW:2022,21;
> ________________
> /internet/
> ./file//
> ./archived//
> ./sqlite-autoconf-3380500.tar.gz ->
> ../../https/www.sqlite.org/2022/sqlite-autoconf-3380500.tar.gz
> ./backup//
> ./cygwin--setup-x86_64.exe ->
> ../../https/cygwin.com/setup-x86_64.exe
> ./curate//
> ./00, The Global Menu//
> ./10, Resource 1//
> ./cygwin--setup-x86_64.exe ->
> ../../https/cygwin.com/setup-x86_64.exe
> ./20, Resource 2//
> ./sqlite-autoconf-3380500.tar.gz ->
> ../../https/www.sqlite.org/2022/sqlite-autoconf-3380500.tar.gz
> ./99, your choice please//
> ./database//
> ./internet.sql
> ./internet.sqlite
> ./revision//
> ./github.com//
> ./git//
> ./git//
> ./svn.freebsd.org//
> ./base//
> ./stable//
> ./software//
> ./java//
> ./netbeans//
> ./eclipse//
> ./libreoffice//
> ./ftp//
> ./ftp.freebsd.org//
> ./pub//
> ./http//
> ./www.w3.org//
> ./standards//
> ./https//
> ./cygwin.com//
> ./setup-x86_64.exe
> ./www.sqlite.org//
> ./2022//
> ./sqlite-autoconf-3380500.tar.gz
>
> /intranet/
> ./0,common//
> ./file//
> ./archived//
> ./2000-00-00--00-00-00--mywork.txz
> ./backup//
> ./mywork.txz
> ./curate//
> ./00, The Regional Menu//
> ./10, Option 1//
> ./mywork.txz -> ../../backup/mywork.txz
> ./20, Option 2//
> ./2000-00-00--00-00-00--mywork.txz ->
> ../../archived/2000-00-00--00-00-00--mywork.txz
> ./99, your choice please//
> ./database//
> ./common.sql
> ./common.sqlite
> ./revision//
> ./myrepo//
> ./software//
> ./mysource//
> ./ftp//
> ./http//
> ./https//
> ./1,personal//
> ./2,professional//
> ./3,public//
> ./file//
> ./curate//
> ./00, The Public Menu//
> ./99, your choice please//
> ./database//
> ./public.sql
> ./public.sqlite
> ./ftp//
> ./http//
> ./https//
> ./afs//
> ./nfs//
>
> /host/
> ./$(hostname --domain)//
> ./$(hostname --short)//
> ./etc//
> ./var//
> ./home//
> ./cccc//
> ./.config//
> ./.local//
> ./tttt//
> ./.unison//
> ./____// -> ./cccc//
> ./@@@@// -> ./tttt//
> /user/
> ./home//
> ./cccc//
> ./.config//
> ./.local//
> ./Audios// -> ../../sole/cccc/common/Audios//
> ./Documents// -> ../../sole/cccc/document//
> ./Downloads// -> ../../sole/cccc/download//
> ./Music// -> ../../sole/cccc/common/Music//
> ./Pictures// -> ../../sole/cccc/common/Pictures//
> ./Videos// -> ../../sole/cccc/common/Videos//
> ./tttt//
> ./.unison//
> ./____// -> ./cccc//
> ./@@@@// -> ./tttt//
> ./sole//
> ./cccc//
> ./common//
> ./Audios//
> ./Melodies//
> ./MultiMedia//
> ./Pictures//
> ./Videos//
> ./config//
> ./dot//
> ./.config//
> ./.local//
> ./etc//
> ./zsh//
> ./document//
> ./ATO//
> ./IRS//
> ./download//
> ./file//
> ./paid-app//
> ./paid-pdf//
> ./ftp//
> ./http//
> ./https//
> ./tttt//
> ./dot//
> ./.emacs//
> ./.vim//
> ./etc//
> ./zfs//
> ./____// -> ./cccc//
> ./@@@@// -> ./tttt//
> ________________
> _______________________________________________
> BUGS mailing list
> BUGS at bugs.au.freebsd.org
> https://www.rulingia.com/mailman/listinfo/bugs
More information about the BUGS
mailing list