Monkadelic_D
Cadet
- Joined
- Feb 10, 2019
- Messages
- 2
I am working on downsizing from a half rack of 6 servers (heat generator) to a single tower PC while I try to sell the hardware and build a single box for VMs and storage.
My first step was to reduce my 12 drive, 2 zpool (2x mirrored vdevs of 4 disks in pool 1, 4x mirrored vdevs of 8 disks in pool 2). I was only using around 750GiB of space in pool 1 and 2.7TiB of space in pool 2. The temporary mid-tower PC I'm going to move the pools to only has mounting for 4 drives so I used
This put my usage on pool 2 up at 85% or so. I decided I could loosely connect 2 more drives in the mid-tower so I could have some space to grow while I work on building the new system.
I tried to add drives back to the pool using the shell and, in my over zealous newbiness, added disks incorrectly. I wiped the disks and, mistakenly, just added two single disk vdevs instead of a mirror vdev. They weren't partitioned like the disks in pools that I setup using the FreeNAS UI. I know I can't remove top level vdevs unless they are mirror vdevs so I added a second disk to each of the mirrors so I could then remove them. When I tried to remove the mirror vdevs I got an error stating that the vdev could not be removed because the sector size wasn't the same, or raidz was used, or something else. Yes, I know I should have just used the expand pool feature but I kept getting an error about indirect disks or something. I was trying to add back some of the same disks I had removed.
So I decided to backup all the data on pool 2 and just recreate it with all the same exact settings. I was hoping that if I didn't delete the samba share settings the shares would just work when I recreated the pool. This is where I'm at now. The SMB clients cannot connect to the shares anymore. In Linux I get the following error in dmesg:
If I tried to list SMB shares available to my user I would see the shares associated with pool 1, but none of the shares for pool 2.
I have verified that all settings are exactly the same in the datasets that are shared. I was going to recreate the SMB shares but I can't delete them. I get an error dialog that reads:
I didn't realize until later that the share actually did delete, it was still listed until I refreshed the page. Once I recreated the SMB share I could connect from clients.
I started writing this post before I realized the SMB shares did actually delete. I wanted to post all this either way as a tip/tale for others to learn from.
What happened is outlined above. What I expected to happen is:
My first step was to reduce my 12 drive, 2 zpool (2x mirrored vdevs of 4 disks in pool 1, 4x mirrored vdevs of 8 disks in pool 2). I was only using around 750GiB of space in pool 1 and 2.7TiB of space in pool 2. The temporary mid-tower PC I'm going to move the pools to only has mounting for 4 drives so I used
zpool remove pool_1 mirror-1
and so on and so forth to reduce each pool down to a single mirrored pair of disks.This put my usage on pool 2 up at 85% or so. I decided I could loosely connect 2 more drives in the mid-tower so I could have some space to grow while I work on building the new system.
I tried to add drives back to the pool using the shell and, in my over zealous newbiness, added disks incorrectly. I wiped the disks and, mistakenly, just added two single disk vdevs instead of a mirror vdev. They weren't partitioned like the disks in pools that I setup using the FreeNAS UI. I know I can't remove top level vdevs unless they are mirror vdevs so I added a second disk to each of the mirrors so I could then remove them. When I tried to remove the mirror vdevs I got an error stating that the vdev could not be removed because the sector size wasn't the same, or raidz was used, or something else. Yes, I know I should have just used the expand pool feature but I kept getting an error about indirect disks or something. I was trying to add back some of the same disks I had removed.
So I decided to backup all the data on pool 2 and just recreate it with all the same exact settings. I was hoping that if I didn't delete the samba share settings the shares would just work when I recreated the pool. This is where I'm at now. The SMB clients cannot connect to the shares anymore. In Linux I get the following error in dmesg:
CIFS VFS: BAD_NETWORK_NAME: \\ip.of.my.freenas\Share_Name
CIFS VFS: cifs_mount failed w/return code = -2
If I tried to list SMB shares available to my user I would see the shares associated with pool 1, but none of the shares for pool 2.
I have verified that all settings are exactly the same in the datasets that are shared. I was going to recreate the SMB shares but I can't delete them. I get an error dialog that reads:
Error: Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/smb.py", line 1001, in _delete
await self._sharesec(action='--delete', share=share)
File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/smb.py", line 988, in _sharesec
raise CallError(f'sharesec {action} failed with error: {sharesec.stderr.decode()}')
middlewared.service_exception.CallError: [EFAULT] sharesec --delete failed with error: Invalid sharename: Share_Name
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 130, in call_method
io_thread=False)
File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1077, in _call
return await methodobj(*args)
File "/usr/local/lib/python3.7/site-packages/middlewared/service.py", line 410, in delete
f'{self._config.namespace}.delete', self, self.do_delete, [id] + list(args)
File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1077, in _call
return await methodobj(*args)
File "/usr/local/lib/python3.7/site-packages/middlewared/schema.py", line 960, in nf
return await f(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/smb.py", line 771, in do_delete
await self.middleware.call('smb.sharesec._delete', share['name'] if not share['home'] else 'homes')
File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1127, in call
app=app, pipes=pipes, job_on_progress_cb=job_on_progress_cb, io_thread=True,
File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1077, in _call
return await methodobj(*args)
File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/smb.py", line 1004, in _delete
raise CallError(e)
middlewared.service_exception.CallError: [EFAULT] [EFAULT] sharesec --delete failed with error: Invalid sharename: Share_Name
I didn't realize until later that the share actually did delete, it was still listed until I refreshed the page. Once I recreated the SMB share I could connect from clients.
I started writing this post before I realized the SMB shares did actually delete. I wanted to post all this either way as a tip/tale for others to learn from.
What happened is outlined above. What I expected to happen is:
- backup data
- export/disconnect pool
- create new pool
- create datasets that match old pool's datasets, which matched the already configured SMB shares
- restore data
- remount SMB shares on clients
- profit