Hi I''ve used format''s "volname" command to give labels to my drives according to their physical location. I did quite a lot of work labeling all my drives (I couldn''t figure out which controller got which numbers so I had to disconnect drives one by one, and they''re not hotpluggable => lot''s of reboots). However, when I created a zpool of the drives all the labels vanished! Since I didn''t write them down elsewhere I have to do it all over. Except that now it won''t let me:> format> volname > Unable to get current partition map. > Cannot label disk while its partitions are in use as described. > format>I get the same error message even if the device is offline (i.e., "zpool offline <pool> <device>"). Am I doing something wrong, or is format just giving me the finger for no reason? Cheers, Marcus
On Sat, Oct 11, 2008 at 03:19:49AM +0300, Marcus Sundman wrote:> I''ve used format''s "volname" command to give labels to my drives > according to their physical location. I did quite a lot of work > labeling all my drives (I couldn''t figure out which controller got > which numbers so I had to disconnect drives one by one, and they''re not > hotpluggable => lot''s of reboots). However, when I created a zpool of > the drives all the labels vanished!If they were SMI labels before, then ZFS probably switched them to EFI/GPT labels, and the volname dropped out.> Since I didn''t write them down > elsewhere I have to do it all over. Except that now it won''t let me: > > format> volname > > Unable to get current partition map. > > Cannot label disk while its partitions are in use as described. > > format>"as described"? Did format tell you anything when you selected the disk other than "/dev/dsk/xxxxs0 is part of active ZFS pool blah..."?> I get the same error message even if the device is offline (i.e., > "zpool offline <pool> <device>"). > > Am I doing something wrong, or is format just giving me the finger for > no reason?Now that I don''t know. I''m having no problems adding a volname to a ZFS disk (EFI label), even with the pool online. format> volname Enter 8-character volume name (remember quotes)[""]:foo Ready to label disk, continue? y format> -- Darren
Marcus Sundman wrote:> Hi > > I''ve used format''s "volname" command to give labels to my drives > according to their physical location. I did quite a lot of work > labeling all my drives (I couldn''t figure out which controller got > which numbers so I had to disconnect drives one by one, and they''re not > hotpluggable => lot''s of reboots). However, when I created a zpool of > the drives all the labels vanished! Since I didn''t write them down > elsewhere I have to do it all over. Except that now it won''t let me: >> format> volname >> Unable to get current partition map. >> Cannot label disk while its partitions are in use as described. >> format> > > I get the same error message even if the device is offline (i.e., > "zpool offline <pool> <device>"). > > Am I doing something wrong, or is format just giving me the finger for > no reason?format is using libdiskmgmt, which is designed to assist you with avoiding admin stuff-ups with already-allocated/ assigned/in use devices. I''m interested in what you did to figure out your drive locations - did you use cfgadm, fmtopo or sestopo to figure it out, or something closer to the hardware? What sort of hardware, btw? Oh, and if you gave the zpool create command the cXtYdZ name, then the labels will have been over-written with GPT (aka EFI) labels instead. James C. McPherson -- Senior Kernel Software Engineer, Solaris Sun Microsystems http://blogs.sun.com/jmcp http://www.jmcp.homeunix.com/blog
A Darren Dunham <ddunham at taos.com> wrote:> On Sat, Oct 11, 2008 at 03:19:49AM +0300, Marcus Sundman wrote: > > I''ve used format''s "volname" command to give labels to my drives > > according to their physical location. I did quite a lot of work > > labeling all my drives (I couldn''t figure out which controller got > > which numbers so I had to disconnect drives one by one, and they''re > > not hotpluggable => lot''s of reboots). However, when I created a > > zpool of the drives all the labels vanished! > > If they were SMI labels before, then ZFS probably switched them to > EFI/GPT labels, and the volname dropped out.I wrote EFI labels on the disks immediately when I got them, before making the volnames, so I don''t think that''s it.> > Since I didn''t write them down > > elsewhere I have to do it all over. Except that now it won''t let me: > > > format> volname > > > Unable to get current partition map. > > > Cannot label disk while its partitions are in use as described. > > > format> > > "as described"? Did format tell you anything when you selected the > disk other than "/dev/dsk/xxxxs0 is part of active ZFS pool blah..."?Nope: ----8<--------------------------------------------------------- Specify disk (enter its number): 7 selecting c6t1d0 [disk formatted] /dev/dsk/c6t1d0s0 is part of active ZFS pool safe. Please see zpool(1M). FORMAT MENU: ---->8--------------------------------------------------------- Cheers, Marcus
"James C. McPherson" <James.McPherson at Sun.COM> wrote:> Marcus Sundman wrote: > > I couldn''t figure out which controller got which numbers so I had > > to disconnect drives one by one > > I''m interested in what you did to figure out your drive > locations - did you use cfgadm, fmtopo or sestopo to figure > it out, or something closer to the hardware?Disconnect one drive, boot, look which drive is missing, shutdown, reconnect it and disconnect the next drive, boot, etc.> What sort of hardware, btw?A motherboard with 6 SATA ports (I think 4 is by the nvidia chipset and 2 by some other chip) and a sil3132-based PCI-E card with 2 SATA ports. The disks are 1 TB WD GP ones.> Oh, and if you gave the zpool create command the cXtYdZ > name, then the labels will have been over-written with GPT > (aka EFI) labels instead.Yes, I used the cXtYdZ syntax with zpool create, but the drives already had EFI labels. Did zpool re-label them anyway? Regards, Marcus
Marcus Sundman wrote:> "James C. McPherson" <James.McPherson at Sun.COM> wrote: >> Marcus Sundman wrote: >>> I couldn''t figure out which controller got which numbers so I had >>> to disconnect drives one by one >> I''m interested in what you did to figure out your drive >> locations - did you use cfgadm, fmtopo or sestopo to figure >> it out, or something closer to the hardware? > > Disconnect one drive, boot, look which drive is missing, shutdown, > reconnect it and disconnect the next drive, boot, etc.urk :( There''s are less power-cycle-y ways, if you''re ok with wandering through the device tree. For each device that you''ve got, try this:: $ for dev in `awk -F''"'' ''/sd/ {print $2}'' /etc/path_to_inst`; do \ prtconf -v /devices/$dev|egrep -i "id1|dev.dsk.*s2" ; \ done That''ll tell you the cXtYdZ and device serial number mappings, ala blinder:jmcp $ for dev in `awk -F''"'' ''/sd/ {print $2}'' /etc/path_to_inst`; do prtconf -v /devices/$dev|egrep -i "id1|dev.dsk.*s2" ; done value=''id1,sd at TATA_____ST3320620AS_________________________________________3QF0EAFP'' dev_link=/dev/dsk/c2t0d0s2 value=''id1,sd at TATA_____ST3320620AS_________________________________________6QF1PYN1'' dev_link=/dev/dsk/c2t1d0s2 value=''id1,sd at TATA_____ST3320620AS_________________________________________6QF1PYNB'' dev_link=/dev/dsk/c2t2d0s2 value=''id1,sd at TATA_____ST3320620AS_________________________________________4QF01RZE'' dev_link=/dev/dsk/c2t3d0s2 Note that the "id1" is the start of the devid string, which for SATA devices like mine above (attached to a SAS hba) Conversely, on my Dell laptop with AHCI, I find that using cfgadm is more useful:: $ cfgadm -lav sata0 Ap_Id Receptacle Occupant Condition Information When Type Busy Phys_Id sata0/0::dsk/c1t0d0 connected configured ok Mod: SAMSUNG HM320JI FRev: 2SS00_01 SN: S19FJ10PC45360 unavailable disk n /devices/pci at 0,0/pci1028,22e at 1f,2:0 sata0/1 empty unconfigured ok unavailable sata-port n /devices/pci at 0,0/pci1028,22e at 1f,2:1 Having the physical serial number reported makes it much easier to match the physical drive with the logical - as long as you''ve got the lid off :-)>> What sort of hardware, btw? > > A motherboard with 6 SATA ports (I think 4 is by the nvidia chipset and > 2 by some other chip) and a sil3132-based PCI-E card with 2 SATA ports. > The disks are 1 TB WD GP ones. >> Oh, and if you gave the zpool create command the cXtYdZ >> name, then the labels will have been over-written with GPT >> (aka EFI) labels instead. > > Yes, I used the cXtYdZ syntax with zpool create, but the drives already > had EFI labels. Did zpool re-label them anyway?I believe so. James C. McPherson -- Senior Kernel Software Engineer, Solaris Sun Microsystems http://blogs.sun.com/jmcp http://www.jmcp.homeunix.com/blog
iostat -En will show you device and serial number (at least on the Sun hardware I''ve used). My old way of finding drives is to run format and run a disk read test that isn''t destructive and look for the drive with the access light going crazy. Most drives still have a very small LED on them to reflect activity. You may or may not be able to see it. Chris G. -- This message posted from opensolaris.org
"James C. McPherson" <James.McPherson at Sun.COM> wrote:> Marcus Sundman wrote: > > [...] > blinder:jmcp $ for dev in `awk -F''"'' ''/sd/ {print > $2}'' /etc/path_to_inst`; do prtconf -v /devices/$dev|egrep -i > "id1|dev.dsk.*s2" ; done > [...] > $ cfgadm -lav sata0 > [...] > Having the physical serial number reported makes it much easier > to match the physical drive with the logical - as long as you''ve > got the lid off :-)Nice, thx. Not that it''s going to do me much good now, since it won''t let me make volnames anymore at all. :-(> > Yes, I used the cXtYdZ syntax with zpool create, but the drives > > already had EFI labels. Did zpool re-label them anyway? > > I believe so.It would''ve been nice if zpool had given a warning, since it''s not obvious that "zpool create" rewrites the EFI label (both old and newly written ones). And even if it did rewrite the labels it still _should_ keep the old volnames. Regards, Marcus