Lines Matching full:vdev
36 * We keep case files for any leaf vdev that is not in the optimal state.
73 #include "vdev.h"
109 * We only carry one active case per-vdev. in Find()
173 CaseFile::Create(Vdev &vdev) in Create() argument
177 activeCase = Find(vdev.PoolGUID(), vdev.GUID()); in Create()
179 activeCase = new CaseFile(vdev); in Create()
252 Vdev vd(casePool, CaseVdev(casePool)); in RefreshVdevState()
263 CaseFile::ReEvaluate(const string &devPath, const string &physPath, Vdev *vdev) in ReEvaluate() argument
271 * The pool or vdev for this case file is no longer in ReEvaluate()
278 "CaseFile::ReEvaluate(%s,%s) Pool/Vdev unconfigured. " in ReEvaluate()
298 syslog(LOG_INFO, "CaseFile::ReEvaluate(%s,%s): Pool/Vdev ignored", in ReEvaluate()
303 if (vdev != NULL in ReEvaluate()
304 && ( vdev->PoolGUID() == m_poolGUID in ReEvaluate()
305 || vdev->PoolGUID() == Guid::InvalidGuid()) in ReEvaluate()
306 && vdev->GUID() == m_vdevGUID) { in ReEvaluate()
310 if (zpool_vdev_online(pool, vdev->GUIDString().c_str(), in ReEvaluate()
313 "Failed to online vdev(%s/%s:%s): %s: %s\n", in ReEvaluate()
314 zpool_get_name(pool), vdev->GUIDString().c_str(), in ReEvaluate()
320 syslog(LOG_INFO, "Onlined vdev(%s/%s:%s). State now %s.\n", in ReEvaluate()
321 zpool_get_name(pool), vdev->GUIDString().c_str(), in ReEvaluate()
326 * Check the vdev state post the online action to see in ReEvaluate()
371 "Replace vdev(%s/%s) by physical path (label): %s: %s\n", in ReEvaluate()
391 * The Vdev we represent has been removed from the in ReEvaluate()
414 * The pool or vdev for this case file is no longer in ReEvaluate()
421 "CaseFile::ReEvaluate(%s,%s) Pool/Vdev " in ReEvaluate()
464 * If this vdev is DEGRADED, FAULTED, or UNAVAIL, try to in ReEvaluate()
487 /* Find a Vdev containing the vdev with the given GUID */
503 Vdev vdev(pool_config, vdevChildren[ch]); in find_parent() local
505 if (vdev.GUID() == child_guid) in find_parent()
540 syslog(LOG_ERR, "CaseFile::ActivateSpare: Could not find vdev " in ActivateSpare()
550 * Don't activate spares for members of a "replacing" vdev. in ActivateSpare()
577 "find vdev stats for pool %s, spare %d", in ActivateSpare()
606 "the vdev type of pool %s, spare %d. Error %d", in ActivateSpare()
794 * If the vdev is already degraded or faulted, in DeSerializeFile()
797 * state. However, if the vdev is simply missing, in DeSerializeFile()
815 * or this vdev is no longer a member of in DeSerializeFile()
823 * Any vdev we find that does not have a case file in DeSerializeFile()
827 caseFile = new CaseFile(Vdev(zpl.front(), vdevConf)); in DeSerializeFile()
856 CaseFile::CaseFile(const Vdev &vdev) in CaseFile() argument
857 : m_poolGUID(vdev.PoolGUID()), in CaseFile()
858 m_vdevGUID(vdev.GUID()), in CaseFile()
859 m_vdevState(vdev.State()), in CaseFile()
860 m_vdevPhysPath(vdev.PhysicalPath()), in CaseFile()
861 m_is_spare(vdev.IsSpare()) in CaseFile()
873 m_vdevName = vdev.Name(zhp, false); in CaseFile()
1033 * or this vdev is no longer a member of in OnGracePeriodEnded()
1044 /* Fault the vdev and close the case. */ in OnGracePeriodEnded()
1047 syslog(LOG_INFO, "Faulting vdev(%s/%s)", in OnGracePeriodEnded()
1054 syslog(LOG_ERR, "Fault vdev(%s/%s): %s: %s\n", in OnGracePeriodEnded()
1062 /* Degrade the vdev and close the case. */ in OnGracePeriodEnded()
1065 syslog(LOG_INFO, "Degrading vdev(%s/%s)", in OnGracePeriodEnded()
1072 syslog(LOG_ERR, "Degrade vdev(%s/%s): %s: %s\n", in OnGracePeriodEnded()
1082 Vdev
1084 Vdev vd(zhp, CaseVdev(zhp)); in BeingReplacedBy()
1085 std::list<Vdev> children; in BeingReplacedBy()
1086 std::list<Vdev>::iterator children_it; in BeingReplacedBy()
1088 Vdev parent(vd.Parent()); in BeingReplacedBy()
1089 Vdev replacing(NonexistentVdev); in BeingReplacedBy()
1107 Vdev child = *children_it; in BeingReplacedBy()
1109 /* Skip our vdev. */ in BeingReplacedBy()
1140 Vdev vd(zhp, CaseVdev(zhp)); in Replace()
1141 Vdev replaced(BeingReplacedBy(zhp)); in Replace()
1162 * Build a root vdev/leaf vdev configuration suitable for in Replace()
1171 syslog(LOG_ERR, "Replace vdev(%s/%s): Unable to allocate " in Replace()
1182 syslog(LOG_ERR, "Replace vdev(%s/%s): Unable to initialize " in Replace()
1189 /* Data was copied when added to the root vdev. */ in Replace()
1195 syslog(LOG_INFO, "Replacing vdev(%s/%s) with %s\n", in Replace()
1198 syslog(LOG_ERR, "Replace vdev(%s/%s): %s: %s\n", in Replace()
1206 /* Lookup the vdev prop. Used for checksum, IO, or slow IO props */