Re: latest 8.0-BETA2 lost my zfs

From: Stefan Bethke <stb_at_lassitu.de>
Date: Tue, 18 Aug 2009 18:24:48 +0200
Am 18.08.2009 um 16:42 schrieb Danny Braniss:

>> it seems that the latest changes to zfs prevents zpool to see/find
>> the pool in /dev/ad0p4 (BTW, the pool was created under 8.0)
>>
>> # gpart show
>> =>        34  1953525101  ad0  GPT  (932G)
>>          34         128    1  freebsd-boot  (64K)
>>         162     4194304    2  freebsd-ufs  (2.0G)
>>     4194466     8388608    3  freebsd-swap  (4.0G)
>>    12583074  1940942061    4  freebsd-zfs  (926G)
>>
>> # zpool list
>> no pools available
>> # zpool import -a
>> #
>>
>> under 7.2, the pool is still there:
>>
>> pundit-2> zfs list
>> NAME     USED  AVAIL  REFER  MOUNTPOINT
>> z       5.27G   900G    18K  /z
>> z/home  5.21G   900G  5.21G  /home
>> z/var   59.7M   900G  59.7M  /var
>> pundit-2> zpool list
>> NAME   SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
>> z      920G  5.27G   915G     0%  ONLINE  -
>
> running 'truss zpool import -a' reveals the problem:
>
> open("ad0p4",O_RDONLY,00)                        ERR#2 'No such file  
> or directory'
> open("/dev/ad0p4",O_RDONLY,05003312752)          = 5 (0x5)
> ioctl(5,DIOCGSECTORSIZE,0xbfbfa1f4)              = 0 (0x0)
> fstat(5,{ mode=crw-r----- ,inode=75,size=0,blksize=4096 }) = 0 (0x0)
> pread(0x5,0x2834a000,0x40000,0x0,0x0,0x805ab64)  = 262144 (0x40000)
> pread(0x5,0x2834a000,0x40000,0x40000,0x0,0x1bfd8) = 262144 (0x40000)
> pread(0x5,0x2834a000,0x40000,0xfff80000,0xffffffff,0x1bfd8) ERR#5  
> 'Input/output error'
>                             ********** offset is a bit too big :-)
> pread(0x5,0x2834a000,0x40000,0xfffc0000,0xffffffff,0x1bfd8) ERR#5  
> 'Input/output error'

I think the problem is that it doesn't like what it's reading at  
offsets 0 and 0x40000.  The fact that it's not properly reading from  
the end of the device is a seperate bug.

 From a system a couple days old:
# uname -a
FreeBSD diesel.lassitu.de 8.0-BETA2 FreeBSD 8.0-BETA2 #1 r196200: Fri  
Aug 14 12:00:46 CEST 2009     root_at_diesel.lassitu.de:/usr/obj/usr/src/ 
sys/DIESEL  amd64

# truss zpool import
__sysctl(0x7fffffffe4a0,0x2,0x7fffffffe4bc,0x7fffffffe4b0,0x0,0x0) = 0  
(0x0)
...
open("/dev/label/diesel_zfs0",O_RDONLY,00)	 = 6 (0x6)
ioctl(6,DIOCGSECTORSIZE,0xffffa044)		 = 0 (0x0)
fstat(6,{ mode=crw-r----- ,inode=75,size=0,blksize=4096 }) = 0 (0x0)
pread(0x6,0x801253000,0x40000,0x0,0x6d004,0x801200de8) = 262144  
(0x40000)
close(6)					 = 0 (0x0)
	(That's a valid zfs device.)
open("/dev/md0",O_RDONLY,00)			 = 6 (0x6)
ioctl(6,DIOCGSECTORSIZE,0xffffa044)		 = 0 (0x0)
fstat(6,{ mode=crw-r----- ,inode=97,size=0,blksize=4096 }) = 0 (0x0)
pread(0x6,0x801253000,0x40000,0x0,0x6d004,0x801200de8) = 262144  
(0x40000)
pread(0x6,0x801253000,0x40000,0x40000,0x1,0x801200de8) = 262144  
(0x40000)
pread(0x6,0x801253000,0x40000,0xfffffffffff80000,0x1,0x801200de8)  
ERR#5 'Input/output error'
pread(0x6,0x801253000,0x40000,0xfffffffffffc0000,0x1,0x801200de8)  
ERR#5 'Input/output error'
close(6)					 = 0 (0x0)
	(This is not.)


Stefan

-- 
Stefan Bethke <stb_at_lassitu.de>   Fon +49 151 14070811
Received on Tue Aug 18 2009 - 14:25:14 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:54 UTC