Skip to content
gboudreau edited this page Dec 31, 2011 · 4 revisions

How to re-use Greyhole data drives on a different OS

Introduction

Sometimes, you might want to re-use hard drives that are part of a Greyhole storage pool on a different system. Mostly, that would be useful when re-installing your OS, or moving your data drives in a new machine.

Notes

  • If you can, keep a copy of your greyhole.conf and smb.conf from your old system. It will simplify some of the steps below.

  • It's safer to install the new OS without the Greyhole data drives connected, just in case your distribution defaults to creating a LVM using all the connected drives!

Procedure

  1. Mount your data drives. If you can re-mount them at the locations they were mounted before, you'll save time later, but this isn't mandatory.

  2. Install Greyhole.

  3. Either copy your greyhole.conf from your old install, or re-configure greyhole.conf to fit your setup. In particular, you'll want to configure the storage_pool_drive and num_copies options to match your old setup.

  4. Either copy your smb.conf from your old install, or re-configure smb.conf to fit your setup. In particular, you'll want to re-create all your Greyhole shares, and include the vfs objects and dfree command lines for them. Be careful to re-use the exact names you used before (case-sensitive). If you're unsure about your old share names, you can look in the folders you configured in greyhole.conf storage_pool_drive. If you can move the shared folders from your old system (the folders defined as the shares path in smb.conf), you'll save a lot of time during fsck, since all the symlinks will be there already.

  5. Restart Samba & Greyhole.

  6. Launch a Greyhole fsck: greyhole --fsck This will take care of re-creating symlinks if needed, and making sure all file copies are where they should be.