btrfs 创建快照
### 1. 创建用户存档目录
btrfs subvolume snapshot /snapshot/area_user_data/1_1 /snapshot/area_user_data/${UID}
### 2. 创建游戏软连接
btrfs subvolume snapshot /snapshot/area_game_data/${game_id}_${game_version} /snapshot/area_user_game_data/${uid}_${game_id}_${game_version}
ln -s /snapshot/area_user_game_data/${uid}_${game_id}_${game_version} /snapshot/out_link/area_vm_data/${vm_id}/area_user_game_data
# 可以不要?
# ln -s /snapshot/area_user_game_data/${uid}_${game_id}_${game_version} /snapshot/out_link/area_vm_game_data/${vm_id}_${game_id}
### 3. 创建用户存档软连接
ln -s /snapshot/area_user_data/${UID} /snapshot/out_link/area_vm_data/${vm_id}/area_user_data
# 可以不要?
# ln -s /snapshot/area_user_data/${UID} /snapshot/out_link/area_user_data/${UID}
### 4. 删除游戏软连接
rm -f /snapshot/out_link/area_vm_data/${vm_id}/area_user_game_data
rm -f /snapshot/out_link/area_vm_game_data/${vm_id}_${game_id}
### 5. 删除用户存档软连接
rm -f /snapshot/out_link/area_vm_data/${vm_id}/area_user_data
rm -f /snapshot/out_link/area_user_data/${UID}
btrfs subvolume snapshot /snapshot/area_user_data/1_1 /snapshot/area_user_data/${UID}
### 2. 创建游戏软连接
btrfs subvolume snapshot /snapshot/area_game_data/${game_id}_${game_version} /snapshot/area_user_game_data/${uid}_${game_id}_${game_version}
ln -s /snapshot/area_user_game_data/${uid}_${game_id}_${game_version} /snapshot/out_link/area_vm_data/${vm_id}/area_user_game_data
# 可以不要?
# ln -s /snapshot/area_user_game_data/${uid}_${game_id}_${game_version} /snapshot/out_link/area_vm_game_data/${vm_id}_${game_id}
### 3. 创建用户存档软连接
ln -s /snapshot/area_user_data/${UID} /snapshot/out_link/area_vm_data/${vm_id}/area_user_data
# 可以不要?
# ln -s /snapshot/area_user_data/${UID} /snapshot/out_link/area_user_data/${UID}
### 4. 删除游戏软连接
rm -f /snapshot/out_link/area_vm_data/${vm_id}/area_user_game_data
rm -f /snapshot/out_link/area_vm_game_data/${vm_id}_${game_id}
### 5. 删除用户存档软连接
rm -f /snapshot/out_link/area_vm_data/${vm_id}/area_user_data
rm -f /snapshot/out_link/area_user_data/${UID}