Create zpool on existing directory with data
ISSUE : A directory contains a huge amount of data, due to disk space constrain we need to convert that data into zfs volume. The challenge is how to retain the file ownership, permission, and soft/hard links
GOAL : Create a zfs volume and move the local data with exact permission, ownership.
SOLUTION : There isn't a built-in or automated way to create a new DataSet and migrate existing data to it. To get it done you'll need to create the dataset and manually (e.g. rsync) the data to it.
Prerequisites : NIL
1. Move the data directory into a new name.
root@JUDI-DEV-10:/root # mv /oracle /oracle_org
2. Create a zpool volume with a the new disk
root@JUDI-DEV-10:/root # zpool create -f -m /oracle oracle c1d1
3. Copy the data to the zfs volume using the rsync command
root@JUDI-DEV-10:/root # rsync -aAX /oracle_org/ /oracle
4. Verify the permission and ownership once the copy completed
root@JUDI-DEV-10:/root # ls -rlt
create zpool with existing data directory
create zpool and sync with existing directory
zfs create dataset from existing directory
create zpool on existing directory with data
Proper way to create a zfs off an existing directory
ZFS: adding filesystem over existing directory
create ZFS dataset over existing data
converting existing directory to zfs dataset
Zfs create dataset from existing directory