Writing to RBD image while it's snapshot is being created causes I/O errors
Hi,
I noticed that writing to RBD image using kernel driver while it's snapshot is being created causes I/O errors and the filesystem (reiserfs) eventually aborts and remounts itself in read-only mode:
[192507.327359] end_request: I/O error, dev rbd7, sector 818528 [192507.331510] end_request: I/O error, dev rbd7, sector 819200 [192507.348478] end_request: I/O error, dev rbd7, sector 408 [192507.352647] REISERFS abort (device rbd7): Journal write error in
flush_commit_list
Is this happening by design or is it a bug? I know that I should freeze the filesystem before attempting to create a snapshot but these I/O errors seem unnecessary to me. If it's really impossible to write to an image while it's snapshot is being created couldn't write requests be blocked until snapshotting completes?
I'm using ceph 0.56.6 and kernel 3.4.48.
Signature · 1 line
Karol Jurak
Quoted 12 lines · Karol Jurak
Hi,
I noticed that writing to RBD image using kernel driver while it's snapshot is being created causes I/O errors and the filesystem (reiserfs) eventually aborts and remounts itself in read-only mode:
[192507.327359] end_request: I/O error, dev rbd7, sector 818528 [192507.331510] end_request: I/O error, dev rbd7, sector 819200 [192507.348478] end_request: I/O error, dev rbd7, sector 408 [192507.352647] REISERFS abort (device rbd7): Journal write error in
flush_commit_list
Quoted 7 lines
Is this happening by design or is it a bug? I know that I should freeze the filesystem before attempting to create a snapshot but these I/O errors seem unnecessary to me. If it's really impossible to write to an image while it's snapshot is being created couldn't write requests be blocked until snapshotting completes?
I'm using ceph 0.56.6 and kernel 3.4.48.
This is definitely a bug; you should be able to create a snapshot at any time. After a rollback, it should look (to the fs) like a crash or power cycle.
How easy is this to reproduce? Does it happen every time?
sage
Quoted 9 lines
Signature · 6 lines
-- Karol Jurak -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 10 lines · On Friday 14 of June 2013 08:56:55 Sage Weil wrote:
Quoted 3 lines · Karol Jurak
I noticed that writing to RBD image using kernel driver while it's snapshot is being created causes I/O errors and the filesystem (reiserfs) eventually aborts and remounts itself in read-only mode:
This is definitely a bug; you should be able to create a snapshot at any time. After a rollback, it should look (to the fs) like a crash or power cycle.
How easy is this to reproduce? Does it happen every time?
I can reproduce it in the following way:
# rbd create -s 10240 test # rbd map test # mkfs -t reiserfs /dev/rbd/rbd/test # mount /dev/rbd/rbd/test /mnt/test # dd if=/dev/zero of=/mnt/test/a bs=1M count=1024
and in another shell while dd is running:
# rbd snap create test@snap1
After 2 or 3 seconds dmesg shows I/O errors:
[429532.259910] end_request: I/O error, dev rbd1, sector 1384448 [429532.272554] end_request: I/O error, dev rbd1, sector 872 [429532.275556] REISERFS abort (device rbd1): Journal write error in
flush_commit_list
and dd fails:
dd: writing `/mnt/test/a': Cannot allocate memory 590+0 records in
589+0 records out
618225664 bytes (618 MB) copied, 15.8701 s, 39.0 MB/s
This happens every time I repeat the test.
Signature · 1 line
Karol Jurak
Quoted 31 lines · Karol Jurak
Quoted 10 lines · On Friday 14 of June 2013 08:56:55 Sage Weil wrote:
Quoted 3 lines · Karol Jurak
I noticed that writing to RBD image using kernel driver while it's snapshot is being created causes I/O errors and the filesystem (reiserfs) eventually aborts and remounts itself in read-only mode:
This is definitely a bug; you should be able to create a snapshot at any time. After a rollback, it should look (to the fs) like a crash or power cycle.
How easy is this to reproduce? Does it happen every time?
I can reproduce it in the following way:
# rbd create -s 10240 test # rbd map test # mkfs -t reiserfs /dev/rbd/rbd/test # mount /dev/rbd/rbd/test /mnt/test # dd if=/dev/zero of=/mnt/test/a bs=1M count=1024and in another shell while dd is running:
# rbd snap create test@snap1After 2 or 3 seconds dmesg shows I/O errors:
[429532.259910] end_request: I/O error, dev rbd1, sector 1384448 [429532.272554] end_request: I/O error, dev rbd1, sector 872 [429532.275556] REISERFS abort (device rbd1): Journal write error in
flush_commit_list
Quoted 8 lines
and dd fails:
dd: writing `/mnt/test/a': Cannot allocate memory 590+0 records in
589+0 records out
618225664 bytes (618 MB) copied, 15.8701 s, 39.0 MB/sThis happens every time I repeat the test.
What kernel version are you using? I'm not able to reproduce this with ext4 or reiserfs and many snapshots over several minutes of write workload.
sage
Quoted 3 lines · On Monday 17 of June 2013 21:25:49 Sage Weil wrote:
What kernel version are you using? I'm not able to reproduce this with ext4 or reiserfs and many snapshots over several minutes of write workload.
I'm using vanilla 3.4.48. However, this bug must already have been fixed in 3.6.11 because everything worked fine when I tested this version today.
Signature · 1 line
Karol Jurak