Ritesh Raj Sarraf: LIO -fb in Debian
LIO -fb is the new SCSI Target for Debian. Previously, we maintained the LIO tools from the pre-fork upstream branch. But, with good reasons, we've now moved to the newer -fb (Free Branch).
As the maintainer for those pacakges, I have a local LIO setup. Overy the years, I've been tuning and using this setup with a bunch of SCSI clients. Now with the new -fb packages it was worrisome for me, on how to migrate (Note: migration is not supported by the Debian packages) my old setup to the new one.
Thanks to Andy Grover for mentioning it, migrating your configuration is doable. With some minor intervention, I was able to switch my config from old LIO setup to the new LIO -fb pacakges. As you can see from the output below, both the outputs look the same, which is a good thing.
LIO reads its configuration from /etc/target/ and passes it into the kernel. The kernel loads the config. The real time config is present in configfs, within the kernel. Users willing for such migration need to ensure that the loaded config data remains in configfs. And then, using the new -fb tools (targetctl), the configuration data needs to be read and written to a new format in /etc/.
/> ls
o- / ......................................................................................................................... [...]
o- backstores .............................................................................................................. [...]
o- fileio ................................................................................................... [0 Storage Object]
o- iblock .................................................................................................. [4 Storage Objects]
o- CENTOS ................................................................................................. [/dev/vdd, in use]
o- SAN1 ................................................................................................... [/dev/vdb, in use]
o- SAN2 ................................................................................................... [/dev/vdc, in use]
o- SANROOT .............................................. [/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-0, in use]
o- pscsi .................................................................................................... [0 Storage Object]
o- rd_mcp ................................................................................................... [0 Storage Object]
o- ib_srpt ........................................................................................................... [0 Targets]
o- iscsi ............................................................................................................. [3 Targets]
o- iqn.1994-05.com.redhat:23d8eb7fa1fc ................................................................................. [1 TPG]
o- tpg1 ............................................................................................................ [enabled]
o- acls ............................................................................................................ [1 ACL]
o- iqn.1994-05.com.redhat:23d8eb7fa1fc .................................................................... [1 Mapped LUN]
o- mapped_lun0 ............................................................................................. [lun0 (rw)]
o- luns ............................................................................................................ [1 LUN]
o- lun0 ....................................................................................... [iblock/CENTOS (/dev/vdd)]
o- portals ..................................................................................................... [4 Portals]
o- 172.16.20.40:3260 ................................................................................. [OK, iser disabled]
o- 172.16.20.41:3260 ................................................................................. [OK, iser disabled]
o- 172.16.20.42:3260 ................................................................................. [OK, iser disabled]
o- 172.16.20.43:3260 ................................................................................. [OK, iser disabled]
o- iqn.2003-01.org.linux-iscsi.debian.sanboot .......................................................................... [1 TPG]
o- tpg1 ............................................................................................................ [enabled]
o- acls ............................................................................................................ [1 ACL]
o- iqn.2005-03.org.open-iscsi:fd2bc2f4652a-sanboot ........................................................ [1 Mapped LUN]
o- mapped_lun0 ............................................................................................. [lun0 (rw)]
o- luns ............................................................................................................ [1 LUN]
o- lun0 .................................... [iblock/SANROOT (/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-0)]
o- portals ..................................................................................................... [4 Portals]
o- 172.16.20.40:3260 ................................................................................. [OK, iser disabled]
o- 172.16.20.41:3260 ................................................................................. [OK, iser disabled]
o- 172.16.20.42:3260 ................................................................................. [OK, iser disabled]
o- 172.16.20.43:3260 ................................................................................. [OK, iser disabled]
o- iqn.2003-01.org.linux-iscsi.debian.x8664 ............................................................................ [1 TPG]
o- tpg1 ............................................................................................................ [enabled]
o- acls ............................................................................................................ [1 ACL]
o- iqn.1993-08.org.debian:01:2972f6b5fc7 ................................................................. [2 Mapped LUNs]
o- mapped_lun0 ............................................................................................. [lun0 (rw)]
o- mapped_lun1 ............................................................................................. [lun1 (rw)]
o- luns ........................................................................................................... [2 LUNs]
o- lun0 ......................................................................................... [iblock/SAN1 (/dev/vdb)]
o- lun1 ......................................................................................... [iblock/SAN2 (/dev/vdc)]
o- portals ..................................................................................................... [4 Portals]
o- 172.16.20.40:3260 ................................................................................. [OK, iser disabled]
o- 172.16.20.41:3260 ................................................................................. [OK, iser disabled]
o- 172.16.20.42:3260 ................................................................................. [OK, iser disabled]
o- 172.16.20.43:3260 ................................................................................. [OK, iser disabled]
o- loopback .......................................................................................................... [0 Targets]
o- qla2xxx ........................................................................................................... [0 Targets]
o- tcm_fc ............................................................................................................ [0 Targets]
o- vhost ............................................................................................................. [0 Targets]
/>
/> ls
o- / ......................................................................................................................... [...]
o- backstores .............................................................................................................. [...]
o- block .................................................................................................. [Storage Objects: 4]
o- CENTOS ........................................................................... [/dev/vdd (2.0GiB) write-thru activated]
o- SAN1 ............................................................................. [/dev/vdb (1.0GiB) write-thru activated]
o- SAN2 ............................................................................. [/dev/vdc (1.0GiB) write-thru activated]
o- SANROOT ........................ [/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-0 (8.0GiB) write-thru activated]
o- fileio ................................................................................................. [Storage Objects: 0]
o- pscsi .................................................................................................. [Storage Objects: 0]
o- ramdisk ................................................................................................ [Storage Objects: 0]
o- iscsi ............................................................................................................ [Targets: 3]
o- iqn.1994-05.com.redhat:23d8eb7fa1fc ............................................................................... [TPGs: 1]
o- tpg1 ............................................................................................... [no-gen-acls, no-auth]
o- acls .......................................................................................................... [ACLs: 1]
o- iqn.1994-05.com.redhat:23d8eb7fa1fc .................................................................. [Mapped LUNs: 1]
o- mapped_lun0 ................................................................................ [lun0 block/CENTOS (rw)]
o- luns .......................................................................................................... [LUNs: 1]
o- lun0 ........................................................................................ [block/CENTOS (/dev/vdd)]
o- portals .................................................................................................... [Portals: 4]
o- 172.16.20.40:3260 ................................................................................................ [OK]
o- 172.16.20.41:3260 ................................................................................................ [OK]
o- 172.16.20.42:3260 ................................................................................................ [OK]
o- 172.16.20.43:3260 ................................................................................................ [OK]
o- iqn.2003-01.org.linux-iscsi.debian.sanboot ........................................................................ [TPGs: 1]
o- tpg1 ............................................................................................... [no-gen-acls, no-auth]
o- acls .......................................................................................................... [ACLs: 1]
o- iqn.2005-03.org.open-iscsi:fd2bc2f4652a-sanboot ...................................................... [Mapped LUNs: 1]
o- mapped_lun0 ............................................................................... [lun0 block/SANROOT (rw)]
o- luns .......................................................................................................... [LUNs: 1]
o- lun0 ..................................... [block/SANROOT (/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-0)]
o- portals .................................................................................................... [Portals: 4]
o- 172.16.20.40:3260 ................................................................................................ [OK]
o- 172.16.20.41:3260 ................................................................................................ [OK]
o- 172.16.20.42:3260 ................................................................................................ [OK]
o- 172.16.20.43:3260 ................................................................................................ [OK]
o- iqn.2003-01.org.linux-iscsi.debian.x8664 .......................................................................... [TPGs: 1]
o- tpg1 ............................................................................................... [no-gen-acls, no-auth]
o- acls .......................................................................................................... [ACLs: 1]
o- iqn.1993-08.org.debian:01:2972f6b5fc7 ................................................................ [Mapped LUNs: 2]
o- mapped_lun0 .................................................................................. [lun0 block/SAN1 (rw)]
o- mapped_lun1 .................................................................................. [lun1 block/SAN2 (rw)]
o- luns .......................................................................................................... [LUNs: 2]
o- lun0 .......................................................................................... [block/SAN1 (/dev/vdb)]
o- lun1 .......................................................................................... [block/SAN2 (/dev/vdc)]
o- portals .................................................................................................... [Portals: 4]
o- 172.16.20.40:3260 ................................................................................................ [OK]
o- 172.16.20.41:3260 ................................................................................................ [OK]
o- 172.16.20.42:3260 ................................................................................................ [OK]
o- 172.16.20.43:3260 ................................................................................................ [OK]
o- loopback ......................................................................................................... [Targets: 0]
o- vhost ............................................................................................................ [Targets: 0]
/>
I am a incorrigibly in picking non-mainstream, open smartphones, and then struggling hard. Back then in 2008, I tried to
I spent a few days in Cambridge for a minidebconf. This is a tiny
version of the full annual Debconf. We had a couple of days for
hacking, and another two days for talks.
I spent my hacking time on thinking about vmdebootstrap (my tool for
generating disk images with an installed Debian), and came to the
conclusion I need to atone my sins for writing such crappy code by
rewriting it from scratch to be nicer to use. I gave a talk about
this, too. The
I don't often write on this blog, and when I do, it's either tech related,
or light life stuff.
Over the next few weeks, it's going to get a lot more political. If you
currently follow this blog for its technical content, you may be tempted to
tune out. I would encourage you to stay and listen. I'm passionate about
the technology that I work on; but the greatest problems facing our world
today are not ones that will be solved with software.
American democracy is in bad shape, and it's because of what we're doing to
it. This is not a problem of the Right or of the Left; it is not a problem
that began with the election of Donald Trump, and it's not a problem that
will go away at the end of his term. It is partly a structural problem with
the way our elections work, but more than that it's a problem of how we're
splitting into separate tribes, isolating ourselves from those who don't
agree with us.
As
Like I wrote before,
I run a couple of different sites that allow users to sign-up and use various
services. In each of these sites I have some minimal rules in place to detect bad signups, but these are a little ad hoc, because the nature of "badness" varies on a per-site basis.
I've worked in a couple of places where there are in-house tests of bad signups, and these usually boil down to some naive, and overly-broad, rules:
Yesterday the eighth update in the 0.12.* series of
This morning I gave a guest lecture to students at the
For over a year now, I have been using
This is an extension of part
Moving on, Let me share an experience I shared one of the last few days I had while I was in Cape Town

What happened was this. This is from the Doha Airport. I had seen big buggies (ones similar to golf carts) which was ferrying people from end of the concourse to the other. I had been walking the whole day and even with the horizontal escalators and everything, it takes a toll. I was half-tired, half-sleepy and saw a buggy stationed. From behind it looked like the buggies I had seen. As there was no place to park my behind there, I entered into the buggy and sat there. Around 15-20 minutes later a Doha cop in another buggy came to me and asked me if something had happened ?
I had no clue what he was talking about. He told/shared/asked me in friendly tone whether I had committed a crime or wanted to report a crime. When I replied in negative to both, he asked then why I was sitting there. I replied it was for stretching my legs and it was the buggy which was being used to transport people from A. to B. He gently told me I had entered into the wrong one and it was actually a cop buggy. I couldn t believe it. He did go his own way as he saw I was dead-tired. After 10-15 minutes, half-believingly I came out of the buggy and to my shock the gentleman was right. There was nothing to do but solder on to find a spot in this big airport. I shared this with few friends and family and managed to elicit few laughs hence sharing.
The somewhat sad one was I had met a couple with a baby. Now as shared before, Most Airports including the Doha Airport is Air-Conditioned/Climate-Controlled and is probably in mid-20 s so it was more than cold for me. The couples with the baby were from Asian sub-continent. From their clothes and the way they were, they were not very well off. I do remember them sharing that they had a death in the family and hence were going. I didn t know at that point in time that there was something called 


