Christian Walther
2008-Oct-22 19:51 UTC
[zfs-discuss] ZFS Pool can''t be imported on fresh install with one broken vdev
Hi, I recently had to reinstall OpenSolaris on my home server, after I managed to break the install while fiddling around with the new package system. Anyway, the day I wanted to do the reinstall one of my hard disks broke down with a head crash, leaving the pool in the following state: ----------------------------------------------------------------------------- # zpool import # pwd /systpool/ROOT/snv_91/etc/zfs nathan# ls zpool.cache nathan# zpool import pool: datapool id: 4576033949025518067 state: DEGRADED status: The pool was last accessed by another system. action: The pool can be imported despite missing or damaged devices. The fault tolerance of the pool may be compromised if imported. see: http://www.sun.com/msg/ZFS-8000-EY config: datapool DEGRADED raidz1 DEGRADED c1d0 ONLINE c1d1 ONLINE c2d0 FAULTED corrupted data c0d1 ONLINE ----------------------------------------------------------------------------- The problem is, that the import doesn''t work, even with -f: ----------------------------------------------------------------------------- # zpool import datapool cannot import ''datapool'': pool may be in use from other system, it was last accessed by nathan.alashan.nongo (hostid: 0x119c53df) on Tue Sep 30 21:10:12 2008 use ''-f'' to import anyway # zpool import -f datapool cannot import ''datapool'': one or more devices is currently unavailable ----------------------------------------------------------------------------- I discussed this issue with my colleagues and we''re sure that this should work. Am I missing something here, or does the combination of a fresh install and a broken pool trigger a bug in ZFS? Regards Christian Walther -- This message posted from opensolaris.org
Christian Walther
2008-Nov-01 23:33 UTC
[zfs-discuss] ZFS Pool can''t be imported on fresh install with one broken vdev
Nobody? Should I open a bug report? Maybe some more info: The port the broken disk was attached to is no used by the new boot device containing a fresh zpool. I didn''t want to loose all information from the old root pool, so I decided to use another disk temporarily. Is it possible that the zpool import doesn''t fail because there''s a device missing, but because the port of this missing device is in use by another one belonging to a different poo? -- This message posted from opensolaris.org
Christian Walther
2008-Nov-03 21:49 UTC
[zfs-discuss] FIXED: Re: ZFS Pool can''t be imported on fresh install with one broken vdev
Okay, I found out what the problem was: As I expected in my last post ZFS didn''t like the idea of having another disk containing a running zpool on a location that was previously occupied by a disk that died. Last weekend I created a few snapshots to be moved to another disk, so today I was able to remove this disk. A normal # zpool import datapool afterwards did the trick. For the record: My configuration is based on 4 PATA Disks and 1 SATA drive. The SATA drive is supposed to be a boot disk (I''m about to get another one to setup a proper mirror). Now, one of my PATA disks died after I managed to ruin the boot archives, so I had to reinstall. Since I wanted to keep the configuration of my first install intact I had to use another disk -- and there was a spare 20GB PATA drive lying around. I attached it to the port the broken disk was attached to before, because it was the only free PATA port. During the reinstall the 20GB PATA drive attached to the port of the previously failed disk became the new rootpool. Something ZFS doesn''t seem to like. Conclusion: Never attach a disk that is not supposed to be a replacement for a faulted drive to a port that is used in a zpool configuration. The question remains wether or not this is supposed to be standard behaviour, or a bug. Might be a philosophical issue to be discussed. But at least I expect ZFS to be more precise in this regard. A message like "Error: Pool can''t be exported because at least one device has been exchanged with a device belonging to a different pool that is already imported on this system" would be fine. -- This message posted from opensolaris.org