From owner-soc-status@freebsd.org Mon Aug 10 18:24:18 2015 Return-Path: Delivered-To: soc-status@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1B6199E258 for ; Mon, 10 Aug 2015 18:24:18 +0000 (UTC) (envelope-from prasadjoshi.linux@gmail.com) Received: from mail-vk0-x22f.google.com (mail-vk0-x22f.google.com [IPv6:2607:f8b0:400c:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 56B709F1 for ; Mon, 10 Aug 2015 18:24:18 +0000 (UTC) (envelope-from prasadjoshi.linux@gmail.com) Received: by vkhl6 with SMTP id l6so61868480vkh.1 for ; Mon, 10 Aug 2015 11:24:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=dsNcEumiVjT5xEsMHHCMjotnZMfqFWuf+KVB6qlF9vA=; b=oA8dkoV2bPNWumhTHqvF+c1cEvFzXnu+Qv4IN0yjawmcQ2fG0JJ0CGZMvQVubb/Zi/ Vx3fdOb5Nm4s+nc3Bckc+2fSro2t/KgJwT7JgbrXw8XmSivFOH7PimrZlkO4nnmz56dU 4cvUHjVB5QWTzYPXE9n3LtYi+zr8mQw2mi1dbKYacseqWvaCWZWvwY8wqZLa4ZMrLC9L B1L5Ry3oRABokGblfD0IrIWXhOwpg9D5TSgBwJCm7mAeIVeHtsnfxgb7JBEcyMG/FEn/ o6MPO6dw7O89Qvd3NoXaWPAUkmKuYWSDKmlzuY76mkgqH53t5XfAraA0XzJK5zPpHHLy tyFw== MIME-Version: 1.0 X-Received: by 10.52.122.52 with SMTP id lp20mr24902649vdb.64.1439231057135; Mon, 10 Aug 2015 11:24:17 -0700 (PDT) Received: by 10.31.50.6 with HTTP; Mon, 10 Aug 2015 11:24:17 -0700 (PDT) Received: by 10.31.50.6 with HTTP; Mon, 10 Aug 2015 11:24:17 -0700 (PDT) In-Reply-To: References: Date: Mon, 10 Aug 2015 23:54:17 +0530 Message-ID: Subject: Re: [gsoc15] dynamically discover bes From: Prasad Joshi To: soc-status@freebsd.org Cc: Xin LI Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: soc-status@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Summer of Code Status Reports and Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Aug 2015 18:24:18 -0000 1. Fixed broken sort functionality 2. Printf compilation problem is fixed 3. Started working on multiple SPA support Tasks for next week ================ Complete multiple SPA support. - Prasad On Aug 4, 2015 1:01 AM, "Prasad Joshi" wrote: > Status Report > =========== > 1. Added flat zap support > 2. Removed common, unnecessary code. > 3. When machine bootsup, instead of waiting for a keypress to show > bootmenu, now it is displayed as soon as machine starts. If no key is > pressed, default BE is used for booting in 5 seconds > > Tasks for coming week > ================== > 1. Fix broken sort functionality > 2. Fix util.c and libstand.a compilation problem > 3. Special keys for example arrow keys, home, pageup etc aren't working > till now > > On Tue, Jul 28, 2015 at 1:04 AM, Prasad Joshi > wrote: > > Status report > > ========== > > The BEs menu is working. With my code changes, when machine is booted > > by default gptzfsboot tries to boot an active BE. However, if user > > presses any key, the code finds out all BEs and displays menu for > > selection to user. Once user selects a BE to boot from, appropriate > > information is passed to next stage of boot loader. > > > > Tasks for coming week > > ================= > > 1. I disabled some of the existing gptzfsboot code which handles > > serial console. I will try to enable it again and check if menu > > functionality works on serial console. > > > > Thanks and Regards, > > Prasad > > > > On Sun, Jul 12, 2015 at 10:03 PM, Prasad Joshi > > wrote: > >> Status report for past two weeks > >> ========================= > >> - Last two weeks I struggled to get non-active BE to boot completely - > >> after zfs mount -a all files in /dev/ used to disappear. Finally > >> disabling canmount property on each dataset helped me boot non-active > >> BEs. > >> > >> - I added code to pass mountpoint information from gptzfsboot to > >> zfsloader, then from zfsloader I could set vfs.root.mountfrom env > >> variable. > >> > >> - Added code to find timestamp of each BE clone, with this change BEs > >> could now be sorted on either timestamp, BE name, or object number > >> > >> Tasks For coming week > >> ================== > >> 1. start the initial implementation of menu functionality. > >> > >> On Tue, Jun 30, 2015 at 7:26 PM, Prasad Joshi > >> wrote: > >>> Week 5 Update > >>> > >>> - I did not work on GSoC for 3 days in this week. Had to attend full > >>> day sessions in the University. > >>> - Last week I was faced with a problem with booting alternate > >>> (non-active) BE. Plan in this week was to locate the problem. It seems > >>> like, during bootup zfsloader needs to initialize libzfs library. The > >>> libzfs library initialization fails because '/dev/zfs' cannot be > >>> opened. I verified the zfs kernel modules, which create the device are > >>> loaded. I think, and as suggested by mentor, I will have to set > >>> vfs.root.mountfrom environment variable during bootup. > >>> > >>> Thanks and Regards, > >>> Prasad > >>> > >>> On Mon, Jun 22, 2015 at 11:42 PM, Prasad Joshi > >>> wrote: > >>>> Week 4 update > >>>> > >>>> - I have been able to discover BEs on console. I could detect active > BE. > >>>> Created list of BEs. Code to sort BEs on object number, name, or > timestamp > >>>> is added. > >>>> > >>>> - I am able to boot from nonactive BE to some extent. At the moment, > code > >>>> requires me to enter BE number to boot from. > >>>> > >>>> Tasks next week > >>>> 1. Identify a problem with be bootup. > >>>> 2. Pass mount point info through env variable to loader. > >>>> 3. Start with console based menu. > >>>> > >>>> Thanks and Regards, > >>>> Prasad > >>>> > >>>> On Jun 15, 2015 7:48 PM, "Prasad Joshi" > wrote: > >>>>> > >>>>> Week 3 status > >>>>> ========== > >>>>> After understanding on disk representation of snapshots and clones, I > >>>>> have been able to find names of the BEs created using beadm command. > I > >>>>> could print the BE names on console. > >>>>> > >>>>> The next task would be to convert BE names to object numbers, create > >>>>> list of BEs. > >>>>> > >>>>> Thanks and Regards, > >>>>> Prasad > >>>>> > >>>>> On Tue, Jun 9, 2015 at 6:36 AM, Prasad Joshi > >>>>> wrote: > >>>>> > Last week I mostly worked on understanding beadm and gptzfsboot > code > >>>>> > > >>>>> > beadm create prepares new BE by creating a snapshot and clone of > that > >>>>> > snapshot. beadm activate command sets bootfs property of the POOL. > >>>>> > bootfs property contains object number of active dataset object. > >>>>> > During bootup gptzfsboot probes all the disks, creating SPA for any > >>>>> > valid pool. gptzfsboot assumes the first pool it finds as a primary > >>>>> > pool, it then reads meta object set, then tries to find object > nunber > >>>>> > of active dataset object either through > >>>>> > a. bootfs - it would be set if BE was already created > >>>>> > b. mos->properties_zap->root_dataset->dd_head_dataset_obj (through > >>>>> > root_datasets bonus buffer) > >>>>> > Once the object number is obtaind gptzfsboot mounts the dataset. > >>>>> > > >>>>> > After mounting, few files are looked up like /boot/config or > >>>>> > /boot.config for presense of boot command (did not went into > details > >>>>> > of this). Then (if keyboard is not hit), gptzfsboot execs > >>>>> > /boot/zfsloader. If gptzfsboot is interrupted by keyboard, then it > >>>>> > displays default BE or POOL it is trying to boot from (using > >>>>> > zfs_rlookup() to map active dataset object to string BE name). > Though > >>>>> > I haven't checked this but through serial console user would be > >>>>> > allowed to enter other pool or BE to boot from. > >>>>> > > >>>>> > I could not go into details of how gptzfsboot reads > /boot/zfsloader from > >>>>> > disk. > >>>>> > > >>>>> > Pending Tasks > >>>>> > ============= > >>>>> > 1. Understand upon keyboard interruption, how user entered zfs > paths > >>>>> > (format [zfs:pool/filesystem:][/path/to/loader]) are converted in > >>>>> > object numbers? > >>>>> > 2. Learn ZFS on disk format in more details so as to identify > active > >>>>> > dataset object numbers of all BEs. Once the object numbers are > >>>>> > available, I can use zfs_rlookup() function to map object number to > >>>>> > printable pool name. > >>>>> > 3. Prepare library for console based menu. > >>>>> > > >>>>> > Plan for next week > >>>>> > ================== > >>>>> > Pending task 2 above >