[Stgt-devel] disabling write cache?

FUJITA Tomonori fujita.tomonori
Sun Jun 29 10:02:56 CEST 2008


From: Tomasz Chmielewski <mangoo at wpkg.org>
Subject: Re: [Stgt-devel] disabling write cache?
Date: Wed, 25 Jun 2008 15:39:21 +0200

> FUJITA Tomonori schrieb:
> 
> (...)
> 
> > I've uploaded two patches:
> > 
> > http://stgt.berlios.de/patches/0001-iscsi-fix-sense-handling.patch
> > http://stgt.berlios.de/patches/0002-sbc-add-WCE-support-to-bs_rdwr.patch
> 
> > With the patches, you can disable write caching in the following way:
> > 
> > tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun 1 --params mode_page=8:0:18:0x10:0:0xff:0xff:0:0:0xff:0xff:0xff:0xff:0x80:0x14:0:0:0:0:0:0
> > 
> > Note that you need to modify tid and lun in your environment.
> 
> Any chance of having it more human-readable? I.e. something similar to 
> "--params write_cache=disable" instead of 8:0:18:0x10:0:0xff:0xff:0:...?

I don't think it's a good idea. If we create aliases like that, we
have tons of options.

sdparm is a proper interface.

We provide target administrators another interfaces (tgtadm), which
enables them to do whatever they want. They can write their own shell
scripts (or whatever) that make their work simpler.


> > Shortly, I'll let you control write caching via sdparm too.
> 
> Great!
> Could you notify the list when controlling via sdparm hits the git tree?

Done, cay you try the latest git tree or snapshot:

http://stgt.berlios.de/releases/tgt-20080629.tar.bz2



More information about the stgt mailing list