Lvm – CentOS7 Targetcli Configuration lost after server reboot

centos7iscsilvmopen-iscsi

Targetcli configuration got lost after server was rebooted, i tried to restore configuration from backup files with targetcli restoreconfig <backupFile> configuration is not restored output message of the command storageobjects or targets present, not restoring. below are outputs of targetcli ls and systemctl status -l target

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]

# 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.

Best Answer

Ensure the service is enabled before you reboot:

systemctl enable target

Helps here.

mistige

Related Topic