Re: How can I reload LIO/target-cli?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sebastian,

On Tue, 2015-05-05 at 03:18 +0200, Sebastian Nielsen wrote:
> I have a LIO iSCSI target with disks that are mounted/initalized AFTER boot 
> with the help of a rc.local script. (eg, they don’t exist in /dev at all 
> until some commands has been run)
> 
> However, when LIO loads at boot, it finds that the backstores are 
> nonexistant, and deletes them, causing the connected LUNs to be invalid.
> Is it some way to disable this behaviour, so it keeps non-existant drives in 
> /backstores, AND is it possible in some way to reload LIO with the help of a 
> command? (that I can put in the rc.local script once all disks in /dev has 
> been bringed up).

If it's simply a manner of running a script that blocks until your
backstores are available (eg: it's not dynamic callbacks), then it
sounds like you want to add a init script for your /etc/rc.local
commands, and put it's boot priority ahead of /etc/init.d/target start
being invoked.

Invoking /etc/init.d/target restart is available too.

> Clearing LIO (deleting all backstores, target and LUNS) and then 
> reinitalizing the LIO with new backstores and LUNS in the rc.local script 
> are acceptable too, if they can be done entirely from a script. Seems I need 
> to echo things into target-cli right?
> 

Calling targetcli with parameters is one way to do this.

You can also use python-rtslib directly to create some simple custom
scripts invoked by shell scripts too.

--nab

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux