Mounting a filesystem on a HAST provider without HAST (was: Re: HAST, zvols, istgt and carp working...)
Lorenzo Perone
lopez.on.the.lists at yellowspace.net
Fri Nov 28 11:16:32 UTC 2014
Hi All,
I succeeded on this topic, but a new question arose - so I'd like to
share the (provisory) solution as well as the question...
On 28.11.14 00:45, Lorenzo Perone wrote:
> Is there any way to mount the snapshot [of a provider used by hast] read only - or to have a 'hast'
> wrapper for the snapshot without having to really 'hast' it?
I was able to succeed after comparing a hexdump of the first few MBs of
the original zvol and the vol "under hast".
( /dev/zvol/rtank/vols/jail1 at hellotest vs. /dev/hast/jail1 )
The UFS filesystem on the zvol provider begins after 135168 bytes
(132KB) of hast-header.
So I tried to create a transparent provider with gnop:
gnop create -o 135168 /dev/zvol/rtank/vols/jail1 at hellotest
and the mount
mount -t ufs -o ro /dev/zvol/rtank/vols/jail1 at hellotest.nop /mnt
succeeded.
Now my new question is: Can I "safely" assume that this header is always
132K (I assume not - it probably contains the bitmap...)? In this case,
which formula should be applied to calculate the offset?
Thanks a lot in advance for any hint,
And to the FreeBSD team / pjd: THANKs for GEOM! :-)
It really is the best invention closely after espresso coffee...
Gretings and Regards,
More information about the freebsd-fs
mailing list