On Oct 25, 2011, at 4:38 PM, Jason Edwards wrote: > Hello list, > > I'm working on ZFSguru, a FreeNAS-like distribution based on FreeBSD > that focuses on NAS or Network Attached Storage functionality, > sporting a web-interface et al. > > I've been building FreeBSD 9.0-RC1, and put together a LiveCD using my > own scripts. It works, and boots fine in Virtualbox just like the > other LiveCDs. Though I discovered a problem. > > It appears that some new functionality was put in 9.x to 'symlink' the > new 'ada' devices using AHCI driver to the old-fashioned 'ad' (ATA) > device names, probably to make migration of ATA to AHCI driver more > convenient for users still using hardcoded devices in /etc/fstab > (shame on you!). However, I suspect this is causing a nasty > side-effect, because after having created a GPT partition with a ZFS > pool on it, I cannot import it once I reboot fresh from the LiveCD, > with 'zpool import' showing a corrupt pool. I've seen this before and > generally it means that ZFS cannot read data or that GEOM does funny > things. In this case, it could be that ad6 and ada0 both contain the > same metadata, which somehow causes ZFS to go beserk. > > I would like to debug this issue, but for that I need to disable the > 'ada0 to ad6' symlinking functionality. I've searched for a sysctl > variable which can disable this behavior, but have not found it. > Anyone can enlighten me how I can disable this behavior, so that I > only get /dev/ada0 and no ad6? If the zpool import works again after > that change, this would confirm my suspicions that this behavior is > causing the zpool import command to fail. > > I'm using FreeBSD 9.0-RC1 fetched this morning as RELENG_9, uname: > # uname -a > FreeBSD zfsguru.bsd 9.0-RC1 FreeBSD 9.0-RC1 #0: Tue Oct 25 07:13:52 > UTC 2011 ssh_at_zfsguru:/usr/obj/usr/src/sys/GENERIC amd64 > > > Relevant command output: > > # dmesg | grep ad > (..) > ada0: Previously was known as ad6 > > # ls -l /dev/ad* > lrwxr-xr-x 1 root wheel 4 Oct 25 13:21 /dev/ad6 -> ada0 > lrwxr-xr-x 1 root wheel 6 Oct 25 13:21 /dev/ad6p1 -> ada0p1 > crw-r----- 1 root operator 0, 73 Oct 25 13:20 /dev/ada0 > crw-r----- 1 root operator 0, 75 Oct 25 13:20 /dev/ada0p1 > > # glabel status > Name Status Components > (..) > gpt/testdisk N/A ada0p1 > > # zpool import > pool: tank > id: 17935188179790554412 > state: FAULTED > status: One or more devices contains corrupted data. > action: The pool cannot be imported due to damaged devices or data. > The pool may be active on another system, but can be imported using > the '-f' flag. > see: http://www.sun.com/msg/ZFS-8000-5E > config: > > tank FAULTED corrupted data > 15830803292687600194 UNAVAIL corrupted data > > > Regards, > Jason / sub.mesa Hello Jason, I was struck with this problem too yesterday. I was able to import the pool by specifying the directory where zpool should look for devices. Like : zpool import -d /dev/gptid Alternatively you can try putting kern.cam.ada.legacy_aliases=0 in your /boot/loader.conf Regards, NikolayReceived on Tue Oct 25 2011 - 12:35:12 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:19 UTC