On Tue, Dec 07, 2021 at 12:18:30PM -0600, Brady Pratt wrote:> [ ? ?1.998352] >>>WARNING<<< Wrong ufstype may corrupt your filesystem, default > is ufstype=oldThe problem is this one and it's not easily resolvable. UFS isn't a single filesystem type, it's a clade of filesystems which all evolved from a common ancestor through the various BSDs, but crucially have the same magic number (so no way to differentiate them). For *BSD itself this isn't a problem since the same OS creates and consumes the filesystem. But it's a problem for Linux which must be told which filesystem type to mount - and get it wrong, as you can see above, Bad Things happen. So it's not really possible to resolve this in libguestfs as we don't know the filesystem type until after we have mounted and inspected it. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
Thank you for the explanation! On Wed, Dec 8, 2021 at 4:52 AM Richard W.M. Jones <rjones at redhat.com> wrote:> On Tue, Dec 07, 2021 at 12:18:30PM -0600, Brady Pratt wrote: > > [ 1.998352] >>>WARNING<<< Wrong ufstype may corrupt your filesystem, > default > > is ufstype=old > > The problem is this one and it's not easily resolvable. UFS isn't a > single filesystem type, it's a clade of filesystems which all evolved > from a common ancestor through the various BSDs, but crucially have > the same magic number (so no way to differentiate them). For *BSD > itself this isn't a problem since the same OS creates and consumes the > filesystem. But it's a problem for Linux which must be told which > filesystem type to mount - and get it wrong, as you can see above, Bad > Things happen. > > So it's not really possible to resolve this in libguestfs as we don't > know the filesystem type until after we have mounted and inspected it. > > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat > http://people.redhat.com/~rjones > Read my programming and virtualization blog: http://rwmj.wordpress.com > virt-builder quickly builds VMs from scratch > http://libguestfs.org/virt-builder.1.html > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libguestfs/attachments/20211208/6aa79b3b/attachment.htm>
On 12/08/21 11:52, Richard W.M. Jones wrote:> On Tue, Dec 07, 2021 at 12:18:30PM -0600, Brady Pratt wrote: >> [ ? ?1.998352] >>>WARNING<<< Wrong ufstype may corrupt your filesystem, default >> is ufstype=old > > The problem is this one and it's not easily resolvable. UFS isn't a > single filesystem type, it's a clade of filesystems which all evolved > from a common ancestor through the various BSDs, but crucially have > the same magic number (so no way to differentiate them). For *BSD > itself this isn't a problem since the same OS creates and consumes the > filesystem.(I think it *should* be considered a problem even for the *BSDs; what about moving disks between different BSD versions or flavors?)> But it's a problem for Linux which must be told which > filesystem type to mount - and get it wrong, as you can see above, Bad > Things happen. > > So it's not really possible to resolve this in libguestfs as we don't > know the filesystem type until after we have mounted and inspected it. > > Rich. >