-
Notifications
You must be signed in to change notification settings - Fork 63
Description
As #341 has been resolved, it would be useful to be able to create a gfs2 filesystem with the storage role. The current difficulty for the gfs2 role is that the storage role does not allow creating a volume without a filesystem, so the gfs2 role would have to allow an xfs filesystem to be created and then overwrite it with a gfs2 filesystem, which is not ideal, particularly for idempotency.
So it seems the best option* is for the storage role to create the filesystem with fs_type: gfs2 and accept the special options that mkfs.gfs2 requires. The existing fs_create_options option should be sufficient for this, e.g. fs_create_options: -j 2 -t mycluster:myfs
For single-node, not-clustered mount testing (only) you could use fs_create_options: -p lock_nolock
I don't know if blivet would need changes to support this, but there appears to be at least a stub of support for gfs2 already: https://github.com/storaged-project/blivet/blob/master/blivet/formats/fs.py#L1044
* If the storage role does not manage idempotency for filesystem creation, it would be preferable (to avoid data loss) for the gfs2 role if the storage role instead allowed fs_type: none so that the gfs2 role can manage it itself.