Re: multiple LTOs in the same library

2023-05-19 Thread Exuvo

You can probably skip the labelstr completly and only use autolabeling=no with 
manual labeling to assign tapes to each storage pool.

Anton "exuvo" Olsson
   ex...@exuvo.se

On 2023-05-19 13:36, ASV wrote:

Wow, I'll go through it as soon as I can.
Thank you very much for now exuvo, very appreciated!


On Thu, 2023-05-18 at 12:13 +0200, Exuvo wrote:

Here is the relevant part of my config with multiple separated tapes
(all LTO5 in my case) in the same MSL2024.
This relies on you having labeled the tapes reasonably as it looks
like labelstr can not match the LTO type.
I do not use autolabeling, only manual labeling with a script i run
when i put in a new batch of tapes.

labeling script for the box of A* tapes i have, you can probably
modify this to put it in the correct storage pool based on LTO type:
tapes=`mtx -f /dev/tape/by-id/scsi-DEC8320699 status | grep "Storage
Element" | grep "Full" | cut -d " " -f 10 | cut -d "=" -f2 | grep -E
"^A[0-9]{5}"`
for tape in $tapes; do
     echo -n "Found archive tape $tape"
     new=`grep -c ${tape::-2} /etc/amanda/archive/tapelist`
     if [ "$new" -eq 0 ]; then
    echo -n ". New tape adding.. "
    sudo -u amanda amlabel --barcode "$tape" -f archive "${tape::-
2}"
     fi
done

shared amanda conf:
define tapetype LTO5 {
      comment "LTO-5"
      length 1400 gbytes # for scheduling only
  speed 14 kps # unused
      blocksize 1024 kbytes # optimizing-the-tape-speed.pdf suggest
1MB, manual suggests 256KB. default 32KB
}

weekly conf for 10 rotating tapes:
define policy retention {
      retention-tapes   5 tapes
      retention-days    0
      retention-recover 1 week
#    retention-recover 0
      retention-full    0
}

define storage backup-storage {
      policy "retention"
      tapepool "rotating"
      tpchanger "MSL2024"
      runtapes 2 # max number of tapes used in a single run of amdump
      tapetype "LTO5"
      labelstr "^ROT[0-9]{2,3}$" # label constraint regex: all tapes
must match
      taperscan "lexical"
}
storage "backup-storage"

yearly conf with single use box of tapes:
define policy retention {
      retention-tapes  10 tapes
      retention-days    0
      retention-recover 0 week
      retention-full  300
}

define storage archive-storage {
#    policy "retention"
      tapepool "ironmountain"
      tpchanger "MSL2024"
      runtapes 10 # max number of tapes used in a single run of amdump
      tapetype "LTO5"
      labelstr "^A[0-9]{5}$" # label constraint regex: all tapes must
match
      taperscan "lexical"
}
storage "archive-storage"

Anton "exuvo" Olsson
     ex...@exuvo.se

On 2023-05-17 16:06, ASV wrote:

That's correct, all drives are LTO8, but not all tapes. And no,
there
is no definition of any kind for slot positioning of the LTO7 right
now.

Thanks for your reply.


On Tue, 2023-05-16 at 16:48 +0200, Stefan G. Weichinger wrote:

Am 16.05.23 um 16:34 schrieb ASV:

Thanks exuvo, I'll try to dig a bit in that direction even
though I
was
expecting some built-in functionality for that.

Are the LTO7-tapes always in defined slots?

As far as I understand all *drives* are LTO8, but not all *tapes*
?







Re: multiple LTOs in the same library

2023-05-19 Thread ASV
Wow, I'll go through it as soon as I can.
Thank you very much for now exuvo, very appreciated!


On Thu, 2023-05-18 at 12:13 +0200, Exuvo wrote:
> Here is the relevant part of my config with multiple separated tapes
> (all LTO5 in my case) in the same MSL2024.
> This relies on you having labeled the tapes reasonably as it looks
> like labelstr can not match the LTO type.
> I do not use autolabeling, only manual labeling with a script i run
> when i put in a new batch of tapes.
> 
> labeling script for the box of A* tapes i have, you can probably
> modify this to put it in the correct storage pool based on LTO type:
> tapes=`mtx -f /dev/tape/by-id/scsi-DEC8320699 status | grep "Storage
> Element" | grep "Full" | cut -d " " -f 10 | cut -d "=" -f2 | grep -E
> "^A[0-9]{5}"`
> for tape in $tapes; do
>     echo -n "Found archive tape $tape"
>     new=`grep -c ${tape::-2} /etc/amanda/archive/tapelist`
>     if [ "$new" -eq 0 ]; then
>    echo -n ". New tape adding.. "
>    sudo -u amanda amlabel --barcode "$tape" -f archive "${tape::-
> 2}"
>     fi
> done
> 
> shared amanda conf:
> define tapetype LTO5 {
>      comment "LTO-5"
>      length 1400 gbytes # for scheduling only
>  speed 14 kps # unused
>      blocksize 1024 kbytes # optimizing-the-tape-speed.pdf suggest
> 1MB, manual suggests 256KB. default 32KB
> }
> 
> weekly conf for 10 rotating tapes:
> define policy retention {
>      retention-tapes   5 tapes
>      retention-days    0
>      retention-recover 1 week
> #    retention-recover 0
>      retention-full    0
> }
> 
> define storage backup-storage {
>      policy "retention"
>      tapepool "rotating"
>      tpchanger "MSL2024"
>      runtapes 2 # max number of tapes used in a single run of amdump
>      tapetype "LTO5"
>      labelstr "^ROT[0-9]{2,3}$" # label constraint regex: all tapes
> must match
>      taperscan "lexical"
> }
> storage "backup-storage"
> 
> yearly conf with single use box of tapes:
> define policy retention {
>      retention-tapes  10 tapes
>      retention-days    0
>      retention-recover 0 week
>      retention-full  300
> }
> 
> define storage archive-storage {
> #    policy "retention"
>      tapepool "ironmountain"
>      tpchanger "MSL2024"
>      runtapes 10 # max number of tapes used in a single run of amdump
>      tapetype "LTO5"
>      labelstr "^A[0-9]{5}$" # label constraint regex: all tapes must
> match
>      taperscan "lexical"
> }
> storage "archive-storage"
> 
> Anton "exuvo" Olsson
>     ex...@exuvo.se
> 
> On 2023-05-17 16:06, ASV wrote:
> > That's correct, all drives are LTO8, but not all tapes. And no,
> > there
> > is no definition of any kind for slot positioning of the LTO7 right
> > now.
> > 
> > Thanks for your reply.
> > 
> > 
> > On Tue, 2023-05-16 at 16:48 +0200, Stefan G. Weichinger wrote:
> > > Am 16.05.23 um 16:34 schrieb ASV:
> > > > Thanks exuvo, I'll try to dig a bit in that direction even
> > > > though I
> > > > was
> > > > expecting some built-in functionality for that.
> > > Are the LTO7-tapes always in defined slots?
> > > 
> > > As far as I understand all *drives* are LTO8, but not all *tapes*
> > > ?
> > > 
> > > 
> > > 
> > > 
> > > 
> > 




Re: multiple LTOs in the same library

2023-05-18 Thread Exuvo

Here is the relevant part of my config with multiple separated tapes (all LTO5 
in my case) in the same MSL2024.
This relies on you having labeled the tapes reasonably as it looks like 
labelstr can not match the LTO type.
I do not use autolabeling, only manual labeling with a script i run when i put 
in a new batch of tapes.

labeling script for the box of A* tapes i have, you can probably modify 
this to put it in the correct storage pool based on LTO type:
tapes=`mtx -f /dev/tape/by-id/scsi-DEC8320699 status | grep "Storage Element" | grep "Full" | cut -d " 
" -f 10 | cut -d "=" -f2 | grep -E "^A[0-9]{5}"`
for tape in $tapes; do
   echo -n "Found archive tape $tape"
   new=`grep -c ${tape::-2} /etc/amanda/archive/tapelist`
   if [ "$new" -eq 0 ]; then
  echo -n ". New tape adding.. "
  sudo -u amanda amlabel --barcode "$tape" -f archive "${tape::-2}"
   fi
done

shared amanda conf:
define tapetype LTO5 {
    comment "LTO-5"
    length 1400 gbytes # for scheduling only
    speed 14 kps # unused
    blocksize 1024 kbytes # optimizing-the-tape-speed.pdf suggest 1MB, manual 
suggests 256KB. default 32KB
}

weekly conf for 10 rotating tapes:
define policy retention {
    retention-tapes   5 tapes
    retention-days    0
    retention-recover 1 week
#    retention-recover 0
    retention-full    0
}

define storage backup-storage {
    policy "retention"
    tapepool "rotating"
    tpchanger "MSL2024"
    runtapes 2 # max number of tapes used in a single run of amdump
    tapetype "LTO5"
    labelstr "^ROT[0-9]{2,3}$" # label constraint regex: all tapes must match
    taperscan "lexical"
}
storage "backup-storage"

yearly conf with single use box of tapes:
define policy retention {
    retention-tapes  10 tapes
    retention-days    0
    retention-recover 0 week
    retention-full  300
}

define storage archive-storage {
#    policy "retention"
    tapepool "ironmountain"
    tpchanger "MSL2024"
    runtapes 10 # max number of tapes used in a single run of amdump
    tapetype "LTO5"
    labelstr "^A[0-9]{5}$" # label constraint regex: all tapes must match
    taperscan "lexical"
}
storage "archive-storage"

Anton "exuvo" Olsson
   ex...@exuvo.se

On 2023-05-17 16:06, ASV wrote:

That's correct, all drives are LTO8, but not all tapes. And no, there
is no definition of any kind for slot positioning of the LTO7 right
now.

Thanks for your reply.


On Tue, 2023-05-16 at 16:48 +0200, Stefan G. Weichinger wrote:

Am 16.05.23 um 16:34 schrieb ASV:

Thanks exuvo, I'll try to dig a bit in that direction even though I
was
expecting some built-in functionality for that.

Are the LTO7-tapes always in defined slots?

As far as I understand all *drives* are LTO8, but not all *tapes* ?









Re: multiple LTOs in the same library

2023-05-17 Thread ASV
That's correct, all drives are LTO8, but not all tapes. And no, there
is no definition of any kind for slot positioning of the LTO7 right
now.

Thanks for your reply.


On Tue, 2023-05-16 at 16:48 +0200, Stefan G. Weichinger wrote:
> Am 16.05.23 um 16:34 schrieb ASV:
> > Thanks exuvo, I'll try to dig a bit in that direction even though I
> > was
> > expecting some built-in functionality for that.
> 
> Are the LTO7-tapes always in defined slots?
> 
> As far as I understand all *drives* are LTO8, but not all *tapes* ?
> 
> 
> 
> 
> 




Re: multiple LTOs in the same library

2023-05-16 Thread Stefan G. Weichinger

Am 16.05.23 um 16:34 schrieb ASV:

Thanks exuvo, I'll try to dig a bit in that direction even though I was
expecting some built-in functionality for that.


Are the LTO7-tapes always in defined slots?

As far as I understand all *drives* are LTO8, but not all *tapes* ?







Re: multiple LTOs in the same library

2023-05-16 Thread ASV
Thanks exuvo, I'll try to dig a bit in that direction even though I was
expecting some built-in functionality for that.


On Tue, 2023-05-16 at 12:16 +0200, Exuvo wrote:
> I think the settings you want are two different storage/pools
> sections with a labelstr regex for matching valid tapes for it. I
> cant see my config from my phone but its something like that.
> 
> 
> On Tue, 16 May 2023, 11:17 ASV,  wrote:
> > OK! I guess you have no hint for me but thanks anyway for giving a
> > sign.
> > 
> > On Tue, 2023-05-16 at 11:01 +0200, Kees Meijs | Nefos wrote:
> > > Yes.
> > > 
> > > On 16-05-2023 10:40, ASV wrote:
> > > > This mailing list seems dead. Is anybody actually still reading
> > > > it?
> > > 
> > 
> > 




Re: multiple LTOs in the same library

2023-05-16 Thread Exuvo
I think the settings you want are two different storage/pools sections with
a labelstr regex for matching valid tapes for it. I cant see my config from
my phone but its something like that.


On Tue, 16 May 2023, 11:17 ASV,  wrote:

> OK! I guess you have no hint for me but thanks anyway for giving a
> sign.
>
> On Tue, 2023-05-16 at 11:01 +0200, Kees Meijs | Nefos wrote:
> > Yes.
> >
> > On 16-05-2023 10:40, ASV wrote:
> > > This mailing list seems dead. Is anybody actually still reading it?
> >
>
>
>


Re: multiple LTOs in the same library

2023-05-16 Thread ASV
OK! I guess you have no hint for me but thanks anyway for giving a
sign.

On Tue, 2023-05-16 at 11:01 +0200, Kees Meijs | Nefos wrote:
> Yes.
> 
> On 16-05-2023 10:40, ASV wrote:
> > This mailing list seems dead. Is anybody actually still reading it?
> 




Re: multiple LTOs in the same library

2023-05-16 Thread Diego Zuccato

Someone is reading it. Maybe nobody knows the answer...

Diego

Il 16/05/2023 10:40, ASV ha scritto:

This mailing list seems dead. Is anybody actually still reading it?
___
Hello everyone,
I have an Amanda setup nicely working with a SpectraStack.
The drives are LTO8 but I've just figured out that there are several
LTO7 too in the library. Now I've both types defined in amanda.conf
however I cannot find a way to tell Amanda that tape labelled XXX or
with the barcode 101010 is an LTO7 while another is an LTO8 instead.
I've seen something around like specifying the blocksize in the
tapelist file but didn't convince me moreover I didn't manage to find
one example of such case despite I don't think this is such a rare case
with libraries with a lot of tapes.

I'm using amanda 3.3.3. I know is terribly old but we are going to do a
major upgrade within months. In the meantime I'd like to implement this
configuration, if possible.

Any hint would be highly appreciated.
Many thanks in advance.




--
Diego Zuccato
DIFA - Dip. di Fisica e Astronomia
Servizi Informatici
Alma Mater Studiorum - Università di Bologna
V.le Berti-Pichat 6/2 - 40127 Bologna - Italy
tel.: +39 051 20 95786