Project

General

Profile

Actions

Support #62864

open

how to set default write cache mode as "write through" after rbd-nbd mapped a image

Added by Kangxi Peng 8 months ago. Updated 8 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Tags:
Reviewed:
Affected Versions:
Pull request ID:

Description

before mapping a image, I set the ndb device's writie cache as "write through", like below:

# echo "write through" > /sys/block/nbd0/queue/write_cache
# cat /sys/block/nbd0/queue/write_cache
write through
# 

but after rbd-nbd map, it will be change to "write back":

# cat /sys/block/nbd0/queue/write_cache
write through
# 

anyone who can offer some advice? thanks

Actions #1

Updated by Kangxi Peng 8 months ago

Sorry, I posted the result incorrectly.

before mapping an image, I set the ndb device's writie cache as "write through", like below:

# echo "write through" > /sys/block/nbd0/queue/write_cache
# cat /sys/block/nbd0/queue/write_cache
write through
# 

but after rbd-nbd map, it will be changed to "write back":

# cat /sys/block/nbd0/queue/write_cache
write back
# 

Actions

Also available in: Atom PDF