I have used fdisk to partition the harddisk: Total disk size is 60800 cylinders Cylinder size is 16065 (512 byte) blocks Cylinders Partition Status Type Start End Length % ========= ====== ============ ===== === ====== == 1 Active Solaris2 1 2623 2623 4 2 Solaris2 2624 9623 7000 12 and the zpool status: /root>zpool status pool: rpool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 c7d0s0 ONLINE 0 0 0 errors: No known data errors question is: a. how to use "zpool add" to add the 2nd partition to rpool - which should be c7d0p2, right? when I did this: zpool add rpool c7d0p2 cannot add to ''rpool'': root pool can not have multiple vdevs or separate logs what do u mean by "separate logs"? b. assuming that it is NOT possible to add the 2nd partition to the zpool rpool, then how do I used fdisk (or whatever) to modify the partition table, so that the entire disk belong to the zpool rpool - instead of just c7d0p1 now allocated to zpool rpool? Thanks for the help :). -- Regards, Peter Teoh -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20091104/2d18afc3/attachment.html>
Peter Teoh wrote:> > I have used fdisk to partition the harddisk: > > Total disk size is 60800 cylinders > Cylinder size is 16065 (512 byte) blocks > > Cylinders > Partition Status Type Start End Length % > ========= ====== ============ ===== === ====== ==> 1 Active Solaris2 1 2623 2623 4 > 2 Solaris2 2624 9623 7000 12 > > > and the zpool status: > > /root>zpool status > pool: rpool > state: ONLINE > scrub: none requested > config: > > NAME STATE READ WRITE CKSUM > rpool ONLINE 0 0 0 > c7d0s0 ONLINE 0 0 0 > > errors: No known data errors > > > question is: > > a. how to use "zpool add" to add the 2nd partition to rpool - which > should be c7d0p2, right? > > when I did this: > > zpool add rpool c7d0p2 > cannot add to ''rpool'': root pool can not have multiple vdevs or > separate logs > > what do u mean by "separate logs"?That is the right command. However, the rpool as a special case is not permitted to be RAID 0 (multiple vdevs) as you were attempting, only RAID 1 (mirrors).> > b. assuming that it is NOT possible to add the 2nd partition to the > zpool rpool, then how do I used fdisk (or whatever) to modify the > partition table, so that the entire disk belong to the zpool rpool - > instead of just c7d0p1 now allocated to zpool rpool?It can be done by careful use of fdisk (with some risk of blowing away the data if you get it wrong), but I''ve seen other email threads here that indicate ZFS then won''t mount the pool, because the two labels at the end of the partition can''t be found anymore (having moved where the end of the partition is). You could create a separate zpool in the spare fdisk partition. Not good for performance, but probably fine for infrequently accessed data. -- Andrew
On Wed, Nov 4, 2009 at 4:59 AM, Andrew Gabriel <agabriel at opensolaris.org>wrote:> Peter Teoh wrote: > >> >> I have used fdisk to partition the harddisk: >> >> Total disk size is 60800 cylinders >> Cylinder size is 16065 (512 byte) blocks >> >> Cylinders >> Partition Status Type Start End Length % >> ========= ====== ============ ===== === ====== ==>> 1 Active Solaris2 1 2623 2623 4 >> 2 Solaris2 2624 9623 7000 12 >> >> >> and the zpool status: >> >> /root>zpool status >> pool: rpool >> state: ONLINE >> scrub: none requested >> config: >> >> NAME STATE READ WRITE CKSUM >> rpool ONLINE 0 0 0 >> c7d0s0 ONLINE 0 0 0 >> >> errors: No known data errors >> >> >> question is: >> >> a. how to use "zpool add" to add the 2nd partition to rpool - which >> should be c7d0p2, right? >> >> when I did this: >> >> zpool add rpool c7d0p2 >> cannot add to ''rpool'': root pool can not have multiple vdevs or separate >> logs >> >> what do u mean by "separate logs"? >> > > That is the right command. > > However, the rpool as a special case is not permitted to be RAID 0 > (multiple vdevs) as you were attempting, only RAID 1 (mirrors). > > > >> b. assuming that it is NOT possible to add the 2nd partition to the >> zpool rpool, then how do I used fdisk (or whatever) to modify the partition >> table, so that the entire disk belong to the zpool rpool - instead of just >> c7d0p1 now allocated to zpool rpool? >> > > It can be done by careful use of fdisk (with some risk of blowing away the > data if you get it wrong), but I''ve seen other email threads here that > indicate ZFS then won''t mount the pool, because the two labels at the end of > the partition can''t be found anymore (having moved where the end of the > partition is). > > You could create a separate zpool in the spare fdisk partition. Not good > for performance, but probably fine for infrequently accessed data. >I created a separate zpool via "zpool create mypool" (after being unsuccessful with "zpool create mypool c7d0s1", gave some error message, then I tried c7d0s2, and it indicate being identical to c7d0s0 (??? confused me), and then c7d0s3, c7d0s4 etc....all gave error messages. my assumption: so long as there is error message, nothing harmful/persistent is done.) and it has no error. zpool status indicated two pool of 20G identically ---> confused me completey. why 20G, as I had not specified anything in the command line. and "zpool create mypool -m /mountpoint c7d0s1" was not successful as well. anyway....after i reboot.....the MBR is corrupted, and only the symbol "GRUB" appeared on the left hand side of screen. Booting up with a livecd, and then "zpool create mypool c7d0" gives error like "/dev/dsk/c7d0s0 is part of exported or potentially active ZFS pool rpool" and repeated two more times for c7d0s2 and c7d0s8. what are all these different slices??? i used fdisk to create the first s0: 20G, and then fdisk 2nd partition as 100G (approx) but cannot use this partition at all throughout. Bottomline is that the rpool have about 16G of data which I badly need to retained/retreved.....hopefully it is not all gone. so how to retrieve back the data?????? thank you very much :-).> > -- > Andrew >-- Regards, Peter Teoh -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20091104/a619b5e8/attachment.html>
On Wed, Nov 04, 2009 at 09:59:05AM +0000, Andrew Gabriel wrote:> It can be done by careful use of fdisk (with some risk of blowing away > the data if you get it wrong), but I''ve seen other email threads here > that indicate ZFS then won''t mount the pool, because the two labels at > the end of the partition can''t be found anymore (having moved where the > end of the partition is).I don''t think that would be a problem. When I''ve tried it, as long as the first two labels are found, it creates the labels at the end of the disk. Admittedly, I''ve never tried it with a root pool.> You could create a separate zpool in the spare fdisk partition. Not good > for performance, but probably fine for infrequently accessed data.I don''t think the second fdisk partition can be used. The system doesn''t like to have multiple "Solaris" partitions. -- Darren
A Darren Dunham wrote:> On Wed, Nov 04, 2009 at 09:59:05AM +0000, Andrew Gabriel wrote: > >> It can be done by careful use of fdisk (with some risk of blowing away >> the data if you get it wrong), but I''ve seen other email threads here >> that indicate ZFS then won''t mount the pool, because the two labels at >> the end of the partition can''t be found anymore (having moved where the >> end of the partition is). >> > > I don''t think that would be a problem. When I''ve tried it, as long as > the first two labels are found, it creates the labels at the end of the > disk. Admittedly, I''ve never tried it with a root pool. > > >> You could create a separate zpool in the spare fdisk partition. Not good >> for performance, but probably fine for infrequently accessed data. >> > > I don''t think the second fdisk partition can be used. The system > doesn''t like to have multiple "Solaris" partitions. >Make sure it isn''t a Solaris partition (pick some partition type which is going to be meaningless to all the OS''s installed on the system, so they don''t try to access it). Then you can use it as above. -- Andrew
On Wed, Nov 04, 2009 at 04:41:34PM +0000, Andrew Gabriel wrote:> A Darren Dunham wrote:> >I don''t think the second fdisk partition can be used. The system > >doesn''t like to have multiple "Solaris" partitions. > > > > Make sure it isn''t a Solaris partition (pick some partition type which > is going to be meaningless to all the OS''s installed on the system, so > they don''t try to access it). Then you can use it as above.Yes, I think that would be fine. But I was referencing the OP who had in fact used a second Solaris partition.>>>I have used fdisk to partition the harddisk: >>> >>> Total disk size is 60800 cylinders >>> Cylinder size is 16065 (512 byte) blocks >>> >>> Cylinders >>> Partition Status Type Start End Length % >>> ========= ====== ============ ===== === ====== ==>>> 1 Active Solaris2 1 2623 2623 4 >>> 2 Solaris2 2624 9623 7000 12That should be changed. -- Darren