Importing Pool While Transfering Over Permissions?

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

ZzBloopzZ

Member
Jan 7, 2013
91
13
8
Hello,

Long story short, I initially created my OmniOS VM size way too small and now I cannot update OmniOS due to lack of free space. Even after deleting older BE's. Also, I installed some random things while in the learning process which I do not remember what they were but no longer need.
I would like to start all over again fresh and clean. This time the new OmniOS VM will be 35GB instead of 20GB.

My only concern is that I have tons of data on my existing 30TB RAIDZ2 pool. I would like to transfer this over to the new install. How exactly do I do this while keeping existing permissions? I am using SMB and NFS with 4 user accounts. I have wrote down the UID and group ID's they are using. I am not using active directory.

When I re-create the new user accounts, is it possible to change their UID's to match how they are currently?

Thank You!
 

gea

Well-Known Member
Dec 31, 2010
3,141
1,182
113
DE
You can assign UID/GID within napp-it (or via CLI command) when you create a new user.
 

ZzBloopzZ

Member
Jan 7, 2013
91
13
8
Ah! That makes it simple. Is this the rough process I should follow?

1. Export pool
2. Create new VM with OmniOS, then install napp-it and configure as needed.
3. Import pool
4. Re-create users with matching UID from original pool
5. Re-create jobs

Then I am good to go?

Thank you.
 

gea

Well-Known Member
Dec 31, 2010
3,141
1,182
113
DE
correct.
- You may need to keep the hostname the same.
- You can save/restore job settings from /var/web-gui/_logs

But even if you do not care anything, its only a re-create jobs and re-assign ACL.
 

ZzBloopzZ

Member
Jan 7, 2013
91
13
8
Hello,

I created new OmniOS VM from scratch. However, when I go into napp-it and attempt to import pool I get the following error posted below. I even exported pool before shutting down original problematic VM. Any suggestions? I hope I did not lose all of my precious data!!!

Edit: Also, I re-created the user accounts using the original UID's. I can see all of my drives under Disks.

Error:




Edit2: Turns out restarting OmniOS was not enough. I restarted ESXi itself, then booted up and tried to Import again. This time it worked and I can access the shares as if nothing ever changed.

I love you ZFS! Such a neat file system.

It was nice setting up everything again from scratch. Good practice, challenge and experience overall.
 
Last edited:

gea

Well-Known Member
Dec 31, 2010
3,141
1,182
113
DE
This is not an error, not even a real warning.
It happens because on a new system without shares, the SMB service is usually not enabled (Is enabled automatically when you activate a share).

If you import a pool where sharing is set to on, it complains that it cannot share (because SMB service is not yet enabled). An optional unshare/share or SMB start can fix this.
 

MatrixMJK

Member
Aug 21, 2014
70
27
18
55
Cool, this explains errors I was seeing trying to imports pools to a brand new install. Got a similar error to the above, but it said it could not import due to existing shares. The import worked fine but I always worried there was a problem. Makes complete sense now. I'll just need to remember to enable SMB before importing.

Thanks for your great work on Napp-It Gea! It is a great system to use!