cannot remove cache

All your general support questions for OpenZFS on OS X.

cannot remove cache

Postby haer22 » Tue May 03, 2016 11:35 pm

I am stuck in this situation everytime I have to reboot my system (or it reboots itself). The cache do not want to play and I cannot remove it.

It is on the same SSD as the log device. If I re-create the pool it works fine but after a reboot, the cache does not want to be imported.

I imported using -d /var/run/disks/by-id and the cache still shows up as disk3s2.

Why is everything found when I do "zpool import" but then not found when I do "zpool import temp" ??
How can I remove the cache if the device cannot be found? The actual device disk3s2 exists but is used by another pool. The device with log and cache for temp is disk5

My other pools works fine, incl their logs and caches

Code: Select all
[ihecc:~] root# zpool import
   pool: temp
     id: 15099724342881457631
  state: ONLINE
 status: One or more devices contains corrupted data.
 action: The pool can be imported using its name or numeric identifier.
   see: http://zfsonlinux.org/msg/ZFS-8000-4J
 config:

   temp                                          ONLINE
     media-8F323135-8C45-ED44-AB55-2FCC37B8CDC0  ONLINE
     media-BF1F9951-D59C-AE43-9705-133ED231D331  ONLINE
   cache
     media-9F1B1BAE-A4ED-4680-8ABD-44616CCEBC98
   logs
     media-96E1AD47-C723-4AFE-A437-A30A49A29A79  ONLINE
[ihecc:~] root# zpool import -d /var/run/disk/by-id temp
[ihecc:~] root# zpool status temp
  pool: temp
 state: ONLINE
status: One or more devices could not be used because the label is missing or
   invalid.  Sufficient replicas exist for the pool to continue
   functioning in a degraded state.
action: Replace the device using 'zpool replace'.
   see: http://zfsonlinux.org/msg/ZFS-8000-4J
  scan: none requested
config:

   NAME                                          STATE     READ WRITE CKSUM
   temp                                          ONLINE       0     0     0
     media-8F323135-8C45-ED44-AB55-2FCC37B8CDC0  ONLINE       0     0     0
     media-BF1F9951-D59C-AE43-9705-133ED231D331  ONLINE       0     0     0
   logs
     media-96E1AD47-C723-4AFE-A437-A30A49A29A79  ONLINE       0     0     0
   cache
     disk3s2                                     FAULTED      0     0     0  corrupted data

errors: No known data errors
[ihecc:~] root# zpool remove temp disk3s2
cannot remove disk3s2: no such device in pool
[ihecc:~] root# zpool replace -f disk3s2 disk5s2
cannot open 'disk3s2': no such pool
haer22
 
Posts: 123
Joined: Sun Mar 23, 2014 2:13 am

Re: cannot remove cache

Postby lundman » Mon May 09, 2016 10:57 pm

Using cache device with name "disk*", and having disk renumbering, is a great way to corrupt disks. I'm not convinced using cache devices is a good idea if you have frequent disk renumberings. Although /var/run/disks/by-id is supposed to help there, if you can managed to change it over.

I thought you removed cache devices with import -m, then zpool remove pool cache-device. That is from memory though
User avatar
lundman
 
Posts: 1337
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: cannot remove cache

Postby haer22 » Mon May 09, 2016 11:07 pm

According to the manual the "-m" flag allows you to "Allows a pool to import when there is a missing log device.". I think it would be a good idea to also skip the cache if that is missing.

I have started to always import stuff using the by-id. I found the "-L" flag so my wish to see something readable is still being fulfilled.
haer22
 
Posts: 123
Joined: Sun Mar 23, 2014 2:13 am

Re: cannot remove cache

Postby dabrahams » Sun Aug 14, 2016 2:22 pm

dabrahams
 
Posts: 10
Joined: Sun Jun 19, 2016 1:06 pm

Re: cannot remove cache

Postby dabrahams » Sun Aug 14, 2016 2:45 pm

Was able to solve it by using the guid listed in the output of zdb for that partition.
dabrahams
 
Posts: 10
Joined: Sun Jun 19, 2016 1:06 pm


Return to General Help

Who is online

Users browsing this forum: No registered users and 21 guests