Mike Gerdts
2008-Jun-11 12:51 UTC
[zfs-discuss] zfs promote and ENOSPC (+panic with dtrace)
On Wed, Jun 11, 2008 at 12:58 AM, Robin Guo <Robin.Guo at sun.com> wrote:> Hi, Mike, > > It''s like 6452872, it need enough space for ''zfs promote''Not really - in 6452872 a file system is at its quota before the promote is issued. I expect that a promote may cause several KB of metadata changes that require some space and as such would require more space than the quota. In my case, quotas are not in used. I had over 1.8 GB free before I issued the zfs promote and fully expected to have roughly the same amount of space free after the promote. It seems as though a wrong comparison about the amount of required free space is being made. I have been able to reproduce - but then when I started poking at it with dtrace (no destructive actions) I got a panic. # mdb *.0 Loading modules: [ unix genunix specfs dtrace cpu.generic uppc scsi_vhci zfs random ip hook neti sctp arp usba fctl md lofs sppp crypto ptm ipc fcp fcip cpc logindmux sv nsctl sdbc ufs rdc ii nsmb ]> ::statusdebugging crash dump vmcore.0 (32-bit) from indy2 operating system: 5.11 snv_86 (i86pc) panic message: BAD TRAP: type=e (#pf Page fault) rp=e0620d38 addr=200 occurred in module "<unkn own>" due to a NULL pointer dereference dump content: kernel pages only> ::stack0x200(eb1ea000) zfs_ioc_promote+0x3b() zfsdev_ioctl+0xd8(2d80000, 5a23, 8045e40, 100003, e8b3a020, e0620f78) cdev_ioctl+0x2e(2d80000, 5a23, 8045e40, 100003, e8b3a020, e0620f78) spec_ioctl+0x65(ddfb6c00, 5a23, 8045e40, 100003, e8b3a020, e0620f78) fop_ioctl+0x49(ddfb6c00, 5a23, 8045e40, 100003, e8b3a020, e0620f78) ioctl+0x155() sys_call+0x10c()>The dtrace command that I was running was: dtrace -n ''fbt:zfs:dsl_dataset_promote:return { trace(arg0); stack() }'' -- Mike Gerdts http://mgerdts.blogspot.com/