Popular Posts

Nov 1, 2019

create zpool on existing directory with data

Create zpool on existing directory with data

APPLIES TO :  Oracle SPARC Solaris

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

2 comments:

  1. Hi,
    There is a build in called shadow migration service which allows automatic migration of data from external or internal sources... migrated a 80TB user share which was shared as NFS and CIFS with ID mapping and all extended attributes where synced, rsync or robocopy couldn’t do that job... works with nearly no downtime, just the remount....

    ReplyDelete
    Replies
    1. Thanks much PRESSY, will check that and make use of that in my next tasks also come with another post on shadow migration :)

      Delete

Popular Posts