I put the NAS on VLAN 11, so I added an eth0.vlan11 interface, a stanza for the 10.250.11.0/24 subnet in the dhcpd.conf and enabled eth0.11 in /etc/default/isc-dhcpd-server

/etc/network/interfaces
auto eth0 eth0.256 eth0.11
iface eth0 inet static
  address 198.51.100.33
  netmask 255.255.255.224

iface eth0.256 inet static
    address 10.250.0.10
    netmask 255.255.255.0

iface eth0.11 inet static
    address 10.250.11.10
    netmask 255.255.255.0
/etc/dhcp/dhcpd.conf
...
subnet 10.250.11.0 netmask 255.255.255.0 {
  # deny unknown-clients;
  range 10.250.11.100 10.250.11.200;
  default-lease-time 600;
  max-lease-time 7200;
  option routers 10.250.11.10;
}
...
/etc/default/isc-dhcp-server
INTERFACESv4="eth0 eth0.11 eth0.256"
INTERFACESv6=""


  • I found the IP the NAS was assigned through /var/log/syslog
  • Sep  9 16:51:02 deployer2 dhcpd[5461]: DHCPDISCOVER from b8:27:eb:0d:11:a4 via eth0.256: network 10.250.0.0/24: no free leases
    Sep  9 16:51:11 deployer2 dhcpd[5461]: DHCPREQUEST for 10.250.11.100 from 00:11:32:c7:89:69 (nas06) via eth0.11
    

    I could then redirect ports 5000 and 5001 to my worksation's loopback with ssh -L 5000:10.250.11.100:5000 -L 5001:10.250.11.100:5001 root@10.252.0.119 (10.252.0.119 is the deployer node's wifi address on my LAN) and then I could go to http://127.0.0.1:5000 and upload the Synology Disk Station Manager (DSM) software to the RS1219+, and configure a login and password. This login and password can also be used on the serial interface set up in the pxe booting openbsd post.

    Preparing the Synology for ESXi

    What follows is a bunch of pointy-clicky screen shots. It's by far the most tedious part of setting up the cratacenter but what it's doing in the background is just: Bonding the ethernet interfaces into a single 4GB link; Creating a RAID 6 volume; laying out one big (ext4) filesystem; Creating 2TB iSCSI volumes backed by 1TB files; Mapping those iSCSI volumes to iSCSI targets using CHAP authentication;

    1. Bond the interfaces and set the IP statically
    2. Configure the port-channel group on the switch
    3. switch link-aggregation
      configure
      
      interface lag 1
      vlan pvid 11
      vlan ingressfilter
      vlan participation include 11
      exit
      
      interface 0/30
      addport 3/1
      exit
      
      interface 0/32
      addport 3/1
      exit
      
      interface 0/34
      addport 3/1
      exit
      
      interface 0/36
      addport 3/1
      exit
      
      exit
      
    4. Add a storage pool
    5. What it's doing internally:
      # storage pool creation:
      root@nas06:~# cat /proc/mdstat
      Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
      md2 : active raid6 sdh3[7] sdg3[6] sdf3[5] sde3[4] sdd3[3] sdc3[2] sdb3[1] sda3[0]
            46855227264 blocks super 1.2 level 6, 64k chunk, algorithm 2 [8/8] [UUUUUUUU]
            [>....................]  resync =  0.2% (18596448/7809204544) finish=1182.4min speed=109803K/sec
      
      md1 : active raid1 sda2[0] sdb2[1] sdc2[2] sdd2[3] sde2[4] sdf2[5] sdg2[6] sdh2[7]
            2097088 blocks [8/8] [UUUUUUUU]
      
      md0 : active raid1 sda1[0] sdb1[1] sdc1[2] sdd1[3] sde1[4] sdf1[5] sdg1[6] sdh1[7]
            2490176 blocks [8/8] [UUUUUUUU]
      
      unused devices: <none>
      
    6. Create an volume for our iSCSI LUNs
    7. What it's doing internally:
      # volume creation:
      27922 root      20   0   46.2m  24.2m 100.0  1.2   0:14.82 R /sbin/mkfs.ext4 /dev/md2 -F -P
      
      df -h
      Filesystem      Size  Used Avail Use% Mounted on
      /dev/md0        2.3G  970M  1.3G  44% /
      none            990M     0  990M   0% /dev
      /tmp            994M  936K  993M   1% /tmp
      /run            994M  5.4M  989M   1% /run
      /dev/shm        994M  4.0K  994M   1% /dev/shm
      none            4.0K     0  4.0K   0% /sys/fs/cgroup
      cgmfs           100K     0  100K   0% /run/cgmanager/fs
      /dev/md2         44T   42M   44T   1% /volume1
      
    8. Create an iSCSI target for each LUN
    9. What it's doing internally:
      root@nas06:/# cat /usr/syno/etc/iscsi_target.conf
      
      [iSCSI_T1]
              authen=yes
              max_sessions=1
              network_portals={all}:3260
              tid=1
              data_chksum=no
              recv_seg_bytes=262144
              enabled=yes
              mutual_password=
              username=target601
              mutual=no
              iqn=iqn.2000-01.com.synology:nas06.Target-1.4dadffc044
              mutual_username=
              name=target601
              hdr_chksum=no
              send_seg_bytes=262144
              bkp_obj=0
              password=REDACTED
      [iSCSI_T2]
              authen=yes
              max_sessions=1
              network_portals={all}:3260
              tid=2
              data_chksum=no
              recv_seg_bytes=262144
              enabled=yes
              mutual_password=
              username=target602
              mutual=no
              iqn=iqn.2000-01.com.synology:nas06.Target-11.4dadffc044
              mutual_username=
              name=target602
              hdr_chksum=no
              send_seg_bytes=262144
              bkp_obj=0
              password=REDACTED
      
    10. Carve out iSCSI LUNs and attach to each target
    11. What it's doing internally:
      # iscsi LUNs
      root@nas06:/# cat volume1/\@iSCSI/LUN/iscsi_lun.conf
      
      [LUN_3ec15f8f-4819-42f0-b476-ad9a5754e781]
              lid=1
              pre_alloc=yes
              devtype=1
              rootpath=/volume1
              restored_time=0
              uuid=3ec15f8f-4819-42f0-b476-ad9a5754e781
              vpd_unit_serial=3ec15f8f-4819-42f0-b476-ad9a5754e781
              dev_attribs=emulate_3pc:0,emulate_tpws:0,emulate_caw:1,emulate_tpu:0,can_snapshot:0
              bytes=2199023255552
              name=LUN-601
              bkp_obj=0
              vaai_support=no
      [LUN_e175adc9-b64e-45e8-815a-aa455cc3ca6a]
              lid=2
              pre_alloc=yes
              devtype=1
              rootpath=/volume1
              restored_time=0
              uuid=e175adc9-b64e-45e8-815a-aa455cc3ca6a
              vpd_unit_serial=e175adc9-b64e-45e8-815a-aa455cc3ca6a
              dev_attribs=emulate_3pc:0,emulate_tpws:0,emulate_caw:1,emulate_tpu:0,can_snapshot:0
              bytes=2199023255552
              name=LUN602
              bkp_obj=0
              vaai_support=no
      
      
      root@nas06:/# ls -lh /volume1/\@iSCSI/LUN/FILE/3ec15f8f-4819-42f0-b476-ad9a5754e781/LUN-601_0000*
      -rw-r--r-- 1 root root 1.0T Sep 12 09:38 /volume1/@iSCSI/LUN/FILE/3ec15f8f-4819-42f0-b476-ad9a5754e781/LUN-601_00000
      -rw-r--r-- 1 root root 1.0T Sep 12 09:38 /volume1/@iSCSI/LUN/FILE/3ec15f8f-4819-42f0-b476-ad9a5754e781/LUN-601_00001
      
      root@nas06:/# ls -lh /volume1/\@iSCSI/LUN/FILE/e175adc9-b64e-45e8-815a-aa455cc3ca6a/LUN602_0000*
      -rw-r--r-- 1 root root 1.0T Sep 12 09:50 /volume1/@iSCSI/LUN/FILE/e175adc9-b64e-45e8-815a-aa455cc3ca6a/LUN602_00000
      -rw-r--r-- 1 root root 1.0T Sep 12 09:50 /volume1/@iSCSI/LUN/FILE/e175adc9-b64e-45e8-815a-aa455cc3ca6a/LUN602_00001
      

    I have 21 LUNS of 2TB each when I'm done. I typically create a NFS volume called LUN_600 from whatever is left that's less than 2TB, in this case it was about 1.4 TB. The iSCSI volumes were all thick-provisioned so filling up the NFS accidentally will have no impact on their available storage.