LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cannot restore targetcli configuration after centOS 7 server reboot. (https://www.linuxquestions.org/questions/linux-newbie-8/cannot-restore-targetcli-configuration-after-centos-7-server-reboot-4175601670/)

ahmedjaad 03-13-2017 11:15 AM

Cannot restore targetcli configuration after centOS 7 server reboot.
 
Hi all, this is my first question.
I had a working targetcli configuration, with LVM logical volumes as block storage devices, and on an initiator machine this target is discoverable, basically the setup was working fine, now i after the centOS7 server was rebooted, targetcli configuration got lost, and when i try to restore the configuration with
Code:

targetcli restoreconfig <backupFile>
out message is
Code:

storageobjects or targets present, not restoring
Code:

targetcli ls
o- / ................................................................................................ [...]
  o- backstores ..................................................................................... [...]
  | o- block ......................................................................... [Storage Objects: 0]
  | o- fileio ........................................................................ [Storage Objects: 0]
  | o- pscsi ......................................................................... [Storage Objects: 0]
  | o- ramdisk ....................................................................... [Storage Objects: 0]
  o- iscsi ................................................................................... [Targets: 1]
  | o- iqn.2017-01.com.urgroup-tz:target ........................................................ [TPGs: 1]
  |  o- tpg1 ...................................................................... [no-gen-acls, no-auth]
  |    o- acls ................................................................................. [ACLs: 1]
  |    | o- iqn.2017-01.com.urgroup-tz:initiator ........................................ [Mapped LUNs: 0]
  |    o- luns ................................................................................. [LUNs: 0]
  |    o- portals ........................................................................... [Portals: 1]
  |      o- 0.0.0.0:3260 ............................................................................ [OK]
  o- loopback ................................................................................ [Targets: 0]

Code:

# systemctl status -l target
● target.service - Restore LIO kernel target configuration
  Loaded: loaded (/usr/lib/systemd/system/target.service; enabled; vendor preset: disabled)
  Active: active (exited) since Ij 2017-03-10 17:18:43 EST; 1 day 18h ago
 Main PID: 1342 (code=exited, status=0/SUCCESS)
  CGroup: /system.slice/target.service

Mac 10 17:18:43 server1 target[1342]: Could not create StorageObject tools_disk: Cannot configure StorageObject because device /dev/cl/tools_lv is already in use, skipped
Mac 10 17:18:43 server1 target[1342]: Could not create StorageObject bamboo_disk: Cannot configure StorageObject because device /dev/cl/bamboo_lv is already in use, skipped
Mac 10 17:18:43 server1 target[1342]: Could not create StorageObject metadata_disk: Cannot configure StorageObject because device /dev/cl/ovirt_domain_metadata is already in use, skipped
Mac 10 17:18:43 server1 target[1342]: Could not find matching StorageObject for LUN 2, skipped
Mac 10 17:18:43 server1 target[1342]: Could not find matching StorageObject for LUN 1, skipped
Mac 10 17:18:43 server1 target[1342]: Could not find matching StorageObject for LUN 0, skipped
Mac 10 17:18:43 server1 target[1342]: Could not find matching TPG LUN 0 for MappedLUN 0, skipped
Mac 10 17:18:43 server1 target[1342]: Could not find matching TPG LUN 1 for MappedLUN 1, skipped
Mac 10 17:18:43 server1 target[1342]: Could not find matching TPG LUN 2 for MappedLUN 2, skipped
Mac 10 17:18:43 server1 systemd[1]: Started Restore LIO kernel target configuration.


dijetlo 03-15-2017 12:02 PM

Hey Ahmedjaad welcome to Linux questions.

It sounds like you have a running config in place...
Quote:

storageobjects or targets present, not restoring
You'll have to clear the configuration first with
"targetcli clearconfig confirm=true"
and then you should be able to restore your configuration

Hope that helps :)

ahmedjaad 03-30-2017 03:57 AM

thanks for your response dijetlo, actually i did try that and it never helped


All times are GMT -5. The time now is 05:20 AM.