I first deactivated the database, made sure that no process was running, and copied the files to the target location. I didn't delete the old files.
The db2relocatedb command ran successfully and I could connect to the sample database.
But as I checked the paths in the view sysibmadm.dbpaths I saw the old paths. Then I restarted the instance (db2stop/db2start) , connected again to the database I checked the paths. The sysibmadm.dbpaths shows now the correct paths.
Furthermore: after having run successfully the db2relocatedb if I rename the old paths and then try to connect to the database (which all containers and files have been moved to the new paths) I get the error:
SQL1042C An unexpected system error occured. SQLSTATE=58004
Why does DB2 not recognize the new paths dynamically?