Code:
root@34compiler:~# mount -t gfs2 /dev/vdb1 /gfs/
root@34compiler:~# mkfs.gfs2 -p lock_nolock -t test:testfs -j 1 /dev/vdb1
It appears to contain an existing filesystem (gfs2)
This will destroy any data on /dev/vdb1
Are you sure you want to proceed? [y/n]y
Device: /dev/vdb1
Block size: 4096
Device size: 32.00 GB (8388347 blocks)
Filesystem size: 32.00 GB (8388346 blocks)
Journals: 1
Resource groups: 129
Locking protocol: "lock_nolock"
Lock table: "test:testfs"
UUID: 55618364-f327-8437-fdc5-2ad07bcba095
root@34compiler:~# umount /gfs
root@34compiler:~# mount -t gfs2 /dev/vdb1 /gfs/
root@34compiler:~# cd /gfs/
root@34compiler:/gfs# ls
root@34compiler:/gfs# touch test
root@34compiler:/gfs# rm test
root@34compiler:/gfs# ls
root@34compiler:/gfs# dd if=/dev/zero of=test.file count=1 bs=100M
1+0 records in
1+0 records out
104857600 bytes (105 MB) copied, 0.855919 s, 123 MB/s
root@34compiler:/gfs# ls
test.file
root@34compiler:/gfs# rm test.file
root@34compiler:/gfs# ls
root@34compiler:/gfs#
root@34compiler:/gfs# uname -a
Linux 34compiler 3.10.0-11-pve #1 SMP Tue Jul 21 08:59:46 CEST 2015 x86_64 GNU/Linux
I use a VM with a virtual disk.
But now also tried your way with a zeroed file, works too...