Skip to contentSkip to conversation

Writing to RBD image while it's snapshot is being created causes I/O errors

DISCUSSION Karol Jurak 2 participants 5 messages Jun 14, 2013 – Jun 18, 2013

lore
Share & tools
lore
#0 lore raw

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
#1 lore raw
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
#2 lore raw
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
#3 lore raw
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=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

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/s

This 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

#4 lore raw
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