How to tell what disks are used for a zpool?


 
Thread Tools Search this Thread
Operating Systems Solaris How to tell what disks are used for a zpool?
# 1  
Old 04-03-2013
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 what what disks are free.

I know I can use the "zpool status" which will show me what disks are being used by the pools.

Last edited by robertinoau; 04-03-2013 at 07:50 AM..
# 2  
Old 04-03-2013
zpool status will tell you what disks are spare ones, if any.

https://blogs.oracle.com/eschrock/entry/zfs_hot_spares
# 3  
Old 04-03-2013
There is no zpool/zfs command to find disks that are not in a zpool...
This User Gave Thanks to DukeNuke2 For This Post:
# 4  
Old 04-03-2013
Solaris seems to miss an easy "show all disks" command.
I have always used
Code:
format </dev/null

or, as non-root,
Code:
iostat -nE

# 5  
Old 04-03-2013
I'm looking for something like this:

# vxdisk list
DEVICE TYPE DISK GROUP STATUS
hds9500-alua0_278 auto:cdsdisk - - online
hds9500-alua0_279 auto:cdsdisk - - online
hds9500-alua0_280 auto:sliced - - online
hds9500-alua0_281 auto:none - - online invalid
hds9500-alua0_282 auto:none - - online invalid
hds9500-alua0_283 auto:none - - online invalid

This is a "vxdisk list" which shows me all my disks attached to the system and what disk are used by VxVM (online) and the ones that are free (online invalid)

Anyone know how to do get such an output using zfs specific commands ?
# 6  
Old 04-03-2013
The fact a disk is not used by VxVM (resp ZFS) doesn't necessarily mean it is free.

It might be used by something else. Moreover, the reality might be more subtle than the disk level approach you are expecting.

There might be primary and extended partitions (x86), there will likely be slices (x86 & SPARC) and any of them might be used by some volume manager (SVM, VxVM, ZFS, ASM) or directly contain a file system (UFS, FAT, SamFS, ...) or something else, especially if the device is shared/used by a different operating system.

You might run something like this to explore all of the potential partitions/slices:
Code:
for i in /dev/dsk/*; do
printf "%s : %s\n" $i "$(fstyp $i 2>&1)"
done | grep -v "cannot open"

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. 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

3. Solaris

Restore of Netapp FC lun targets used as the disks for a zpool with exported zfs file systems

So, We have a Netapp storage solution. We have Sparc T4-4s running with LDOMS and client zones in the LDOMS, We are using FC for storage comms. So here's the basic setup FC luns are exported to the primary on the Sparc box. using LDM they are then exported to the LDOM using vdisk. at the... (4 Replies)
Discussion started by: os2mac
4 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. UNIX for Advanced & Expert Users

R5 zpool in corrupted state

Hi All, I am getting zpool corrupted message under zpool status command.What could be the reason for this.I had observed this zpool was full this morning after this i am seeing this error. $PWD>zpool status -xv R5 pool: R5 state: DEGRADED status: One or more devices has experienced... (0 Replies)
Discussion started by: sahil_shine
0 Replies

6. Solaris

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: root@abcxxx>zpool status pool: rpool state: ONLINE scrub: none requested... (4 Replies)
Discussion started by: mystition
4 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. Solaris

Remove the exported zpool

I had a pool which was exported and due to some issues on my SAN i was never able to import it again. Can anyone tell me how can i destroy the exported pool to free up the LUN. I tried to create a new pool on the same pool but it gives me following error # zpool create emcpool4 emcpower0c... (0 Replies)
Discussion started by: fugitive
0 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