Restore Role

Coffee0300

Dabbler
Joined
Apr 23, 2023
Messages
13
I really need some assistance... I'm sure the problem is pebkac but despite researching here and generally on the web for the last 3 days, I'm stuck. I'll try to forego the novel and get straight to the problem but if I miss pertinent details, I'm happy to oblige.

My house is wired for coax and not ethernet. I've made the best of Moca networking but despite my efforts, my office is connected by wireless while my Scale box is wired in to my network rack. I'm currently on v22.12.1. I've got a samba share and a iSCSI dataset and both were working... well enough. Transfers to my win10 desktop were working but were quite slow. I'm eventually going to hard wire my office but that's another 4-5 projects down the road so I thought to bring my Nas down, hook it up to my two computers in the office via a switch and let the Nas box get back out to the internet by bridging my ethernet and wireless connections. That's a long story but I'll just wrap it up by saying it didn't work as well as I hoped. However, while troubleshooting a hardline connection between the two, I wiped the configuration of Scale. When all that didn't work and I put it back into the rack, imported all my datapools/sets and restored from a configuration snapshot for the main data pool.

Now for the problems I actually need help with. The roles associated with each share were never restored. I thought the roles would've been restored from the snapshot but... maybe I just didn't restore correctly? I was able to successfully rebuild the role for the SMB share but no dice on iSCSI. When I try to recreate the iSCSI target via the wizard, I'm blocked because the dataset already exists. When I try to rebuild it by configuring the portal, group, initiator by hand, I haven't been able to select the zvol named homelab. I've tried creating a brand new zvol and then using the wizard to create an initiator and could successfully point it to the that. Now dice getting a role back onto the old zvol. I'm well and truly stuck...
 

Attachments

  • Datapools.png
    Datapools.png
    9.1 KB · Views: 150
  • Wizard.png
    Wizard.png
    9.8 KB · Views: 159

Coffee0300

Dabbler
Joined
Apr 23, 2023
Messages
13
My hardware is as such:
  • Jonsbo N1
  • Asus Strix B550-I
  • AMD Ryzen 5 PRO 5650G
  • Kingston ECC Ram - 64 GB
  • Crucial ssd 256 GB Boot Drive
  • WD Red Pro 14 TB x5 - 5 wide RAIDZ1
  • Intel Optane 118 GB x2 - Mirrored Metadata VDEV
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Many of your problems are due to having spaces in the names of your datasets and zvols. See


If I understand your pool layout, your zvol is actually named "Home Lab", and is encrypted. What's the output of zfs get all "Bannakaffalatta/Home Lab"?
 

Coffee0300

Dabbler
Joined
Apr 23, 2023
Messages
13
Indeed, I put a space in the name of the zvol but thought it was simply a display name. Everywhere else, I made it one word.
 

Attachments

  • output.png
    output.png
    98.3 KB · Views: 156

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
OK, let's try zfs rename "Bannakaffalatta/Home Lab" Bannakaffalatta/homelab. If that succeeds, then check the zvol correctly renamed by looking at the zvol mount point at /dev/zvol/Bannakaffalatta/ to verify the block device was renamed to homelab from "Home Lab".
 

Coffee0300

Dabbler
Joined
Apr 23, 2023
Messages
13
cannot open 'Bannakaffalatta/Home Lab' : dataset does not exist.
 

Coffee0300

Dabbler
Joined
Apr 23, 2023
Messages
13
Home Lab was created as a zvol. Are we using the right command to rename a zvol?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Yes, zfs rename works on both datasets and zvols. What's actually in /dev/zvol/Bannakaffalatta?
 

Coffee0300

Dabbler
Joined
Apr 23, 2023
Messages
13
I'm not sure how to answer that question just yet. I would point you to my first screen grab of the pool with the smb dataset and the home lab zvol. Only other item is an ix-applications dataset. I ran a get all for the parent just in case I wasn't understanding.
 

Attachments

  • output.png
    output.png
    63.1 KB · Views: 144

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
All I'm asking for is ls -l /dev/zvol/Bannakaffalatta.
 

Coffee0300

Dabbler
Joined
Apr 23, 2023
Messages
13
My apologies. Output below:

total 0
lrwxrwxrwx 1 root root 10 Apr 23 17:33 homelab -> ../../zd16
 

Coffee0300

Dabbler
Joined
Apr 23, 2023
Messages
13
Total 0 seems... concerning. That would seem to suggest I didn't actually mount anything. I'm sure you've already picked up on the fact that I'm a script kiddy. I know just enough to get myself into trouble.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
No, symlinks are always size 0. The actual block device is [/file]/dev/zd16[/file]. What's the output of zfs list -r "Bannakaffalatta/Home Lab"?
 

Coffee0300

Dabbler
Joined
Apr 23, 2023
Messages
13
"Dataset does not exist."
 

Coffee0300

Dabbler
Joined
Apr 23, 2023
Messages
13
Just to make sure I'm doing this correctly, I'm running these commands from the the system gui shell. Should I be running them a different way?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Are you using single or double quotes?
 

Coffee0300

Dabbler
Joined
Apr 23, 2023
Messages
13
Copy your command and shift+insert into command line. Quotes are exactly as you posted them.
 

Coffee0300

Dabbler
Joined
Apr 23, 2023
Messages
13
Posting to hopefully bump this topic as I'm still struggling to figure out what my issue is. I'm now wondering if I can simply create a new role and attach it to the home lab zvol. I've tried this numerous ways and have been stymied each time. Hopefully the community can point me in the right direction for this... Alternatively, where does truenas/linux store the user/permissions associated with a zvol meant for iscsi? Is that entirely in the configuration file or would that be found in one of the various snapshots?
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
I’m going to throw this out there because I’m curious to know.
Doesn’t the command need to be zfs rename "/mnt/Bannakaffalatta/Home Lab" /mnt/Bannakaffalatta/homelab?
Also is Bannakaffalatta your pool name? Or a dataset underneath your pool?
 
Last edited:

Coffee0300

Dabbler
Joined
Apr 23, 2023
Messages
13
Thanks Victort, that actually worked. "Home Lab" has been renamed "homelab".

Banna is the pool with home lab and such underneath. I've got some Dr. Who fans in the house and started a theme with that. Perhaps a bit embarrassing to admit online but it works for the home.
 

Attachments

  • homelab output.png
    homelab output.png
    97.9 KB · Views: 144
Top