Zpool query


 
Thread Tools Search this Thread
Operating Systems Solaris Zpool query
# 1  
Old 09-20-2012
Error Zpool query

Hi,

I have an X86pc with Solaris 10 and ZFS system. It has 8 similar disks.
I need help in creating some zpools and changing the mount-point of a slice.

Currently, the zpool in my system is like this:

Code:
root@abcxxx>zpool status
  pool: rpool
 state: ONLINE
 scrub: none requested
config:

        NAME                       STATE     READ WRITE CKSUM
        rpool                      ONLINE       0     0     0
          c0t5000C50047C6CBD5d0s0  ONLINE       0     0     0

errors: No known data errors
root@abcxxx>

I need to create a pool like this:
Code:
root@abcxxx>zpool status
  pool: rpool
 state: ONLINE
 scrub: scrub completed after 0h2m with 0 errors on Tue Sep  4 03:02:08 2012
config:

        NAME                         STATE     READ WRITE CKSUM
        rpool                        ONLINE       0     0     0
          mirror-0                   ONLINE       0     0     0
            c0t5000C50047C6CBD5d0s0  ONLINE       0     0     0
            c0t5000CCA02533FC85d0s0  ONLINE       0     0     0
        spares
          c0t5000CCA025387065d0s0    AVAIL   
          c0t5000CCA0253C4D95d0s0    AVAIL   

errors: No known data errors

  pool: xpool
 state: ONLINE
 scrub: scrub completed after 0h0m with 0 errors on Tue Sep  4 03:03:13 2012
config:

        NAME                         STATE     READ WRITE CKSUM
        xpool                        ONLINE       0     0     0
          mirror-0                   ONLINE       0     0     0
            c0t5000CCA0252B6215d0s0  ONLINE       0     0     0
            c0t5000CCA0252B36D9d0s0  ONLINE       0     0     0
          mirror-1                   ONLINE       0     0     0
            c0t5000CCA0252699DDd0s0  ONLINE       0     0     0
            c0t5000CCA0252B34EDd0s0  ONLINE       0     0     0
        spares
          c0t5000CCA025387065d0s0    AVAIL   
          c0t5000CCA0253C4D95d0s0    AVAIL   

errors: No known data errors
root@abcxxx>

I am not very familiar with the usage of zpool command and tried using various options but ended up creating wrong pools and re-installing the system. So, I need help in creating the above pools.

Also, one of my directories zpool/var/opt/abc is mounted on /var/opt/abc slice. Once the pools are created, I need to change the mount-point from zpool/var/opt/abc to xpool/var/opt/abc. How can i do that?

Thanks in advance.
Mayaank

Last edited by mystition; 09-20-2012 at 03:58 AM..
# 2  
Old 09-20-2012
Here is how I would do it (although untested):
Code:
prtvtoc /dev/rdsk/c0t5000C50047C6CBD5d0s2 | fmthard -s - /dev/rdsk/c0t5000CCA02533FC85d0s2
installgrub /boot/grub/stage1 /boot/grub/stage2 c0t5000CCA02533FC85d0s0
zpool attach -f rpool c0t5000C50047C6CBD5d0s0 c0t5000CCA02533FC85d0s0
zpool add rpool spare c0t5000CCA025387065d0s0
zpool add rpool spare c0t5000CCA0253C4D95d0s0

zpool create xpool mirror c0t5000CCA0252B6215d0s0 c0t5000CCA0252B36D9d0s0 mirror c0t5000CCA0252699DDd0s0 c0t5000CCA0252B34EDd0s0
zpool add xpool spare c0t5000CCA025387065d0s0
zpool add xpool spare c0t5000CCA0253C4D95d0s0

Your last request is less clear. Not sure exactly what you mean with zpool/var/opt/abc. Is it a dataset (file system) ? Don't you mean rpool/var/... instead of zpool/var/... ?

Perhaps something like:
Code:
zfs set mountpoint=/xpool/var/opt/abc rpool/var/opt/abc to

This User Gave Thanks to jlliagre For This Post:
# 3  
Old 09-23-2012
Bug

Many Thanks jlliagre,

Your post was very helpful. Only
Code:
 installgrub /boot/grub/stage1 /boot/grub/stage2 c0t5000CCA02533FC85d0s0

was not working for me. But the pools are created now as per expectation.

BR// Smilie
# 4  
Old 09-23-2012
I should have written:
Code:
installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c0t5000CCA02533FC85d0s0

# 5  
Old 10-04-2012
mount point creation in zpool

Code:
zfs create -o mountpoint=<mount-point> pool0/amy-name


Last edited by Scott; 10-04-2012 at 04:39 AM.. Reason: The code tags button is just seven along from the bold button :)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Zpool mirroring

Now this doesnt look right to me. All of these disks are 100Gb LUNS so total zpool size is 300Gb. Am I right in saying that this zpool consists of two disks plus one more disk that is 6 way mirrored? So a bit pointless because only one of the three is mirrored (and 6 way is a bit of overkill... (3 Replies)
Discussion started by: psychocandy
3 Replies

2. Solaris

Replace zpool with another disk

issue, I had a zpool which was full pool_temp1 199G 197G 1.56G 99% ONLINE - pool_temp2 199G 196G 3.09G 98% ONLINE - as you can see, full so I replaced with a larger disk. zpool replace pool_temp1 c3t600144F0FF8BA036000058CC1DB80008d0s0... (2 Replies)
Discussion started by: rrodgers
2 Replies

3. BSD

Zpool problem

Hi I have a problem with size on zfs filesystem on FreeBSD 9.2-RELEASE-p3. When I do this: free01# df -Th Filesystem Type Size Used Avail Capacity Mounted on /dev/ufs/FreeNASdde ufs 926M 826M 26M 97% / devfs devfs ... (1 Reply)
Discussion started by: primo102
1 Replies

4. Solaris

Shrinking zpool

Hello experts, I have a solaris 10 (SunOS 5.10 Generic_148888-05 sun4u sparc SUNW,SPARC-Enterprise) that by mistake I added a second san space of 700g to the pool. the whole pool is now 1.2T and, I need to take the space away from the pool and, make the pool 700g total. this is live oracle... (7 Replies)
Discussion started by: afadaghi
7 Replies

5. Solaris

How to tell what disks are used for a zpool?

Hello, Does anyone know how I can tell what disk are being not being used by a zpool? For example in Veritas Volume manager, I can run a "vxdisk list" and disks that are marked as "online invalid" are disk that are not used. I'm looking for a similar command in ZFS which will easily show... (5 Replies)
Discussion started by: robertinoau
5 Replies

6. Shell Programming and Scripting

Shell Script to execute Oracle query taking input from a file to form query

Hi, I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database. For instance: USER CITY --------- ---------- A CITY_A B CITY_B C ... (2 Replies)
Discussion started by: DevendraG
2 Replies

7. Solaris

ZPOOL help..

hi ... i have added a physical disk to the pool with ""zpool add <poolname> diskname"""... after that i realized that i have to mirror it instead..then i tried to take that disk out of the pool but i m not able to do that.. i have gone through many unix help sites , nothing worked , so please... (6 Replies)
Discussion started by: yrajendergoud
6 Replies

8. Solaris

What exactly does 'zpool iostat' measure?

hi there, i'd like to know what exactly zpool's iostat (-v) output measure, especially the writes. Is it only the writes to the ZIL or all writes (including commmits) to the disks? if anyone knows, that'd be helpful roti (1 Reply)
Discussion started by: rotunda
1 Replies

9. Shell Programming and Scripting

Query Oracle tables and return values to shell script that calls the query

Hi, I have a requirement as below which needs to be done viz UNIX shell script (1) I have to connect to an Oracle database (2) Exexute "SELECT field_status from table 1" query on one of the tables. (3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
Discussion started by: balaeswari
6 Replies

10. Solaris

need zpool to revert...

hi i have created a pool using zpool command for my /dev/dsk/c1d0s3 disk. The poolname is qwertyuiopasdfghjklmnbvcxzzxcvbnmasdfghjklqwertyuiopoiuytrewqasdfghjklkjhgfdsazxcvbnmmnbnbcxczxzassd ddddvfhfghgjjgjhgkhkljfjlhohihiuyuioyguioyguiowyuiogwyuigwrigywuigyguiyuiogyugiyguioyuyguiowygiuygui... (1 Reply)
Discussion started by: SankarV
1 Replies
Login or Register to Ask a Question