Oh dear, christmas/yule and all ignore the old bad patches in the previous mail and use these instead sorry for the confusion I recently switched to a different directory for the tgtd sources and didnt realize i was still defaulting to the old tgtd directory with an ancient patch. regards ronnie sahlberg On Sat, Dec 24, 2011 at 5:38 PM, ronnie sahlberg <ronniesahlberg@xxxxxxxxx> wrote: > Tomo, List > > Please find attached a patch to tgtadm to allow to create a new LUN > without a backingstore > if the device type is MMC. > > > This means that the LUN will be created, but no media is loaded, like > a CD/DVD which does not yet have a disk inserted. > This is useful both for scripts where you want to add media at a later > stage, but also for Jukeboxes where you probably want the initial > state of the system to be a reader without media mounted but lots of > media mounted in the storage slots, to later be moved to the reader > using the mtx command. > > > > Maybe this should also allow creation of a LUN without media for SSC too? > > > regards > ronnie sahlberg
From 33fa2ee29adfcaba5e89fcc6aecf737f4a2cfc38 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx> Date: Sat, 24 Dec 2011 13:02:06 +1100 Subject: [PATCH] TGTADM: Allow creating CD/DVD devices that do not have a backingstore Signed-off-by: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx> --- usr/tgtadm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/usr/tgtadm.c b/usr/tgtadm.c index 41e9e99..7dca0f8 100644 --- a/usr/tgtadm.c +++ b/usr/tgtadm.c @@ -779,7 +779,7 @@ int main(int argc, char **argv) "allowed/supported\n", rc); exit(EINVAL); } - if (!path) { + if (!path && dev_type != TYPE_MMC) { eprintf("'backing-store' option " "is necessary\n"); exit(EINVAL); -- 1.7.3.1
Attachment:
0001-TGTADM-Allow-creating-CD-DVD-devices-that-do-not-hav.patch.gz
Description: GNU Zip compressed data