LINUX.ORG.RU
ФорумAdmin

Targetcli. Как разместить кеш на локальном диске клиента?

 


0

2

Здравствуйте.

Давно сделал для одной конторы ISCSI систему на основе targetcli. Делал по этому мануалу: http://etherboot.org/wiki/appnotes/cow

Заранее извиняюсь, в терминах могу путаться.

Система такая. Есть основной образ диска с установленными программами, они почти не меняются. Меняются кофиги, временные файлы, всякий мусор не критичный. Клиенты (Win), по ISCSI, подключают этот образ как диск и работают с этими прогами. Каждый раз, при начале рабочего дня, этот образ у клиента сбрасывается до оригинального. Всё работает без ошибок, все хорошо.

Но возникла проблема. Иногда клиентам не хватает места для кеша этого ISCSI диска. Клиенты забивают диск, выделенный для кеша клиентов, и targetcli зависает. Помогает ребут сервера и пересоздание лунов.

Возникла идей: у каждого клиента физически есть како-то диск. Можно ли клиентский кеш перенести на комп клиента?

Конфиг targetcli:


sysadmin@fserver:~$ sudo targetcli ls
o- / ......................................................................................................................... [...]
  o- backstores .............................................................................................................. [...]
  | o- block ................................................................................................ [Storage Objects: 101]
  | | o- client1 ........................................................ [/dev/mapper/lun0.img.cow.1 (2.7TiB) write-thru activated]
  | | o- client100 .................................................... [/dev/mapper/lun0.img.cow.100 (2.7TiB) write-thru activated]
  | | o- client101 .................................................... [/dev/mapper/lun0.img.cow.101 (2.7TiB) write-thru activated]
  | o- fileio ................................................................................................. [Storage Objects: 1]
  | | o- storage1 ............................................................... [/storage1/lun0.img (2.7TiB) write-back activated]
  | o- pscsi .................................................................................................. [Storage Objects: 0]
  | o- ramdisk ................................................................................................ [Storage Objects: 0]
  o- iscsi .......................................................................................................... [Targets: 102]
  | o- iqn.2019-02.pro.office24:1 ........................................................................................... [TPGs: 1]
  | | o- tpg1 ............................................................................................... [no-gen-acls, no-auth]
  | |   o- acls .......................................................................................................... [ACLs: 1]
  | |   | o- iqn.1991-05.com.microsoft:cl01 ...................................................................... [Mapped LUNs: 1]
  | |   |   o- mapped_lun0 ............................................................................... [lun0 block/client1 (rw)]
  | |   o- luns .......................................................................................................... [LUNs: 1]
  | |   | o- lun0 ..................................................................... [block/client1 (/dev/mapper/lun0.img.cow.1)]
  | |   o- portals .................................................................................................... [Portals: 1]
  | |     o- 0.0.0.0:3260 ..................................................................................................... [OK]
  | o- iqn.2019-02.pro.office24:100 ......................................................................................... [TPGs: 1]
  | | o- tpg1 ............................................................................................... [no-gen-acls, no-auth]
  | |   o- acls .......................................................................................................... [ACLs: 1]
  | |   | o- iqn.1991-05.com.microsoft:cl100 ..................................................................... [Mapped LUNs: 1]
  | |   |   o- mapped_lun0 ............................................................................. [lun0 block/client100 (rw)]
  | |   o- luns .......................................................................................................... [LUNs: 1]
  | |   | o- lun0 ................................................................. [block/client100 (/dev/mapper/lun0.img.cow.100)]
  | |   o- portals .................................................................................................... [Portals: 1]
  | |     o- 0.0.0.0:3260 ..................................................................................................... [OK]
  | o- iqn.2019-02.pro.office24:101 ......................................................................................... [TPGs: 1]
  | | o- tpg1 ............................................................................................... [no-gen-acls, no-auth]
  | |   o- acls .......................................................................................................... [ACLs: 1]
  | |   | o- iqn.1991-05.com.microsoft:work3 ...................................................................... [Mapped LUNs: 1]
  | |   |   o- mapped_lun0 ............................................................................. [lun0 block/client101 (rw)]
  | |   o- luns .......................................................................................................... [LUNs: 1]
  | |   | o- lun0 ................................................................. [block/client101 (/dev/mapper/lun0.img.cow.101)]
  | |   o- portals .................................................................................................... [Portals: 1]
  | |     o- 0.0.0.0:3260 ..................................................................................................... [OK]
  | o- iqn.2019-02.pro.office24:gserver ..................................................................................... [TPGs: 1]
  |   o- tpg1 ............................................................................................... [no-gen-acls, no-auth]
  |     o- acls .......................................................................................................... [ACLs: 1]
  |     | o- iqn.1991-05.com.microsoft:gserver .................................................................... [Mapped LUNs: 1]
  |     |   o- mapped_lun0 ............................................................................. [lun0 fileio/storage1 (rw)]
  |     o- luns .......................................................................................................... [LUNs: 1]
  |     | o- lun0 ........................................................................... [fileio/storage1 (/storage1/lun0.img)]
  |     o- portals .................................................................................................... [Portals: 1]
  |       o- 0.0.0.0:3260 ..................................................................................................... [OK]
  o- loopback ......................................................................................................... [Targets: 0]
  o- vhost ............................................................................................................ [Targets: 0]