pt-online-schema-change tmp datadir

Hello, is there a way to set DATA DIR for temp table (not changing original table datadir) while changing schema via pt-online-schema change ?
I haven’t enough free space for temp table.

If i’m right only one solution to do it is:

  1. use pt-online-schema-change with --data-dir, --no-drop-new-table and --no-swap-tables
  2. ALTER TABLE old_table DISCARD TABLESPACE;
  3. FLUSH TABLES new_table FOR EXPORT;
  4. move idb,cfg from new_table to old_table (mv /tmp/datadir/db/new_table.ibd /old/datadir/db/old_table.idb) and chown to mysql user
  5. UNLOCK TABLES;
  6. ALTER TABLE old_table IMPORT TABLESPACE;
  7. drop new_table;

as i’m right ?

The steps you mentioned are risky and won’t be “online”
You could run pt-osc twice using --data-dir. The first run will alter your table with the new structure and the second time will move it again to the original location.

Could you help me by step ? =)