coreos / torus

Torus Distributed Storage
https://coreos.com/blog/torus-distributed-storage-by-coreos.html
Apache License 2.0
1.78k stars 172 forks source link

tcmu: failed to first mount after mkfs without stopping torusblk #416

Open nak3 opened 7 years ago

nak3 commented 7 years ago

version:

steps to reproduce

1. create block volume and start torusblk

./bin/torusctl volume create-block test3 3GiB

$ sudo ./bin/torusblk tcmu test3 --debug

  ...

Attached to /dev/torus/test3. Server loop begins ...

2. mkfs to the new volume

sudo mkfs.ext4 /dev/torus/test3

3. Try to mount the volume

mount /dev/torus/test3 -o discard,noatime  /mnt/torus

actual result.

client (mount command) side

# mount /dev/torus/test3 -o discard,noatime  /mnt/torus
mount: wrong fs type, bad option, bad superblock on /dev/torus/test3,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.

server (torusblk) side

  ...
Attached to /dev/torus/test3. Server loop begins ...
2016-12-02 09:41:56.462615 D | tcmu: syncing
2016-12-02 09:41:56.462637 D | block: Syncing block volume: test3
2016-12-02 09:41:56.477044 D | tcmu: syncing
2016-12-02 09:41:56.477216 D | block: Syncing block volume: test3

2016-12-02 09:42:14.888461 W | blockset: crc: block 2 did not pass crc
2016-12-02 09:42:14.888657 D | blockset: crc: 75660aac should be ca35130
data : [0 0 0 0 0 0 0 0 0 0]

ERRO[0023] read/read failed: unable to copy enough       source=cmd_handler.go:334
2016-12-02 09:42:14.893346 W | blockset: crc: block 2 did not pass crc
2016-12-02 09:42:14.893699 D | blockset: crc: 75660aac should be ca35130
data : [0 0 0 0 0 0 0 0 0 0]

ERRO[0023] read/read failed: unable to copy enough       source=cmd_handler.go:334
2016-12-02 09:42:14.900171 W | blockset: crc: block 3 did not pass crc
2016-12-02 09:42:14.900436 D | blockset: crc: 75660aac should be 12472640
data : [0 0 0 0 0 0 0 0 0 0]

ERRO[0023] read/read failed: unable to copy enough       source=cmd_handler.go:334
2016-12-02 09:42:14.901400 W | blockset: crc: block 3 did not pass crc
2016-12-02 09:42:14.901579 D | blockset: crc: 75660aac should be 12472640
data : [0 0 0 0 0 0 0 0 0 0]

ERRO[0023] read/read failed: unable to copy enough       source=cmd_handler.go:334
2016-12-02 09:42:14.905834 W | blockset: crc: block 3 did not pass crc
2016-12-02 09:42:14.905965 D | blockset: crc: 75660aac should be 12472640
data : [0 0 0 0 0 0 0 0 0 0]

additional info