Hi, How do I discover the disk name to use for zfs commands such as: c3d0s0? I tried using format command but it only gave me the first 4 letters: c3d1. Also why do some command accept only 4 letter disk names and others require 6 letters? Thanks Hua-Ying
Hi Hua-Ying Ling wrote:> How do I discover the disk name to use for zfs commands such as: > c3d0s0? I tried using format command but it only gave me the first 4 > letters: c3d1. Also why do some command accept only 4 letter disk > names and others require 6 letters?Usually i find cfgadm -a helpful enough for that (mayby adding ''|grep disk'' to it). Why sometimes 4 and sometimes 6 characters: c3d1 <- this would be disk#1 on controller#3 c3d0s0 <- this would be slice #0 (partition) on disk #0 on controller #3 Usually there is a also t0 there, e.g.: cfgadm -a|grep disk |head sata0/0::dsk/c0t0d0 disk connected configured ok sata0/1::dsk/c0t1d0 disk connected configured ok sata0/2::dsk/c0t2d0 disk connected configured ok sata0/3::dsk/c0t3d0 disk connected configured ok sata0/4::dsk/c0t4d0 disk connected configured ok sata0/5::dsk/c0t5d0 disk connected configured ok sata0/6::dsk/c0t6d0 disk connected configured ok sata0/7::dsk/c0t7d0 disk connected configured ok sata1/0::dsk/c1t0d0 disk connected configured ok sata1/1::dsk/c1t1d0 disk connected configured ok HTH Carsten
When I use "cfgadm -a" it only seems to list usb devices? #cfgadm -a Ap_Id Type Receptacle Occupant Condition usb2/1 unknown empty unconfigured ok usb2/2 unknown empty unconfigured ok usb2/3 unknown empty unconfigured ok usb3/1 unknown empty unconfigured ok I''m trying to convert a nonredundant storage pool to a mirrored pool. I''m following the "zfs admin guide" on page 71. I currently have a existing rpool: #zpool status pool: rpool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 c3d0s0 ONLINE 0 0 0 I want to mirror this drive, I tried using format to get the disk name #format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c3d0 <DEFAULT cyl 24318 alt 2 hd 255 sec 63> /pci at 0,0/pci-ide at 14,1/ide at 0/cmdk at 0,0 1. c3d1 <drive type unknown> /pci at 0,0/pci-ide at 14,1/ide at 0/cmdk at 1,0 So I tried #zpool attach rpool c3d0s0 c3d1s0 // failed cannot open ''/dev/dsk/c3d1s0'': No such device or address #zpool attach rpool c3d0s0 c3d1 // failed cannot label ''c3d1'': EFI labeled devices are not supported on root pools. Thoughts? Thanks, Hua-Ying On Mon, Jul 6, 2009 at 2:37 AM, Carsten Aulbert<carsten.aulbert at aei.mpg.de> wrote:> Hi > > Hua-Ying Ling wrote: >> How do I discover the disk name to use for zfs commands such as: >> c3d0s0? ?I tried using format command but it only gave me the first 4 >> letters: c3d1. ?Also why do some command accept only 4 letter disk >> names and others require 6 letters? > > > Usually i find > > cfgadm -a > > helpful enough for that (mayby adding ''|grep disk'' to it). > > Why sometimes 4 and sometimes 6 characters: > > c3d1 <- this would be disk#1 on controller#3 > c3d0s0 <- this would be slice #0 (partition) on disk #0 on controller #3 > > Usually there is a also t0 there, e.g.: > > cfgadm -a|grep disk |head > sata0/0::dsk/c0t0d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok > sata0/1::dsk/c0t1d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok > sata0/2::dsk/c0t2d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok > sata0/3::dsk/c0t3d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok > sata0/4::dsk/c0t4d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok > sata0/5::dsk/c0t5d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok > sata0/6::dsk/c0t6d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok > sata0/7::dsk/c0t7d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok > sata1/0::dsk/c1t0d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok > sata1/1::dsk/c1t1d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok > > > HTH > > Carsten > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >
If you want to use the entire disk in a zpool, you "should" use the notation without the "c?" trailing part. Ie, "c2d0". (SATA related disks do not have the "t?" target part, whereas SCSI, and SCSI-emulated devices do. Like CDROMs, USB etc). If you are using just a part of a disk, one partition/slice, you will use the "s?" notation. For example, "c2d0s6". There is one caveat, x86 bootable HDDs need to be SMI partitioned, EFI partitions will not work. So for bootable root volumes, it has to be a partition. Run "format" on the disk, and create your partition the way you want it. Probably just "s0" spanning the entire disk. (Not counting the virtual s8 boot partition, and of course the entire-disk partition "s2"). Then write it as a SMI label, then you can attach it to your root pool. It usually reminds you to run installgrub on the disk too. I am not an expert on this, this is just what I have found out so far. Lund Hua-Ying Ling wrote:> When I use "cfgadm -a" it only seems to list usb devices? > > #cfgadm -a > Ap_Id Type Receptacle Occupant Condition > usb2/1 unknown empty unconfigured ok > usb2/2 unknown empty unconfigured ok > usb2/3 unknown empty unconfigured ok > usb3/1 unknown empty unconfigured ok > > I''m trying to convert a nonredundant storage pool to a mirrored pool. > I''m following the "zfs admin guide" on page 71. > > I currently have a existing rpool: > > #zpool status > > pool: rpool > state: ONLINE > scrub: none requested > config: > > NAME STATE READ WRITE CKSUM > rpool ONLINE 0 0 0 > c3d0s0 ONLINE 0 0 0 > > I want to mirror this drive, I tried using format to get the disk name > > #format > Searching for disks...done > > > AVAILABLE DISK SELECTIONS: > 0. c3d0 <DEFAULT cyl 24318 alt 2 hd 255 sec 63> > /pci at 0,0/pci-ide at 14,1/ide at 0/cmdk at 0,0 > 1. c3d1 <drive type unknown> > /pci at 0,0/pci-ide at 14,1/ide at 0/cmdk at 1,0 > > So I tried > > #zpool attach rpool c3d0s0 c3d1s0 // failed > cannot open ''/dev/dsk/c3d1s0'': No such device or address > > #zpool attach rpool c3d0s0 c3d1 // failed > cannot label ''c3d1'': EFI labeled devices are not supported on root pools. > > Thoughts? > > Thanks, > Hua-Ying > > On Mon, Jul 6, 2009 at 2:37 AM, Carsten > Aulbert<carsten.aulbert at aei.mpg.de> wrote: >> Hi >> >> Hua-Ying Ling wrote: >>> How do I discover the disk name to use for zfs commands such as: >>> c3d0s0? I tried using format command but it only gave me the first 4 >>> letters: c3d1. Also why do some command accept only 4 letter disk >>> names and others require 6 letters? >> >> Usually i find >> >> cfgadm -a >> >> helpful enough for that (mayby adding ''|grep disk'' to it). >> >> Why sometimes 4 and sometimes 6 characters: >> >> c3d1 <- this would be disk#1 on controller#3 >> c3d0s0 <- this would be slice #0 (partition) on disk #0 on controller #3 >> >> Usually there is a also t0 there, e.g.: >> >> cfgadm -a|grep disk |head >> sata0/0::dsk/c0t0d0 disk connected configured ok >> sata0/1::dsk/c0t1d0 disk connected configured ok >> sata0/2::dsk/c0t2d0 disk connected configured ok >> sata0/3::dsk/c0t3d0 disk connected configured ok >> sata0/4::dsk/c0t4d0 disk connected configured ok >> sata0/5::dsk/c0t5d0 disk connected configured ok >> sata0/6::dsk/c0t6d0 disk connected configured ok >> sata0/7::dsk/c0t7d0 disk connected configured ok >> sata1/0::dsk/c1t0d0 disk connected configured ok >> sata1/1::dsk/c1t1d0 disk connected configured ok >> >> >> HTH >> >> Carsten >> _______________________________________________ >> zfs-discuss mailing list >> zfs-discuss at opensolaris.org >> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >> > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >-- Jorgen Lundman | <lundman at lundman.net> Unix Administrator | +81 (0)3 -5456-2687 ext 1017 (work) Shibuya-ku, Tokyo | +81 (0)90-5578-8500 (cell) Japan | +81 (0)3 -3375-1767 (home)
Hi, The format shows the 2nd disk as 1. c3d1 <drive type unknown> Which means some H/w issue and the OS did not recognize it label/size. Please check the physical disk and the connectivity and once ok. Please run "devfsadm" and try the "format" command again. Thanks & Regards, Vikash Gupta Extn: 88-220-7318 Cell: 408-307-9718 -----Original Message----- From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss-bounces at opensolaris.org] On Behalf Of Hua-Ying Ling Sent: Monday, July 06, 2009 12:23 AM To: Carsten Aulbert Cc: zfs-discuss at opensolaris.org Subject: Re: [zfs-discuss] how to discover disks? When I use "cfgadm -a" it only seems to list usb devices? #cfgadm -a Ap_Id Type Receptacle Occupant Condition usb2/1 unknown empty unconfigured ok usb2/2 unknown empty unconfigured ok usb2/3 unknown empty unconfigured ok usb3/1 unknown empty unconfigured ok I''m trying to convert a nonredundant storage pool to a mirrored pool. I''m following the "zfs admin guide" on page 71. I currently have a existing rpool: #zpool status pool: rpool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 c3d0s0 ONLINE 0 0 0 I want to mirror this drive, I tried using format to get the disk name #format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c3d0 <DEFAULT cyl 24318 alt 2 hd 255 sec 63> /pci at 0,0/pci-ide at 14,1/ide at 0/cmdk at 0,0 1. c3d1 <drive type unknown> /pci at 0,0/pci-ide at 14,1/ide at 0/cmdk at 1,0 So I tried #zpool attach rpool c3d0s0 c3d1s0 // failed cannot open ''/dev/dsk/c3d1s0'': No such device or address #zpool attach rpool c3d0s0 c3d1 // failed cannot label ''c3d1'': EFI labeled devices are not supported on root pools. Thoughts? Thanks, Hua-Ying On Mon, Jul 6, 2009 at 2:37 AM, Carsten Aulbert<carsten.aulbert at aei.mpg.de> wrote:> Hi > > Hua-Ying Ling wrote: >> How do I discover the disk name to use for zfs commands such as: >> c3d0s0? ?I tried using format command but it only gave me the first 4 >> letters: c3d1. ?Also why do some command accept only 4 letter disk >> names and others require 6 letters? > > > Usually i find > > cfgadm -a > > helpful enough for that (mayby adding ''|grep disk'' to it). > > Why sometimes 4 and sometimes 6 characters: > > c3d1 <- this would be disk#1 on controller#3 > c3d0s0 <- this would be slice #0 (partition) on disk #0 on controller #3 > > Usually there is a also t0 there, e.g.: > > cfgadm -a|grep disk |head > sata0/0::dsk/c0t0d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok > sata0/1::dsk/c0t1d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok > sata0/2::dsk/c0t2d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok > sata0/3::dsk/c0t3d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok > sata0/4::dsk/c0t4d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok > sata0/5::dsk/c0t5d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok > sata0/6::dsk/c0t6d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok > sata0/7::dsk/c0t7d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok > sata1/0::dsk/c1t0d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok > sata1/1::dsk/c1t1d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok > > > HTH > > Carsten > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >_______________________________________________ zfs-discuss mailing list zfs-discuss at opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Hua-Ying Ling wrote:> When I use "cfgadm -a" it only seems to list usb devices? > > #cfgadm -a > Ap_Id Type Receptacle Occupant Condition > usb2/1 unknown empty unconfigured ok > usb2/2 unknown empty unconfigured ok > usb2/3 unknown empty unconfigured ok > usb3/1 unknown empty unconfigured ok >I think it only shows hot-swap capable devices, and presumably your disks are not being driven by a hot swap capable controller _and_ driver. For SATA disks, the controller must have a Solaris driver which drives the disks in native SATA mode (such as nv_sata(7D)), and not IDE compatibility mode (such as SATA disks driven by ata(7D)). -- Andrew
Hi Hua-Ying, Some disks don''t have target identifiers, like you c3d0 and c3d1 disks. To attach your c3d1 disk, you need to relabel it with an SMI label and provide a slice, s0, for example. See the steps here: http://www.solarisinternals.com/wiki/index.php/ZFS_Troubleshooting_Guide#Replacing.2FRelabeling_the_Root_Pool_Disk Cindy P.S. For cfgadm output, you might need to use the cfgadm -al or maybe -av syntax. The options/output of this command might depend on the hardware types. I''m not quite sure what it needs in this case. Hua-Ying Ling wrote:> When I use "cfgadm -a" it only seems to list usb devices? > > #cfgadm -a > Ap_Id Type Receptacle Occupant Condition > usb2/1 unknown empty unconfigured ok > usb2/2 unknown empty unconfigured ok > usb2/3 unknown empty unconfigured ok > usb3/1 unknown empty unconfigured ok > > I''m trying to convert a nonredundant storage pool to a mirrored pool. > I''m following the "zfs admin guide" on page 71. > > I currently have a existing rpool: > > #zpool status > > pool: rpool > state: ONLINE > scrub: none requested > config: > > NAME STATE READ WRITE CKSUM > rpool ONLINE 0 0 0 > c3d0s0 ONLINE 0 0 0 > > I want to mirror this drive, I tried using format to get the disk name > > #format > Searching for disks...done > > > AVAILABLE DISK SELECTIONS: > 0. c3d0 <DEFAULT cyl 24318 alt 2 hd 255 sec 63> > /pci at 0,0/pci-ide at 14,1/ide at 0/cmdk at 0,0 > 1. c3d1 <drive type unknown> > /pci at 0,0/pci-ide at 14,1/ide at 0/cmdk at 1,0 > > So I tried > > #zpool attach rpool c3d0s0 c3d1s0 // failed > cannot open ''/dev/dsk/c3d1s0'': No such device or address > > #zpool attach rpool c3d0s0 c3d1 // failed > cannot label ''c3d1'': EFI labeled devices are not supported on root pools. > > Thoughts? > > Thanks, > Hua-Ying > > On Mon, Jul 6, 2009 at 2:37 AM, Carsten > Aulbert<carsten.aulbert at aei.mpg.de> wrote: > >>Hi >> >>Hua-Ying Ling wrote: >> >>>How do I discover the disk name to use for zfs commands such as: >>>c3d0s0? I tried using format command but it only gave me the first 4 >>>letters: c3d1. Also why do some command accept only 4 letter disk >>>names and others require 6 letters? >> >> >>Usually i find >> >>cfgadm -a >> >>helpful enough for that (mayby adding ''|grep disk'' to it). >> >>Why sometimes 4 and sometimes 6 characters: >> >>c3d1 <- this would be disk#1 on controller#3 >>c3d0s0 <- this would be slice #0 (partition) on disk #0 on controller #3 >> >>Usually there is a also t0 there, e.g.: >> >>cfgadm -a|grep disk |head >>sata0/0::dsk/c0t0d0 disk connected configured ok >>sata0/1::dsk/c0t1d0 disk connected configured ok >>sata0/2::dsk/c0t2d0 disk connected configured ok >>sata0/3::dsk/c0t3d0 disk connected configured ok >>sata0/4::dsk/c0t4d0 disk connected configured ok >>sata0/5::dsk/c0t5d0 disk connected configured ok >>sata0/6::dsk/c0t6d0 disk connected configured ok >>sata0/7::dsk/c0t7d0 disk connected configured ok >>sata1/0::dsk/c1t0d0 disk connected configured ok >>sata1/1::dsk/c1t1d0 disk connected configured ok >> >> >>HTH >> >>Carsten >>_______________________________________________ >>zfs-discuss mailing list >>zfs-discuss at opensolaris.org >>http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >> > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
I''m confused by the output of the partition command, this is the partition table created by the installer: current partition table (original): Total disk cylinders available: 24318 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 root wm 1 - 24316 186.27GB (24316/0/0) 390636540 1 unassigned wm 0 0 (0/0/0) 0 2 backup wu 0 - 24317 186.29GB (24318/0/0) 390668670 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 unassigned wm 0 0 (0/0/0) 0 7 unassigned wm 0 0 (0/0/0) 0 8 boot wu 0 - 0 7.84MB (1/0/0) 16065 9 unassigned wm 0 0 (0/0/0) 0 It seems like the partition 0,2,8 are sharing the same part of the disk. How is this possible? Hua-Ying On Mon, Jul 6, 2009 at 11:27 AM, <Cindy.Swearingen at sun.com> wrote:> Hi Hua-Ying, > > Some disks don''t have target identifiers, like you c3d0 > and c3d1 disks. > > To attach your c3d1 disk, you need to relabel it with an > SMI label and provide a slice, s0, for example. > > See the steps here: > > http://www.solarisinternals.com/wiki/index.php/ZFS_Troubleshooting_Guide#Replacing.2FRelabeling_the_Root_Pool_Disk > > Cindy > > P.S. For cfgadm output, you might need to use the cfgadm -al or maybe > -av syntax. The options/output of this command might depend on the hardware > types. I''m not quite sure what it needs in this case. > > > Hua-Ying Ling wrote: >> >> When I use "cfgadm -a" it only seems to list usb devices? >> >> #cfgadm -a >> Ap_Id ? ? ? ? ? ? ? ? ? ? ? ? ?Type ? ? ? ? Receptacle ? Occupant >> Condition >> usb2/1 ? ? ? ? ? ? ? ? ? ? ? ? unknown ? ? ?empty ? ? ? ?unconfigured ok >> usb2/2 ? ? ? ? ? ? ? ? ? ? ? ? unknown ? ? ?empty ? ? ? ?unconfigured ok >> usb2/3 ? ? ? ? ? ? ? ? ? ? ? ? unknown ? ? ?empty ? ? ? ?unconfigured ok >> usb3/1 ? ? ? ? ? ? ? ? ? ? ? ? unknown ? ? ?empty ? ? ? ?unconfigured ok >> >> I''m trying to convert a nonredundant storage pool to a mirrored pool. >> I''m following the "zfs admin guide" on page 71. >> >> I currently have a existing rpool: >> >> #zpool status >> >> ?pool: rpool >> ?state: ONLINE >> ?scrub: none requested >> config: >> >> ? ? ? ?NAME ? ? ? ?STATE ? ? READ WRITE CKSUM >> ? ? ? ?rpool ? ? ? ONLINE ? ? ? 0 ? ? 0 ? ? 0 >> ? ? ? ? ?c3d0s0 ? ?ONLINE ? ? ? 0 ? ? 0 ? ? 0 >> >> I want to mirror this drive, I tried using format to get the disk name >> >> #format >> Searching for disks...done >> >> >> AVAILABLE DISK SELECTIONS: >> ? ? ? 0. c3d0 <DEFAULT cyl 24318 alt 2 hd 255 sec 63> >> ? ? ? ? ?/pci at 0,0/pci-ide at 14,1/ide at 0/cmdk at 0,0 >> ? ? ? 1. c3d1 <drive type unknown> >> ? ? ? ? ?/pci at 0,0/pci-ide at 14,1/ide at 0/cmdk at 1,0 >> >> So I tried >> >> #zpool attach rpool c3d0s0 c3d1s0 // failed >> cannot open ''/dev/dsk/c3d1s0'': No such device or address >> >> #zpool attach rpool c3d0s0 c3d1 // failed >> cannot label ''c3d1'': EFI labeled devices are not supported on root pools. >> >> Thoughts? >> >> Thanks, >> Hua-Ying >> >> On Mon, Jul 6, 2009 at 2:37 AM, Carsten >> Aulbert<carsten.aulbert at aei.mpg.de> wrote: >> >>> Hi >>> >>> Hua-Ying Ling wrote: >>> >>>> How do I discover the disk name to use for zfs commands such as: >>>> c3d0s0? ?I tried using format command but it only gave me the first 4 >>>> letters: c3d1. ?Also why do some command accept only 4 letter disk >>>> names and others require 6 letters? >>> >>> >>> Usually i find >>> >>> cfgadm -a >>> >>> helpful enough for that (mayby adding ''|grep disk'' to it). >>> >>> Why sometimes 4 and sometimes 6 characters: >>> >>> c3d1 <- this would be disk#1 on controller#3 >>> c3d0s0 <- this would be slice #0 (partition) on disk #0 on controller #3 >>> >>> Usually there is a also t0 there, e.g.: >>> >>> cfgadm -a|grep disk |head >>> sata0/0::dsk/c0t0d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok >>> sata0/1::dsk/c0t1d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok >>> sata0/2::dsk/c0t2d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok >>> sata0/3::dsk/c0t3d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok >>> sata0/4::dsk/c0t4d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok >>> sata0/5::dsk/c0t5d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok >>> sata0/6::dsk/c0t6d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok >>> sata0/7::dsk/c0t7d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok >>> sata1/0::dsk/c1t0d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok >>> sata1/1::dsk/c1t1d0 ? ? ? ? ? ?disk ? ? ? ? connected ? ?configured ? ok >>> >>> >>> HTH >>> >>> Carsten >>> _______________________________________________ >>> zfs-discuss mailing list >>> zfs-discuss at opensolaris.org >>> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >>> >> >> _______________________________________________ >> zfs-discuss mailing list >> zfs-discuss at opensolaris.org >> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >
Hua-Ying Ling wrote:> On Mon, Jul 6, 2009 at 11:27 AM, <Cindy.Swearingen at sun.com> wrote: > >> Hi Hua-Ying, >> >> Some disks don''t have target identifiers, like you c3d0 >> and c3d1 disks. >> >> To attach your c3d1 disk, you need to relabel it with an >> SMI label and provide a slice, s0, for example. >> >> See the steps here: >> >> http://www.solarisinternals.com/wiki/index.php/ZFS_Troubleshooting_Guide#Replacing.2FRelabeling_the_Root_Pool_Disk >> >> Cindy >> >> P.S. For cfgadm output, you might need to use the cfgadm -al or maybe >> -av syntax. The options/output of this command might depend on the hardware >> types. I''m not quite sure what it needs in this case. >> >> > I''m confused by the output of the partition command, this is the > partition table created by the installer: > > current partition table (original): > Total disk cylinders available: 24318 + 2 (reserved cylinders) > > Part Tag Flag Cylinders Size Blocks > 0 root wm 1 - 24316 186.27GB (24316/0/0) 390636540 > 1 unassigned wm 0 0 (0/0/0) 0 > 2 backup wu 0 - 24317 186.29GB (24318/0/0) 390668670 > 3 unassigned wm 0 0 (0/0/0) 0 > 4 unassigned wm 0 0 (0/0/0) 0 > 5 unassigned wm 0 0 (0/0/0) 0 > 6 unassigned wm 0 0 (0/0/0) 0 > 7 unassigned wm 0 0 (0/0/0) 0 > 8 boot wu 0 - 0 7.84MB (1/0/0) 16065 > 9 unassigned wm 0 0 (0/0/0) 0 > > It seems like the partition 0,2,8 are sharing the same part of the > disk. How is this possible?That''s normal. s2 always maps the whole drive. -- Ian.
Hua-Ying, The partition table *is* confusing so don''t try to make sense of it. :-) Partition or slice 2 represents the entire disk, cylinders 0-24317. You created slice 0, which is cylinders 1-24316. Slice 8 is a reserved, legacy area for boot info on some x86 systems. You can ignore it. Looks like a reasonable partition setup to me. As long as the partition tables for your c3d0 and c3d1 disks are similar you should be able to attach the disk, like this: # zpool attach rpool c3d0s0 c3d1s0 Don''t forget to add the bootblocks to c3d1s0 as described in the troubleshooting wiki. Cindy Hua-Ying Ling wrote:> I''m confused by the output of the partition command, this is the > partition table created by the installer: > > current partition table (original): > Total disk cylinders available: 24318 + 2 (reserved cylinders) > > Part Tag Flag Cylinders Size Blocks > 0 root wm 1 - 24316 186.27GB (24316/0/0) 390636540 > 1 unassigned wm 0 0 (0/0/0) 0 > 2 backup wu 0 - 24317 186.29GB (24318/0/0) 390668670 > 3 unassigned wm 0 0 (0/0/0) 0 > 4 unassigned wm 0 0 (0/0/0) 0 > 5 unassigned wm 0 0 (0/0/0) 0 > 6 unassigned wm 0 0 (0/0/0) 0 > 7 unassigned wm 0 0 (0/0/0) 0 > 8 boot wu 0 - 0 7.84MB (1/0/0) 16065 > 9 unassigned wm 0 0 (0/0/0) 0 > > It seems like the partition 0,2,8 are sharing the same part of the > disk. How is this possible? > > Hua-Ying > > > > On Mon, Jul 6, 2009 at 11:27 AM, <Cindy.Swearingen at sun.com> wrote: > >>Hi Hua-Ying, >> >>Some disks don''t have target identifiers, like you c3d0 >>and c3d1 disks. >> >>To attach your c3d1 disk, you need to relabel it with an >>SMI label and provide a slice, s0, for example. >> >>See the steps here: >> >>http://www.solarisinternals.com/wiki/index.php/ZFS_Troubleshooting_Guide#Replacing.2FRelabeling_the_Root_Pool_Disk >> >>Cindy >> >>P.S. For cfgadm output, you might need to use the cfgadm -al or maybe >>-av syntax. The options/output of this command might depend on the hardware >>types. I''m not quite sure what it needs in this case. >> >> >>Hua-Ying Ling wrote: >> >>>When I use "cfgadm -a" it only seems to list usb devices? >>> >>>#cfgadm -a >>>Ap_Id Type Receptacle Occupant >>>Condition >>>usb2/1 unknown empty unconfigured ok >>>usb2/2 unknown empty unconfigured ok >>>usb2/3 unknown empty unconfigured ok >>>usb3/1 unknown empty unconfigured ok >>> >>>I''m trying to convert a nonredundant storage pool to a mirrored pool. >>>I''m following the "zfs admin guide" on page 71. >>> >>>I currently have a existing rpool: >>> >>>#zpool status >>> >>> pool: rpool >>> state: ONLINE >>> scrub: none requested >>>config: >>> >>> NAME STATE READ WRITE CKSUM >>> rpool ONLINE 0 0 0 >>> c3d0s0 ONLINE 0 0 0 >>> >>>I want to mirror this drive, I tried using format to get the disk name >>> >>>#format >>>Searching for disks...done >>> >>> >>>AVAILABLE DISK SELECTIONS: >>> 0. c3d0 <DEFAULT cyl 24318 alt 2 hd 255 sec 63> >>> /pci at 0,0/pci-ide at 14,1/ide at 0/cmdk at 0,0 >>> 1. c3d1 <drive type unknown> >>> /pci at 0,0/pci-ide at 14,1/ide at 0/cmdk at 1,0 >>> >>>So I tried >>> >>>#zpool attach rpool c3d0s0 c3d1s0 // failed >>>cannot open ''/dev/dsk/c3d1s0'': No such device or address >>> >>>#zpool attach rpool c3d0s0 c3d1 // failed >>>cannot label ''c3d1'': EFI labeled devices are not supported on root pools. >>> >>>Thoughts? >>> >>>Thanks, >>>Hua-Ying >>> >>>On Mon, Jul 6, 2009 at 2:37 AM, Carsten >>>Aulbert<carsten.aulbert at aei.mpg.de> wrote: >>> >>> >>>>Hi >>>> >>>>Hua-Ying Ling wrote: >>>> >>>> >>>>>How do I discover the disk name to use for zfs commands such as: >>>>>c3d0s0? I tried using format command but it only gave me the first 4 >>>>>letters: c3d1. Also why do some command accept only 4 letter disk >>>>>names and others require 6 letters? >>>> >>>> >>>>Usually i find >>>> >>>>cfgadm -a >>>> >>>>helpful enough for that (mayby adding ''|grep disk'' to it). >>>> >>>>Why sometimes 4 and sometimes 6 characters: >>>> >>>>c3d1 <- this would be disk#1 on controller#3 >>>>c3d0s0 <- this would be slice #0 (partition) on disk #0 on controller #3 >>>> >>>>Usually there is a also t0 there, e.g.: >>>> >>>>cfgadm -a|grep disk |head >>>>sata0/0::dsk/c0t0d0 disk connected configured ok >>>>sata0/1::dsk/c0t1d0 disk connected configured ok >>>>sata0/2::dsk/c0t2d0 disk connected configured ok >>>>sata0/3::dsk/c0t3d0 disk connected configured ok >>>>sata0/4::dsk/c0t4d0 disk connected configured ok >>>>sata0/5::dsk/c0t5d0 disk connected configured ok >>>>sata0/6::dsk/c0t6d0 disk connected configured ok >>>>sata0/7::dsk/c0t7d0 disk connected configured ok >>>>sata1/0::dsk/c1t0d0 disk connected configured ok >>>>sata1/1::dsk/c1t1d0 disk connected configured ok >>>> >>>> >>>>HTH >>>> >>>>Carsten >>>>_______________________________________________ >>>>zfs-discuss mailing list >>>>zfs-discuss at opensolaris.org >>>>http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >>>> >>> >>>_______________________________________________ >>>zfs-discuss mailing list >>>zfs-discuss at opensolaris.org >>>http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >>