Re: [zfs-discuss] [caiman-discuss] disk names?
I agree 100%. If we went by "this is how we always did it," then we would not have ZFS :) Charles (not to mention X64, CMT, or iPhones!;) On 6/4/08 10:55 AM, "Bob Friesenhahn" <[EMAIL PROTECTED]> wrote: > On Tue, 3 Jun 2008, Dave Miner wrote: >> >> Putting into the zpool command would feel odd to me, but I agree that >> there may be a useful utility here. > > There is value to putting this functionality in zpool for the same > reason that it was useful to put 'iostat' and other "duplicate" > functionality in zpool. For example, zpool can skip disks which are > already currently in use, or it can recommend whole disks (rather than > partitions) if none of the logical disk partitions are currently in > use. > > The zfs commands are currently at least an order of magnitude easier > to comprehend and use than the legacy commands related to storage > devices. It would be nice if the zfs commands will continue to > simplify what is now quite obtuse. > > Bob > == > Bob Friesenhahn > [EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/ > GraphicsMagick Maintainer,http://www.GraphicsMagick.org/ - Charles Soto[EMAIL PROTECTED] Director, Information Technology TEL: 512-740-1888 The University of Texas at Austin FAX: 512-475-9711 College of Communication, CMA 5.150G 1 University Station A0900, Austin, TX 78712 http://communication.utexas.edu/technology/ ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] [caiman-discuss] disk names?
MC wrote: >> Putting into the zpool command would feel odd to me, but I agree that >> there may be a useful utility here. >> > > There MAY be a useful utility here? I know this isn't your fight Dave, but > this tipped me and I have to say something :) > > Can we agree that the format command lists the disks it can use because the > format command is part of the user-facing disk storage software stack and > listing what objects it can act upon is one of the most fundemental features > of the user-facing tools of the stack?! It is for this reason alone that ZFS > needs a similar feature. Because it makes sense. > I'd like to suggest a name: lsdisk and lspart to list the disks and also the disks/partitions that are available. (Or maybe lsdisk should just list the disks and partitions in an indented list? Listing the partitions is important. Listing the controllers might not hurt anything, either.) Linux has lspci[0], lsscsi, lsusb, lsof, and a number of other ls-tab-tab utilities out-of-the-box[1]. These utilities would be quite intuitive for folks who've learned Linux first, and would help people transition to Solaris quickly. When I first learned Solaris (some years ago now), it took me a surprisingly long time to get the device naming scheme and the partition numbering. The naming/numbering is quite intuitive (except for that part about c0t0d0s2 being the entire device[1]), but I would have felt that I understood it quicker if I'd seen a nice listing that matches the concept, and also had quick way to find out the name of that disk that I just plugged in. My friends who are new to Solaris seem to have the same problem out of the gate. -Luke [0] Including lspci and lsusb with Solaris would be a great idea -- prtconf and prtdiag are very useful, but lspci is very quick, clear, and concise. IIRC, lspci is included in Nexenta. I haven't checked for these utilities on the new OpenSolaris yet, though, so maybe they're there already. [1] Since Solaris 10 still uses /bin/sh as the root shell, I feel that I must explain that this is tab completion. In bash/zsh/tcsh, hitting tab twice searches the $PATH for ls* and displays the results I know that most-everyone on the list already knows this, but I can't help my self! [ducks!] [2] If I'm giving someone a tour of Solaris administration, /dev/sda isn't particularly different from /dev/dsk/c0t0d0. But if I open /dev/dsk/c0t0d0s2 with a partitioning tool, repartition, then build/mount a filesystem without Something Bad happening, then my spectators heads usually explode. After that, they don't believe me when I tell them that they mostly understand what's going on. Yes, ZFS and the EFI disklabels fix this when you have a system with a ZFS root and no UFS disks -- but UFS is still necessary in a lot of configuration, so this kind of system-quirk should be made obvious to Unix-literate people coming from non-Solaris backgrounds. ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] [caiman-discuss] disk names?
> Putting into the zpool command would feel odd to me, but I agree that > there may be a useful utility here. There MAY be a useful utility here? I know this isn't your fight Dave, but this tipped me and I have to say something :) Can we agree that the format command lists the disks it can use because the format command is part of the user-facing disk storage software stack and listing what objects it can act upon is one of the most fundemental features of the user-facing tools of the stack?! It is for this reason alone that ZFS needs a similar feature. Because it makes sense. The other reason is to help people. Every time someone asks this question, all they get is "try format it might work?" Or "scroll through 200 lines of dmesg they might be there?" People have been asking for this basic feature for how long now? Years? Probably since ZFS was created? Every couple weeks or months someone pops up on IRC or a forum asking about it, and can you blame them? Every ZFS tutorial touts how easy it all is without ever mentioning how you get the disk names for the very first step. This has always seemed crazy to me, but I can see how people close to the problem would not see it. After all, you guys with with solaris every day, it is your job. I hope you can see though that such a feature would not feel odd. It would not be questionably useful. It is not really optional, in fact. It is a requirement for a product that lives outside the laboratory, and opensolaris is quickly moving that way This message posted from opensolaris.org ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] [caiman-discuss] disk names?
On Wed, 4 Jun 2008, Jeff Bonwick wrote: > I agree with that. format(1M) and cfgadm(1M) are, ah, not the most > user-friendly tools. It would be really nice to have 'zpool disks' > go out and taste all the drives to see which ones are available. > > We already have most of the code to do it. 'zpool import' already > contains the taste-all-disks-and-slices logic, and 'zpool add' > already contains the logic to determine whether a device is in use. > Looks like all we're really missing is a call to printf()... Make sure that the zpool devices command recommends the configurations preferred for zfs first and requires that the user add an extra option (e.g. -v) in order to discover less ideal device configurations. For example, ZFS prefers whole disks so if the disk contains partitions but none of them are used, then it can simply suggest the whole disk, but if some partitions are used it can list the unused partitions along with a warning that using partitions is a non-ideal configuration. If the devices are accessed via different paths/controllers, then that could be useful info for the user when selecting devices. I appreciate that Richard Elling would like to suggest the best combination out of 281,474,976,710,655 permutations, but at some point the choice is best left to the educated user. :-) The first challenge is to find the devices at all. Optimization is for later. Bob == Bob Friesenhahn [EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/ ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] [caiman-discuss] disk names?
Jeff Bonwick wrote: > I agree with that. format(1M) and cfgadm(1M) are, ah, not the most > user-friendly tools. It would be really nice to have 'zpool disks' > go out and taste all the drives to see which ones are available. > > We already have most of the code to do it. 'zpool import' already > contains the taste-all-disks-and-slices logic, and 'zpool add' > already contains the logic to determine whether a device is in use. > Looks like all we're really missing is a call to printf()... > > Is there an RFE for this? If not, I'll file one. I like the idea. > No argument that it's useful, but I also believe that making format or other tools friendlier is useful as well, since the problem here applies to file systems that are not ZFS, too. If I'm not using ZFS, it seems unlike that my conceptual model is to go use zpool to figure out what's on my disks. So, sure, add something to zpool for that realm, but I think we should do something to format or another tool to address the non-ZFS case. Dave > Jeff > > On Wed, Jun 04, 2008 at 10:55:18AM -0500, Bob Friesenhahn wrote: >> On Tue, 3 Jun 2008, Dave Miner wrote: >>> Putting into the zpool command would feel odd to me, but I agree that >>> there may be a useful utility here. >> There is value to putting this functionality in zpool for the same >> reason that it was useful to put 'iostat' and other "duplicate" >> functionality in zpool. For example, zpool can skip disks which are >> already currently in use, or it can recommend whole disks (rather than >> partitions) if none of the logical disk partitions are currently in >> use. >> >> The zfs commands are currently at least an order of magnitude easier >> to comprehend and use than the legacy commands related to storage >> devices. It would be nice if the zfs commands will continue to >> simplify what is now quite obtuse. >> >> Bob >> == >> Bob Friesenhahn >> [EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/ >> GraphicsMagick Maintainer,http://www.GraphicsMagick.org/ >> >> ___ >> zfs-discuss mailing list >> zfs-discuss@opensolaris.org >> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] [caiman-discuss] disk names?
I agree with that. format(1M) and cfgadm(1M) are, ah, not the most user-friendly tools. It would be really nice to have 'zpool disks' go out and taste all the drives to see which ones are available. We already have most of the code to do it. 'zpool import' already contains the taste-all-disks-and-slices logic, and 'zpool add' already contains the logic to determine whether a device is in use. Looks like all we're really missing is a call to printf()... Is there an RFE for this? If not, I'll file one. I like the idea. Jeff On Wed, Jun 04, 2008 at 10:55:18AM -0500, Bob Friesenhahn wrote: > On Tue, 3 Jun 2008, Dave Miner wrote: > > > > Putting into the zpool command would feel odd to me, but I agree that > > there may be a useful utility here. > > There is value to putting this functionality in zpool for the same > reason that it was useful to put 'iostat' and other "duplicate" > functionality in zpool. For example, zpool can skip disks which are > already currently in use, or it can recommend whole disks (rather than > partitions) if none of the logical disk partitions are currently in > use. > > The zfs commands are currently at least an order of magnitude easier > to comprehend and use than the legacy commands related to storage > devices. It would be nice if the zfs commands will continue to > simplify what is now quite obtuse. > > Bob > == > Bob Friesenhahn > [EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/ > GraphicsMagick Maintainer,http://www.GraphicsMagick.org/ > > ___ > zfs-discuss mailing list > zfs-discuss@opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] [caiman-discuss] disk names?
Bob Friesenhahn wrote: > On Tue, 3 Jun 2008, Dave Miner wrote: > >> Putting into the zpool command would feel odd to me, but I agree that >> there may be a useful utility here. >> > > There is value to putting this functionality in zpool for the same > reason that it was useful to put 'iostat' and other "duplicate" > functionality in zpool. For example, zpool can skip disks which are > already currently in use, or it can recommend whole disks (rather than > partitions) if none of the logical disk partitions are currently in > use. > Nit: zpool iostat provides a different point of view on I/O than iostat. iostat cannot do what zpool iostat does, so it is not really a case of duplicate functionality. VxVM has a similar tool, vxstat. Today, zpool uses libdiskmgt to determine if the devices are in use or have existing file systems. If found, it will fail, unless the -f (force) flag is used. I have done some work on making intelligent decisions about using devices. It is a non-trivial task for the general case. Consider that a X4500 has 281,474,976,710,655 possible permutations for RAID-0 using only a single slice per disk, it quickly becomes an exercise of compromise. At present, I'm adding this to RAIDoptmizer, but there I have the knowledge of the physical layout of the system(s), which is difficult to ascertain (guess) for the generic hardware case. It may be that in the long term we could add some sort of smarts to zpool, but I'm not (currently) optimistic. > The zfs commands are currently at least an order of magnitude easier > to comprehend and use than the legacy commands related to storage > devices. It would be nice if the zfs commands will continue to > simplify what is now quite obtuse. > No doubt. -- richard ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] [caiman-discuss] disk names?
On Tue, 3 Jun 2008, Dave Miner wrote: > > Putting into the zpool command would feel odd to me, but I agree that > there may be a useful utility here. There is value to putting this functionality in zpool for the same reason that it was useful to put 'iostat' and other "duplicate" functionality in zpool. For example, zpool can skip disks which are already currently in use, or it can recommend whole disks (rather than partitions) if none of the logical disk partitions are currently in use. The zfs commands are currently at least an order of magnitude easier to comprehend and use than the legacy commands related to storage devices. It would be nice if the zfs commands will continue to simplify what is now quite obtuse. Bob == Bob Friesenhahn [EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/ ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] [caiman-discuss] disk names?
Richard Elling wrote: > James C. McPherson wrote: >> Will Murnane wrote: >> >>> On Tue, Jun 3, 2008 at 4:35 PM, Benjamin Ellison <[EMAIL PROTECTED]> wrote: >>> My question: Where/how in the heck does one get a list of which devices are valid targets? >>> Run "format" and it'll list the devices that are available. If you >>> hot-plug a drive, you may need to run "devfsadm -c disk" first, to >>> make sure that entries in /dev are created for it. >>> >> Some time ago I logged an RFE for this very issue >> >> http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6605832 >> >> 6605832 zpool could tell me what disks are available for use >> >> >> It's still unassigned, unfortunately. >> > > methinks this is a command which will be much more useful beyond > the ZFS context. In fact, it seems that the caiman project already has > the code written to do this... just not externalized. You might see if > we could promote test_td.c into a useful sys-admin command. > http://cvs.opensolaris.org/source/xref/caiman/snap_upgrade/usr/src/lib/libtd/test_td.c Putting into the zpool command would feel odd to me, but I agree that there may be a useful utility here. Dave ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss