script to identify physical disks not part of a pool?

All your general support questions for OpenZFS on OS X.

script to identify physical disks not part of a pool?

Postby tangles » Fri May 12, 2017 1:47 am

Hi,

Looks like I need a script that identifies a physical disk that is not part of any currently mounted pool...

Image

Code: Select all
diskutil list | grep ZFS
will get me by for now, but am curious if anyone has already written something.

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

Re: script to identify physical disks not part of a pool?

Postby lundman » Tue May 16, 2017 4:29 pm

Ah hmm, active disks can use -L to follow through, but for the dead disk.. Presumably you can't "ls" the /var/run symlink as it is gone, but invariantdisk does produce log output, so you could probably grep the symlink name and get the original disk name. I wonder if there are better ways
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan


Return to General Help

Who is online

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

cron