Re: [CentOS] persistent generic device for tape changer

2019-02-08 Thread Leon Fauster via CentOS


> Am 08.02.2019 um 00:13 schrieb Ron Loftin :
> 
> On Thu, 2019-02-07 at 22:29 +0100, Helmut Drodofsky wrote:
>> Hello Ron,
>> 
>> sounds good. I have 2 tape changer. I persume, udev creates the same
>> link for both.
>> 
>> Can I modify
>> SYMLINK+="changer-$env{ID_SERIAL}"
>> 
>> The serial should be unique.
>> 
>> Viele Grüße
>> Helmut Drodofsky
>> 
>> 
> 
> I've taken you as far as I can go.  Now you will have to experiment a
> bit for your use case.  I should point out that at least in my system,
> the link with the serial number in it shows up even with the line
> commented in the rules file.
> 
> As always, YMMV.

Maybe

 ATTRS{serial}=="likethis16c07338d2a294c" , SYMLINK+="mybackup/changer1" ...

and for the second one 

... ATTRS{serial}=="likethis9ae76c073f5ccb8" , SYMLINK+="mybackup/changer2" ...

?

--
LF
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] persistent generic device for tape changer

2019-02-07 Thread Ron Loftin


I've taken you as far as I can go.  Now you will have to experiment a
bit for your use case.  I should point out that at least in my system,
the link with the serial number in it shows up even with the line
commented in the rules file.

As always, YMMV.

On Thu, 2019-02-07 at 22:29 +0100, Helmut Drodofsky wrote:
> Hello Ron,
> 
> sounds good. I have 2 tape changer. I persume, udev creates the same
> link for both.
> 
> Can I modify
> SYMLINK+="changer-$env{ID_SERIAL}"
> 
> The serial should be unique.
> 
> Viele Grüße
> Helmut Drodofsky
> 
> Internet XS Service GmbH
> Heßbrühlstraße 15
> 70565 Stuttgart
> 
> Geschäftsführung
> Helmut Drodofsky
> HRB 21091 Stuttgart
> USt.ID: DE190582774
> Fon: 0711 781941 0 
> Fax: 0711 781941 79
> Mail: i...@internet-xs.de
> www.internet-xs.de
> Am 07.02.2019 um 16:17 schrieb Ron Loftin:
> > 
> > On Thu, 2019-02-07 at 10:56 +0100, Helmut Drodofsky wrote:
> > > 
> > > Hello,
> > > 
> > > mtx and therefor amanda use generic device /dev/sg for tape
> > > changer.
> > > 
> > > These devices change on reboot.
> > > 
> > > How to make them persistent?
> > > 
> > > /dev/sch0 and /dev/sch1 seem to be persistent.
> > > 
> > > /dev/tape/by-id/ shows links from WWID to generic device
> > > 
> > > An UDEV rule could help? I have not found any example.
> > I had a similar issue when I moved to Mint 18 with the tape device.
> >  This works with kernel 4.10 and later.  Copy /lib/udev/rules.d/60-
> > persistent-storage-tape.rules to /etc/udev/rules.d and make a
> > change as
> > shown:
> > 
> > diff -n /lib/udev/rules.d/60-persistent-storage-tape.rules
> > /etc/udev/rules.d/60-persistent-storage-tape.rules 
> > d9 1
> > a9 2
> >    SYMLINK+="changer"
> > #  SYMLINK+="tape/by-id/scsi-$env{ID_SERIAL}"
> > 
> > This created /dev/changer as a link to the /dev/sg device that
> > will
> > be consistent every time the system is booted.
> > 
> > > 
> > > 
> ___
> CentOS mailing list
> CentOS@centos.org
> https://lists.centos.org/mailman/listinfo/centos
-- 
Ron Loftin  relof...@twcny.rr.com

"God, root, what is difference ?"   Piter from UserFriendly


___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] persistent generic device for tape changer

2019-02-07 Thread Helmut Drodofsky
Hello Ron,

sounds good. I have 2 tape changer. I persume, udev creates the same
link for both.

Can I modify
SYMLINK+="changer-$env{ID_SERIAL}"

The serial should be unique.

Viele Grüße
Helmut Drodofsky

Internet XS Service GmbH
Heßbrühlstraße 15
70565 Stuttgart

Geschäftsführung
Helmut Drodofsky
HRB 21091 Stuttgart
USt.ID: DE190582774
Fon: 0711 781941 0 
Fax: 0711 781941 79
Mail: i...@internet-xs.de
www.internet-xs.de
Am 07.02.2019 um 16:17 schrieb Ron Loftin:
> On Thu, 2019-02-07 at 10:56 +0100, Helmut Drodofsky wrote:
>> Hello,
>>
>> mtx and therefor amanda use generic device /dev/sg for tape
>> changer.
>>
>> These devices change on reboot.
>>
>> How to make them persistent?
>>
>> /dev/sch0 and /dev/sch1 seem to be persistent.
>>
>> /dev/tape/by-id/ shows links from WWID to generic device
>>
>> An UDEV rule could help? I have not found any example.
> I had a similar issue when I moved to Mint 18 with the tape device.
>  This works with kernel 4.10 and later.  Copy /lib/udev/rules.d/60-
> persistent-storage-tape.rules to /etc/udev/rules.d and make a change as
> shown:
>
> diff -n /lib/udev/rules.d/60-persistent-storage-tape.rules
> /etc/udev/rules.d/60-persistent-storage-tape.rules 
> d9 1
> a9 2
>    SYMLINK+="changer"
> #  SYMLINK+="tape/by-id/scsi-$env{ID_SERIAL}"
>
> This created /dev/changer as a link to the /dev/sg device that will
> be consistent every time the system is booted.
>
>>
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] persistent generic device for tape changer

2019-02-07 Thread Ron Loftin
On Thu, 2019-02-07 at 10:56 +0100, Helmut Drodofsky wrote:
> Hello,
> 
> mtx and therefor amanda use generic device /dev/sg for tape
> changer.
> 
> These devices change on reboot.
> 
> How to make them persistent?
> 
> /dev/sch0 and /dev/sch1 seem to be persistent.
> 
> /dev/tape/by-id/ shows links from WWID to generic device
> 
> An UDEV rule could help? I have not found any example.

I had a similar issue when I moved to Mint 18 with the tape device.
 This works with kernel 4.10 and later.  Copy /lib/udev/rules.d/60-
persistent-storage-tape.rules to /etc/udev/rules.d and make a change as
shown:

diff -n /lib/udev/rules.d/60-persistent-storage-tape.rules
/etc/udev/rules.d/60-persistent-storage-tape.rules 
d9 1
a9 2
   SYMLINK+="changer"
#  SYMLINK+="tape/by-id/scsi-$env{ID_SERIAL}"

This created /dev/changer as a link to the /dev/sg device that will
be consistent every time the system is booted.

> 
> 
-- 
Ron Loftin  relof...@twcny.rr.com

"God, root, what is difference ?"   Piter from UserFriendly


___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


[CentOS] persistent generic device for tape changer

2019-02-07 Thread Helmut Drodofsky
Hello,

mtx and therefor amanda use generic device /dev/sg for tape changer.

These devices change on reboot.

How to make them persistent?

/dev/sch0 and /dev/sch1 seem to be persistent.

/dev/tape/by-id/ shows links from WWID to generic device

An UDEV rule could help? I have not found any example.


-- 
Viele Grüße
Helmut Drodofsky

Internet XS Service GmbH
Heßbrühlstraße 15
70565 Stuttgart

Geschäftsführung
Helmut Drodofsky
HRB 21091 Stuttgart
USt.ID: DE190582774
Fon: 0711 781941 0 
Fax: 0711 781941 79
Mail: i...@internet-xs.de
www.internet-xs.de
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos