Mikhail Karpov, le mar. 26 mai 2026 18:30:51 +0700, a ecrit: > On Mon, 25 May 2026 22:27:53 Samuel Thibault wrote: > > > This way of managing the multiple disks seems to me it would be > > confusing for users, and doing more than it should be. We of course > > don't want to require users to set a partfs translator by hand with > > the enumeration of the disks to be handled, we want that to be > > automatic. And if we make it automatic, just numbering the entries > > inside the partfs directory will prevent users from knowing what these > > devices actually are: usb sticks, sata disks, etc. I believe we do want > > to keep the underlying driver device name such as wd0. But then it's not > > really useful to have just one partfs that would contain all disks, we > > can as well just have one partfs per disk. > > Why not create a separate directory with the partfs translator for each type > of media? The hd/ directory for disks, the usb/ directory for usb, and so > on?
Because that would mean having to teach partfs what all these are, and thus centralize there the notion of what kind of disk could exist. While with storeio, one can have a low-level device in another translator (e.g. rumpdisk), and encode the notion of what kind of disk exists as something that sets up storeio translators. ATM it's a mere static encoding in /dev, but it could be a devprobe translator, one set up for hd disks, one for usb disks, etc. and you get flexibility encoded outside the translators rather than hard-coded inside translators. > > These are replicating a lot of the storeio logics, which we'd rather > > avoid, to avoid having yet more code to maintain. We can just migrate > > storeio into using netfs rather than trivfs, and make its root behave > > like before, except it additionally implements get_dirents, and the > > nodes thusly exposed can behave like a parted-based storeio. Essentially > > that's a convergence of your current partfs and the existing storeio, > > throwing away some parts of each. > > I think that's the right approach. The only question is about the storeio > translator launch parameters: should keep the part:N:file:/root/... > mechanism > or open partitions automatically? It can open partitions automatically when a node is looked up inside the directory. > > And notably that does get sense: if the disk is not partitioned, it's > > not a "directory" :) > > I hadn't thought about that. Do you mean the disk has a GPT partitioning > system, but no partitions? No, just no partitioning at all. Think mke2fs /dev/hd0 Samuel
