Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Delete from target a LUN that is mounted on initiator Post 302710233 by bakunin on Thursday 4th of October 2012 06:04:33 AM
Old 10-04-2012
Quote:
Originally Posted by slavash
It is a LUN that has a FS, there is no constant I/O to it, but should't i except that the System will shout at me?
Not more so than when a real disk would break. Suppose the LUN would be a physical disk and this disk had just had a headcrash. Your system would (and should!) complain but not stop working at all because of this, no?

Quote:
I see only warning msgs in the dmesg that LUN assignments on the target were changed and SCSI doesn't preform remap...
Now we are talking. I deduce from this you are using a Linux of some sorts. All the different OSes behave differently and even within Linux there are different HBAs with different behaviors, different drivers with different capabilities, .... You will have to tell a lot more about your environment or you will get answers which are "more or less precise", so to say.

Quote:
by the way, rescan-scsi-bus.sh doesn't help - it doesn't remaps the LUN, only reset of the stack does..
I have only worked with the QLogic HBAs using the Linux-builtin "qla2xxx" module. There is a command ("multipath -<someswitch>" IIRC) to rescan the LUNs attached, but use with care because it will disconnect all the other LUNs for a short time too. If these other LUNs host databases you'd be in for some major recovery in this case.

I hope this helps.

bakunin
 

10 More Discussions You Might Find Interesting

1. Solaris

I have LUN ID, how to find disk relate to that LUN ID?

I have a list of LUN ID, my task is to find if disk has been added or not. How do I do that? I have been searching the forum and not able to find answer. thanks (4 Replies)
Discussion started by: uuontario
4 Replies

2. Solaris

Iscsi - target + initiator on the same host.

Hi all iscsiadm / iscsitadm. Ive created two devices on a host. # iscsitadm list target Target: 1-disk0 iSCSI Name: iqn.1986-03.com.sun:02:f105ddf3-52a4-ed7a-9590-c3d354b8fc32.1-disk0 Connections: 1 Target: 1-disk1 iSCSI Name:... (0 Replies)
Discussion started by: sbk1972
0 Replies

3. Solaris

One LUN, mounted on two servers - howto

Hi all Im in a situation where I need to mount a single 650Gb lun on two servers / zones. ServerA is the main database and performs a backup to u99, I need to have this u99 also mounted onto another server to allow various zones to `feed` from it. Ok, I know I can umount, then remount it,... (1 Reply)
Discussion started by: sbk1972
1 Replies

4. Shell Programming and Scripting

target string to delete

Hi all, I have a text file with a lot of records. In each records I have tags like this: =952 \\$aBNCS-CH\\$bBNCS-CH\\$h1989\\$oBNCS-CH0000001\\$pBNCS-CH0000001\\$yJNL =952 \\$aBNCS-C.UNIV\\$bBNCS-C.UNIV\\$h1974-77.\\$oBNCS-C.UNIV0000001\\$pBNCS-C.UNIV0000001\\$yJNL =952... (4 Replies)
Discussion started by: ldiaz2106
4 Replies

5. Shell Programming and Scripting

rsync delete single file from the target folder

Hi We want to delete a single file from the destiantion directory using rsync. Is it possible to do this ? or Do we have any alternate approaches in rsync( for ex applying some filters ..etc) For ex: ----------------------------------------------- Source (Folder) ... (3 Replies)
Discussion started by: MVEERA
3 Replies

6. Shell Programming and Scripting

rsync delete specific files - from different target folder

Hi, I need to use rsync to delete multiple files(only specified files not all) using --delete option, these files are located in different target folders. Instead of running rsync command multiple times for each file, can we achieve this with one time execution? your help is much... (0 Replies)
Discussion started by: MVEERA
0 Replies

7. Shell Programming and Scripting

How to delete more than 7 days file from Target folder?

Hi Team, I have to remove files which are more than 7 days in my target directory. I have this script but using this i faced some problems like, removed library files of unix. for abc in `find /xxx/abc/OutputFiles/xxxx_*.txt -type f -mtime +5|xargs ls 1` do echo "xxx files are:"$abc ... (1 Reply)
Discussion started by: harris
1 Replies

8. HP-UX

Unable to delete iscsi target

Hi Please can someone give me a hint on this, when I list the targets, I see two o them: #iscsiutil -p Operational Target Information ------------------------------ Target # 1 ----------- Target Name : iqn.1992-08.com.netapp:sn.142241859 Target Alias ... (2 Replies)
Discussion started by: fretagi
2 Replies

9. Shell Programming and Scripting

Need shell script to compare directories and delete files on target server

Hello, I need help in writing the shell script for below mentioned case. There are 2 servers(server A, server B). A cronjob syncs files between these 2 servers. Existing script is copying files from A to B. This is done using the command rsync. However, the files are not deleted... (2 Replies)
Discussion started by: SravaniVedam11
2 Replies

10. UNIX for Advanced & Expert Users

Rsync with --delete but do not delete peer dirs on target

rsync with --delete won't honor the delete if the source is something/*. I want the delete to work, but not to delete directories on the target that are peer to the intended directory. For example, using these source and target file structures: Source on desktop: ~/ Money/ ... (4 Replies)
Discussion started by: JavaMeister
4 Replies
CTL.CONF(5)						      BSD File Formats Manual						       CTL.CONF(5)

NAME
ctl.conf -- CAM Target Layer / iSCSI target daemon configuration file DESCRIPTION
The ctl.conf configuration file is used by the ctld(8) daemon. Lines starting with '#' are interpreted as comments. The general syntax of the ctl.conf file is: pidfile path auth-group name { chap user secret ... } portal-group name { listen address discovery-auth-group name ... } lun name { path path } target name { auth-group name portal-group name [agname] port name lun number name lun number { path path } ... } Global Context auth-group name Create an auth-group configuration context, defining a new auth-group, which can then be assigned to any number of targets. debug level The debug verbosity level. The default is 0. maxproc number The limit for concurrently running child processes handling incoming connections. The default is 30. A setting of 0 disables the limit. pidfile path The path to the pidfile. The default is /var/run/ctld.pid. portal-group name Create a portal-group configuration context, defining a new portal-group, which can then be assigned to any number of targets. lun name Create a lun configuration context, defining a LUN to be exported by some target(s). target name Create a target configuration context, which can contain one or more lun contexts. timeout seconds The timeout for login sessions, after which the connection will be forcibly terminated. The default is 60. A setting of 0 disables the timeout. isns-server address An IPv4 or IPv6 address and optionally port of iSNS server to register on. isns-period seconds iSNS registration period. Registered Network Entity not updated during this period will be unregistered. The default is 900. isns-timeout seconds Timeout for iSNS requests. The default is 5. auth-group Context auth-type type Sets the authentication type. Type can be either "none", "deny", "chap", or "chap-mutual". In most cases it is not necessary to set the type using this clause; it is usually used to disable authentication for a given auth-group. chap user secret A set of CHAP authentication credentials. Note that for any auth-group, the configuration may only contain either chap or chap-mutual entries; it is an error to mix them. chap-mutual user secret mutualuser mutualsecret A set of mutual CHAP authentication credentials. Note that for any auth-group, the configuration may only contain either chap or chap-mutual entries; it is an error to mix them. initiator-name initiator-name An iSCSI initiator name. Only initiators with a name matching one of the defined names will be allowed to connect. If not defined, there will be no restrictions based on initiator name. initiator-portal address[/prefixlen] An iSCSI initiator portal: an IPv4 or IPv6 address, optionally followed by a literal slash and a prefix length. Only initiators with an address matching one of the defined addresses will be allowed to connect. If not defined, there will be no restrictions based on initiator address. portal-group Context discovery-auth-group name Assign a previously defined authentication group to the portal group, to be used for target discovery. By default, portal groups are assigned predefined auth-group "default", which denies discovery. Another predefined auth-group, "no-authentication", may be used to permit discovery without authentication. discovery-filter filter Determines which targets are returned during discovery. Filter can be either "none", "portal", "portal-name", or "portal-name-auth". When set to "none", discovery will return all targets assigned to that portal group. When set to "portal", discovery will not return targets that cannot be accessed by the initiator because of their initiator-portal. When set to "portal-name", the check will include both initiator-portal and initiator-name. When set to "portal-name-auth", the check will include initiator-portal, initiator-name, and authentication credentials. The target is returned if it does not require CHAP authentication, or if the CHAP user and secret used during discovery match those used by the target. Note that when using "portal-name-auth", targets that require CHAP authentication will only be returned if discovery-auth-group requires CHAP. The default is "none". listen address An IPv4 or IPv6 address and port to listen on for incoming connections. redirect address IPv4 or IPv6 address to redirect initiators to. When configured, all initiators attempting to connect to portal belonging to this portal-group will get redirected using "Target moved temporarily" login response. Redirection happens before authentication and any initiator-name or initiator-portal checks are skipped. target Context alias text Assign a human-readable description to the target. There is no default. auth-group name Assign a previously defined authentication group to the target. By default, targets that do not specify their own auth settings, using clauses such as chap or initiator-name, are assigned predefined auth-group "default", which denies all access. Another prede- fined auth-group, "no-authentication", may be used to permit access without authentication. Note that targets must only use one of auth-group, chap, or chap-mutual; it is a configuration error to mix multiple types in one target. auth-type type Sets the authentication type. Type can be either "none", "deny", "chap", or "chap-mutual". In most cases it is not necessary to set the type using this clause; it is usually used to disable authentication for a given target. This clause is mutually exclusive with auth-group; one cannot use both in a single target. chap user secret A set of CHAP authentication credentials. Note that targets must only use one of auth-group, chap, or chap-mutual; it is a configu- ration error to mix multiple types in one target. chap-mutual user secret mutualuser mutualsecret A set of mutual CHAP authentication credentials. Note that targets must only use one of auth-group, chap, or chap-mutual; it is a configuration error to mix multiple types in one target. initiator-name initiator-name An iSCSI initiator name. Only initiators with a name matching one of the defined names will be allowed to connect. If not defined, there will be no restrictions based on initiator name. This clause is mutually exclusive with auth-group; one cannot use both in a single target. initiator-portal address[/prefixlen] An iSCSI initiator portal: an IPv4 or IPv6 address, optionally followed by a literal slash and a prefix length. Only initiators with an address matching one of the defined addresses will be allowed to connect. If not defined, there will be no restrictions based on initiator address. This clause is mutually exclusive with auth-group; one cannot use both in a single target. offload driver Define iSCSI hardware offload driver to use for this target. portal-group name [agname] Assign a previously defined portal group to the target. The default portal group is "default", which makes the target available on TCP port 3260 on all configured IPv4 and IPv6 addresses. Optional second argument specifies auth group name for connections to this specific portal group. If second argument is not specified, target auth group is used. port name Assign specified CTL port (such as "isp0") to the target. On startup ctld configures LUN mapping and enables all assigned ports. Each port can be assigned to only one target. redirect address IPv4 or IPv6 address to redirect initiators to. When configured, all initiators attempting to connect to this target will get redi- rected using "Target moved temporarily" login response. Redirection happens after successful authentication. lun number name Export previously defined lun by the parent target. lun number Create a lun configuration context, defining a LUN exported by the parent target. lun Context backend block | ramdisk The CTL backend to use for a given LUN. Valid choices are "block" and "ramdisk"; block is used for LUNs backed by files or disk device nodes; ramdisk is a bitsink device, used mostly for testing. The default backend is block. blocksize size The blocksize visible to the initiator. The default blocksize is 512. device-id string The SCSI Device Identification string presented to the initiator. option name value The CTL-specific options passed to the kernel. All CTL-specific options are documented in the OPTIONS section of ctladm(8). path path The path to the file or device node used to back the LUN. serial string The SCSI serial number presented to the initiator. size size The LUN size, in bytes. FILES
/etc/ctl.conf The default location of the ctld(8) configuration file. EXAMPLES
auth-group ag0 { chap-mutual "user" "secret" "mutualuser" "mutualsecret" chap-mutual "user2" "secret2" "mutualuser" "mutualsecret" initiator-portal 192.168.1.1/16 } auth-group ag1 { auth-type none initiator-name "iqn.2012-06.com.example:initiatorhost1" initiator-name "iqn.2012-06.com.example:initiatorhost2" initiator-portal 192.168.1.1/24 initiator-portal [2001:db8::de:ef] } portal-group pg0 { discovery-auth-group no-authentication listen 0.0.0.0:3260 listen [::]:3260 listen [fe80::be:ef]:3261 } target iqn.2012-06.com.example:target0 { alias "Example target" auth-group no-authentication lun 0 { path /dev/zvol/tank/example_0 blocksize 4096 size 4G } } lun example_1 { path /dev/zvol/tank/example_1 } target iqn.2012-06.com.example:target1 { chap chapuser chapsecret lun 0 example_1 } target iqn.2012-06.com.example:target2 { auth-group ag0 portal-group pg0 lun 0 example_1 lun 1 { path /dev/zvol/tank/example_2 option foo bar } } SEE ALSO
ctl(4), ctladm(8), ctld(8) AUTHORS
The ctl.conf configuration file functionality for ctld(8) was developed by Edward Tomasz Napierala <trasz@FreeBSD.org> under sponsorship from the FreeBSD Foundation. BSD
February 11, 2015 BSD
All times are GMT -4. The time now is 07:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy