How to make sure that a disk is not used?

Hi, I want to make sure a local disk c1t1d0s2 is not being used. SVM and VxVM are used on this Solaris 10 systems. This disk can not be found using 'df -k', 'metastat' and 'vxprint -ht'. But I can't mount it though format shows it contains ufs filesystem:

# mount /dev/dsk/c1t1d0s0 /mnt
Aug 18 17:30:40 hostname ufs: NOTICE: mount: not a UFS magic number (0x20202020)
mount: /dev/dsk/c1t1d0s0 is not this fstype

# format /dev/rdsk/c1t1d0s2 > p > p
Part Tag Flag Cylinders Size Blocks
0 root wm 2905 - 7260 6.00GB (4356/0/0) 12584484
1 swap wu 1 - 2904 4.00GB (2904/0/0) 8389656
2 backup wu 0 - 24619 33.92GB (24620/0/0) 71127180
3 unassigned wu 7261 - 7270 14.11MB (10/0/0) 28890
4 unassigned wu 0 0 (0/0/0) 0
5 unassigned wu 0 0 (0/0/0) 0
6 var wm 7271 - 15981 12.00GB (8711/0/0) 25166079
7 unassigned wu 15982 - 24619 11.90GB (8638/0/0) 24955182

Why can't it be mounted? How can I make 100% sure that it is not being used?

Thank you in advance!:slight_smile:

Hi,

If you are only talking about slice-2 (c1t1d0s2 ) then you should know that it is the refrence for that entire physical disc. It can not be used (ie mounted). Use other slices to solve your purpose.

If your problem is other than this, please post it here.

Thanks,
Deepak

I am talking about the whole disk, c1t1d0x. For example:

# vxprint -ht | grep c1t1d0
# metastat | grep c1t1d0
# grep c1t1d0 /etc/vfstab
# df -k | grep c1t1d0
# echo | format | grep c1t1d0
4. c1t1d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>

I could not find it in all these commands. How can I make 100% sure c1t1d0x is not being used?

prtvtoc /dev/rdsk/cxtxdxs2 can pring partition map
vxdisk list Will list disks under Veritas control
zpool list will show diskpools
zpool status details of pool and what disks are used.

There are many products that can use raw disk like oracle and that will not be visible to regular volume managers.

Check df -h output and try to establish what all volume managers are on server.
Also make sure you are running commands from global zone (if applicable)

Thanks!

There is no local zone on this system. I am looking for a simple and efficient way to confirm a disk is not being used.

Remove the disk from the machine and wait for a couple of days.

If nobody complains, the disk is not used ... :wink: