USB disk names question

All your general support questions for OpenZFS on OS X.

USB disk names question

Postby dronnyboyd » Sun Dec 08, 2019 3:25 am

hi all, first time in the forums for me, I have a question about O3X on Catalina... I have 2 x 2TB external USB drives connected to my mac mini, and created a pool on there, no problem, all is working well. I also installed ZetaWatch (which is awesome, by the way!), although that's probably irrelevant.

My problem is, when I restart the mac mini, the pool doesn't auto-mount. If I manually run "zpool import tank" then it does, but I'm wondering if the problem is because I created the pool usin gthe plain disk names, i.e. disk2 and disk3. If I do "zpool status" I get this:-

Code: Select all
  pool: tank
 state: ONLINE
  scan: none requested
config:

   NAME                                            STATE     READ WRITE CKSUM
   tank                                            ONLINE       0     0     0
     mirror-0                                      ONLINE       0     0     0
       media-DD742F45-1C02-CD4A-B18A-8C10FEC3ACE3  ONLINE       0     0     0
       PCI0@0-PEG2@1,2-UPSB@0-DSB2@2-XHC3@0-@2:1   ONLINE       0     0     0


and I'm now wondering whether ~I should have used disk-by-uuid to name them, or something? The 2 disks are identical but seem to have different names in this output, I have no idea if this is related, I'm kind of cluthcing at straws here.

So my question really is, could this be why "zpool import" after reboot fails to mount the drives?

And secondly, can I re-build the pool from the same drives, but by referring to their disk-by-uuid identities rather than disk2 and so on? Without losing the content of my pool, I mean.

thanks in advance

Dronny
dronnyboyd
 
Posts: 7
Joined: Sat Dec 07, 2019 1:56 am

Re: USB disk names question

Postby lundman » Sun Dec 08, 2019 3:45 pm

You want those names, and not "disk2" etc, since they can renumber.

But we are having some issues with pools not autoimporting, especially on Catalina, where the script runs too soon.
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: USB disk names question

Postby tangles » Mon Dec 09, 2019 4:24 am

The first disk entry starting with media- is expected and is a good thing.

That 2nd entry looks like a raw string to a device to me which reminds me of what sudo dmesg would output.
I'd guess you're using a USB3 connection also by the looks of it. If you are using USB, well… google it I guess and make up your own mind.

Have your drive entries in your pool always printed out like this when issuing zpool status?

This 2nd entry is not healthy and is most likely/probably the reason why auto mounting is not working for you.

It's actually impressive that ZFS can still find the disk and mount it for you when you do it manually too.

You could split your pool to create two different pools, and then erase the disk using dd to write zeros onto the first few hundred megabytes. Then attach the disk again to reform your mirror. (google zpool split, dd to erase a disk and zpool attach)

Once you recreate your mirror, just keep your pool disconnected when you boot your Mac mini and then plug in your pool (assuming you're not using it for /Users) in to manually mount it until an update comes out to correct the issue.

Cheers,
tangles
 
Posts: 195
Joined: Tue Jun 17, 2014 6:54 am

Re: USB disk names question

Postby UnConundrum » Mon Dec 09, 2019 6:22 am

Just solved a similar problem, although mine was with Lingon.

Go to System Preferences -> Security & Privacy -> Full Disk Access and make sure sh is checked in the list of allowed apps.
UnConundrum
 
Posts: 13
Joined: Tue Dec 03, 2019 12:30 pm

Re: USB disk names question

Postby dronnyboyd » Mon Dec 09, 2019 8:49 am

lundman wrote:You want those names, and not "disk2" etc, since they can renumber.

But we are having some issues with pools not autoimporting, especially on Catalina, where the script runs too soon.


Okay, thanks. I have someother advice in this thread to follow, I'll try to make sure I use the proper disk names.
Last edited by dronnyboyd on Mon Dec 09, 2019 11:26 am, edited 1 time in total.
dronnyboyd
 
Posts: 7
Joined: Sat Dec 07, 2019 1:56 am

Re: USB disk names question

Postby dronnyboyd » Mon Dec 09, 2019 8:55 am

tangles wrote:The first disk entry starting with media- is expected and is a good thing.


Thanks, that's good to know, I'm a bit of a noob with MacOS (although been using Linux for years), so wasn't entirely sure what to look for, but the 2nd one did look suspicious even to me :)

tangles wrote:hat 2nd entry looks like a raw string to a device to me which reminds me of what sudo dmesg would output.
I'd guess you're using a USB3 connection also by the looks of it. If you are using USB, well… google it I guess and make up your own mind.


Yeah, I realised after I'd decided on the hardware, too late now...

tangles wrote:Have your drive entries in your pool always printed out like this when issuing zpool status?


Yes, as far as I recall, I've only been running the system for a few weeks, though, and upgraded to Cataline *before* installing O3X and the USB-C drives.

tangles wrote:This 2nd entry is not healthy and is most likely/probably the reason why auto mounting is not working for you.


I was suspicious myself, it just looks "wrong" even to me.

tangles wrote:You could split your pool to create two different pools, and then erase the disk using dd to write zeros onto the first few hundred megabytes. Then attach the disk again to reform your mirror. (google zpool split, dd to erase a disk and zpool attach)

Once you recreate your mirror, just keep your pool disconnected when you boot your Mac mini and then plug in your pool (assuming you're not using it for /Users) in to manually mount it until an update comes out to correct the issue.

Cheers,


Thanks, I'll consult google and give that a try.
dronnyboyd
 
Posts: 7
Joined: Sat Dec 07, 2019 1:56 am

Re: USB disk names question

Postby dronnyboyd » Mon Dec 09, 2019 10:43 am

I'm not sure I was entirely clear about my 2nd question...

And secondly, can I re-build the pool from the same drives, but by referring to their disk-by-uuid identities rather than disk2 and so on? Without losing the content of my pool, I mean.


What I meant was (and forgive me if this is what your answer was saying), can I just somehow "re-configure" the pool so that it refers to the drives by uuid (rather than diskN) somehow? Or is that what you meant by
You could split your pool to create two different pools, and then erase the disk using dd to write zeros onto the first few hundred megabytes. Then attach the disk again to reform your mirror. (google zpool split, dd to erase a disk and zpool attach)

Would "detach" followed by "attach" work just the same?

I was hoping there was something simpler :) and less destructive to the pool's existing content. What if I were to create a new pool with the same disks, but naming them "by uuid" this time? I'm guessing that would erase the old pool somehow, and I would lose the content?

Apologies for the confusion here, and thanks for all the advice so far...
dronnyboyd
 
Posts: 7
Joined: Sat Dec 07, 2019 1:56 am

Re: USB disk names question

Postby lundman » Mon Dec 09, 2019 4:57 pm

What I meant was (and forgive me if this is what your answer was saying), can I just somehow "re-configure" the pool so that it refers to the drives by uuid (rather than diskN) somehow? Or is that what you meant by


That is easy. You can "zpool export pool" "zpool import -d /var/run/disk/by-uuid pool". Ie, just import it from the invariantdisk paths you prefer, and it will use that. And you can use "-d /dev" to go back to disk names (can be useful for some operations) then return back to by-serial or whatever you prefer.
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: USB disk names question

Postby tangles » Mon Dec 09, 2019 7:56 pm

assuming u do what Lundman suggests and that strange reference to the 2nd disk disappears…

if it does/refuses to chance, something deeper/more strange going on with that USB chipset of yours..
tangles
 
Posts: 195
Joined: Tue Jun 17, 2014 6:54 am

Re: USB disk names question

Postby dronnyboyd » Tue Dec 10, 2019 12:06 pm

Thanks to both lundman and tangles, I will give this a try now.
dronnyboyd
 
Posts: 7
Joined: Sat Dec 07, 2019 1:56 am

Next

Return to General Help

Who is online

Users browsing this forum: Google [Bot] and 25 guests