Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 05-13-2014, 04:14 PM   #1
LQ Newbie
Registered: Jan 2009
Posts: 18

Rep: Reputation: 0
targetcli - how to extend size file based target LUN

I have a QLogic Fibre Channel HBA and going to use it as a FC based SAN.

If I define a fileio backstore based target LUN with targetcli. Say I create the LUN as 50GB initially, how do I later extend the size of this LUN?

I don't see any extend type options in targetcli.
Old 05-14-2014, 09:49 AM   #2
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 7
Posts: 3,532

Rep: Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974Reputation: 974
A LUN or an LVM is a block device so you should use the iblock backend which will have better performance and will pass size requests to the underlying dev. Last I checked, tcm did not have AEN notification of size changes to initiators, so they will need to rescan to pick up the change.
Old 05-15-2014, 10:08 AM   #3
LQ Newbie
Registered: Jan 2009
Posts: 18

Original Poster
Rep: Reputation: 0
I'm using qla2xxx. Not sure what the difference is between qla2xxx and tcm_fc.

Ok, so if i use iblock backend with LVM, I first create a 50GB LV, (say it's called lv1 in VG vg1), I define the iblock backstore in targetcli against /dev/vg1/lv1, true?

On the other end, the LUN is seen as a 50GB disk. I've tried this, so far so good.

Then how is the LUN extended in size? On the SAN/target side I used

lvextend -L +10GB /dev/vg1/lv1 /dev/sdc

to extend the LV on the SAN another 10GB.

How does this extra 10GB get to the initiator side?

I did the echo "- - -" > /sys/class/scsi_host/host1/scan on the initiator side (CentOS 6.4), but the extra 10GB didn't show up. After rebooting the CentOS initiator side, the extra 10GB showed up. There's got to be a better way than rebooting.

Is there some good documentation on use of targetcli? The LIO wiki and RTS_OS manual is the best I've seen so far and a couple blogs. Figuring this out has been a lot of trial and error.

I'm also unclear how dozens/hundreds of LUNS on the SAN side would look like. Would each lun be a pre-allocated fixed size LV? Is there some way to have a size agnostic LV on the SAN and the initiator side allocates/requests a size? I don't think so. I believe a fixed LUN size needs to be carved/defined on the target lun side.
Old 05-15-2014, 10:13 AM   #4
LQ Newbie
Registered: Jan 2009
Posts: 18

Original Poster
Rep: Reputation: 0
Does anyone know if target LUNs from Linux works with AIX on Power7? I haven't had success yet having my AIX get the LUN. No idea if it's even possible. I imagine it is.
Old 05-20-2014, 12:06 PM   #5
LQ Newbie
Registered: Jan 2009
Posts: 18

Original Poster
Rep: Reputation: 0
For AIX, it does indeed work with AIX. AIX is able to see the FC target LUN and use it.

On the Ubuntu SAN side, I plan on using ZFS, which I've learned has the zvol concept suitable for virtualized storage. So a target LUN maps to a zvol.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to add a LUN and extend filesystem in veritas cluster - Linux linux2learn Linux - Newbie 2 06-08-2013 11:33 PM
LXer: How To Extend Size Of The Storage File LXer Syndicated Linux News 0 08-27-2011 03:30 PM
[SOLVED] the file at your target is 0 bytes in size need_help_linuxmint9 Programming 6 03-18-2011 11:27 PM
target file size when encoding video ghell Linux - Software 1 06-11-2009 02:53 PM
Extend ext2/ext3 file size limit npuetz Linux - General 2 10-12-2004 09:31 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:47 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration