1. Community Tip: Please Give Thanks to Those Sharing Their Knowledge.
    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.
  2. Community Tip: Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING)
    Click the link above to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This notice will disappear after you have made at least 3 posts.

Move Container

Discussion in 'TSM Server' started by rowl, Sep 29, 2017.

  1. rowl

    rowl ADSM.ORG Senior Member

    Joined:
    May 18, 2006
    Messages:
    226
    Likes Received:
    9
    I have a need to move off of an old storage system to a new one. So what I have done is add new paths to the directory container storage pool from the new array, and marked the file systems for the old array as read only. So far so good. Now I want to move the containers that still reside on the old array. I know move container command works, but man is it slow. It also appears that move container doesn't support wildcards or concurrent moves.

    I wish I could do something like move container /path/* maxpr=10

    Any suggestions on how to most efficiently move these containers? I have about 6,000 containers and from what I am seeing it takes 1-2 hours to move one. The math on that would drag this out over a year.

    -Rowl
     
  2.  
  3. RecoveryOne

    RecoveryOne ADSM.ORG Member

    Joined:
    Mar 15, 2017
    Messages:
    51
    Likes Received:
    6
    Having shuffled about containers I can say it is really dependent on your disk io/speed for moving them.
    Best I can offer is script it by filesystem and let the system chew on the process 24/7.
    That said, I only had to move a few hundred container volumes.

    My method:
    After locking down the directory to read only as you did above, query all containers and break them into chunks. I did it by storage pool directory.
    I ended up having containerfs_a that contained all volumes that belonged to /tsmstg01, containerfs_b for /tsmstg02 etc...

    Then a quick and dirty script (*nix pros will likely shudder here):
    Code:
     #!/bin/ksh
    # file file
    file=/tmp/data/containerfs_a
    
    #Use are your own risk.
    
    #Global Variables
    TSMADMIN=<admin id>
    TSMSE=<what tsm server you have defined>
    TSMPA=<password>
    
    # Function
    tsmcmd()
    {
         dsmadmc -se=${TSMSE} -id=${TSMADMIN} -pa=${TSMPA} -tab -dataonly=yes "$*"
    }
    
    
    while read vol
    do
         tsmcmd "move container $vol wait=yes"
    
    done <"$file"
    Up to you how many instances of move container script you want to spawn. Just keep your IO under watchful eye. Just replace file=/tmp/data/containerfs_a with _b and fire it up.

    Hope it helps.
     
    ianr27 likes this.

Share This Page