Hello All i want to add second disk to existing rpool with one disk. but when i run this command it returns this error,,why? "device is too small?? " (all of my disks are simillar.) here are my information: # zpool status pool: rpool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 c0t0d0s0 ONLINE 0 0 0 errors: No known data errors # zpool attach rpool c0t0d0s0 c0t8d0 cannot attach c0t8d0 to c0t0d0s0: device is too small # format Searching for disks...done c0t11d0: configured with capacity of 34.18GB AVAILABLE DISK SELECTIONS: 0. c0t0d0 <SEAGATE-ST336704LC-0002 cyl 14087 alt 2 hd 12 sec 424> /pci at 1f,4000/scsi at 3/sd at 0,0 1. c0t8d0 <SEAGATE-ST336704LC-0002-34.18GB> /pci at 1f,4000/scsi at 3/sd at 8,0 2. c0t10d0 <drive type unknown> /pci at 1f,4000/scsi at 3/sd at a,0 3. c0t11d0 <SEAGATE-ST336704LC-0002 cyl 14087 alt 2 hd 12 sec 424> /pci at 1f,4000/scsi at 3/sd at b,0 4. c0t12d0 <SEAGATE-ST336704LC-0002 cyl 14087 alt 2 hd 12 sec 424> /pci at 1f,4000/scsi at 3/sd at c,0 # df -ah Filesystem size used avail capacity Mounted on rpool/ROOT/s10s_u6wos_07b 33G 4.2G 28G 14% / /devices 0K 0K 0K 0% /devices ctfs 0K 0K 0K 0% /system/contract proc 0K 0K 0K 0% /proc mnttab 0K 0K 0K 0% /etc/mnttab swap 1014M 1.5M 1012M 1% /etc/svc/volatile objfs 0K 0K 0K 0% /system/object sharefs 0K 0K 0K 0% /etc/dfs/sharetab fd 0K 0K 0K 0% /dev/fd rpool/ROOT/s10s_u6wos_07b/var 33G 67M 28G 1% /var swap 1012M 0K 1012M 0% /tmp swap 1012M 40K 1012M 1% /var/run rpool/export 33G 20K 28G 1% /export rpool/export/home 33G 18K 28G 1% /export/home rpool 33G 94K 28G 1% /rpool -hosts 0K 0K 0K 0% /net auto_home 0K 0K 0K 0% /home lct:vold(pid546) 0K 0K 0K 0% /vol why it returns this error? Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20081221/982ce6ba/attachment.html>
On Sun, Dec 21, 2008 at 10:10 AM, iman habibi <iman.habibi at gmail.com> wrote:> Hello All > i want to add second disk to existing rpool with one disk. > but when i run this command it returns this error,,why?That''s because your c0t8d0 disk has EFI label. with EFI label the largest partiotion you can create is slightly smaller than the whole disk (17 KB less to be exact). That causes the zpool attach command to fail (you cannot mirror from a bigger disk to a smaller one). Another thing is you probably do not want to EFI label on rpool devices anyway, since you cannot boot from EFI label today. You may use format -e command to change the label from EFI to SMI.> # format > Searching for disks...done > > c0t11d0: configured with capacity of 34.18GB > > > AVAILABLE DISK SELECTIONS: > 0. c0t0d0 <SEAGATE-ST336704LC-0002 cyl 14087 alt 2 hd 12 sec 424> > /pci at 1f,4000/scsi at 3/sd at 0,0 > 1. c0t8d0 <SEAGATE-ST336704LC-0002-34.18GB> > /pci at 1f,4000/scsi at 3/sd at 8,0See - the label on this disk hints that it is EFI rather than SMI.> 2. c0t10d0 <drive type unknown> > /pci at 1f,4000/scsi at 3/sd at a,0 > 3. c0t11d0 <SEAGATE-ST336704LC-0002 cyl 14087 alt 2 hd 12 sec 424> > /pci at 1f,4000/scsi at 3/sd at b,0 > 4. c0t12d0 <SEAGATE-ST336704LC-0002 cyl 14087 alt 2 hd 12 sec 424> > /pci at 1f,4000/scsi at 3/sd at c,0 >-- Regards, Cyril
iman habibi wrote:> Hello All > i want to add second disk to existing rpool with one disk. > but when i run this command it returns this error,,why? > > "device is too small?? " > (all of my disks are simillar.)The newly attaching disk (slice in this case, because it is an rpool) must have the same number of blocks, or more. Even though you may have two disks with the same vendor label, they may have a different number of available blocks. prtvtoc provides this info relatively easily as the "sector count" column. Compare: prtvtoc /dev/rdsk/c0t0d0s0 prtvtoc /dev/rdsk/c0t8d0s0 (!!) As Cyril notes, and the ZFS Administration Guide says, you must use a slice for the rpool, not a whole disk. -- richard