Get # of disks as non-root

Thread Tools Search this Thread
Operating Systems Solaris Get # of disks as non-root
# 1  
Old 08-09-2011
Get # of disks as non-root

I'm trying to figure if there are commands I can run as non-root/non-privileged users to figure out the number of disks. I know I can use format but it needs root. Any idea?
# 2  
Old 08-09-2011
iostat -En

# 3  
Old 08-09-2011
As far as I know , nothing will work as non privileged user.
But you can run as non privileged user

and list disk instances
# 4  
Old 08-09-2011
Thanks for the replies!

I should clarify what I'm trying to do...I'm trying to write a script to do some simple monitoring. I want to cron and execute it as non-root. Executing those commands do show the drives but there's no easy way to programatically parse the output...I should've been more clear with what I was trying to achieve Smilie
# 5  
Old 08-09-2011
I'm not sure what are you about precisely.
But this script might help
# 6  
Old 08-09-2011
Originally Posted by
I'm not sure what are you about precisely.
But this script might help
Thanks for the link

I tried running it on my system and it shows this:
c0t0d0s0 --- sd0
c0t2d0s0 --- sd1
c1t0d0s0 --- sd2

...and when I ran "format", it shows this:
# format
Searching for disks...done

       0. c0t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
       1. c0t2d0 <SEAGATE-ST9146802SS-0003 cyl 33916 alt 2 hd 8 sec 1056>
Specify disk (enter its number):

So it looks like the script is reporting 3 drives while format shows 2? Smilie
# 7  
Old 08-09-2011
what is the output of "rmformat"? the 3rd drive could be your DVD or another external device...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Backing up root disks

Hi ! I wonder if in solaris 10 there is a utility similar to ignite in HP-UX that backup entire file systems (/, /usr, /var, /tmp, /home). I have to backup only the root disk of a server, but ufsdump seem to be backing up individual file systems....only, am I correct? (1 Reply)
Discussion started by: fretagi
1 Replies

2. UNIX for Dummies Questions & Answers

Can you gain root privileges if the suid program does not belong to root?

I had a question in my test which asked where suppose user B has a program with 's' bit set. Can user A run this program and gain root privileges in any way? I suppose not as the suid program run with privileges of owner and this program will run with B's privileges and not root. (1 Reply)
Discussion started by: syncmaster
1 Replies

3. Shell Programming and Scripting

Find users with root UID or GID or root home

I need to list users in /etc/passwd with root's GID or UID or /root as home directory If we have these entries in /etc/passwd root:x:0:0:root:/root:/bin/bash rootgooduser1:x:100:100::/home/gooduser1:/bin/bash baduser1:x:0:300::/home/baduser1:/bin/bash... (6 Replies)
Discussion started by: anil510
6 Replies

4. Solaris

Backup root disks

Hi all! Please I would appreciate some inputs on the following: I have inherited a SUN BLADE chassis with 6 T6320 server modules, in which there is only 1 root disk in all of them. I need to do a backup of the root disk in case those disk crash. But there is no backup device attached to it.... (6 Replies)
Discussion started by: fretagi
6 Replies

5. Solaris

Migration of system having UFS root FS with zones root to ZFS root FS

Hi All After downloading ZFS documentation from oracle site, I am able to successfully migrate UFS root FS without zones to ZFS root FS. But in case of UFS root file system with zones , I am successfully able to migrate global zone to zfs root file system but zone are still in UFS root file... (2 Replies)
Discussion started by: sb200
2 Replies

6. Solaris

Mirorr Solaris 10 5/09 root disks at install time

I'm going to install a fresh Solaris 10 5/09 install on a UFS on a server with 2 disks attached to a SCSI controller and i want to mirror those disks at install time is there any to do this , As far as i know Jump start and live upgrade are the sole way to do this , is there anyways except... (3 Replies)
Discussion started by:
3 Replies

7. Solaris

Disk mismatch while trying to zfs mirroring non-root disks

Hello All, I am trying to mirror two non-root hard drives using zfs. But "fmthard" fails when I try to copy the vtoc due to disk mismatch. Please help me. --- iostat command shows the disk to be similiar --- format command shows disk to be different :confused: --- c1t2d0 is the active... (8 Replies)
Discussion started by: pingmeback
8 Replies

8. UNIX for Dummies Questions & Answers

How to allow access to some commands having root privleges to be run bu non root user

hi i am new to unix and i have abig task. i have to \run particular commands having root privileges from a non root user. i know sudo is one of the way but i need sum other approach kindly help Thanks (5 Replies)
Discussion started by: suryashikha
5 Replies

9. Solaris

Non-Root mode ... luxadm to show path(s) for Disks

Hi Gurus out there... I am pondering over a situation where I have non-root access (user account), where I am trying to determine paths (including multipaths) on a host. "luxadm display" seems very appropriate, but requires root access. Is there anyway I can get the FC path information? ... (1 Reply)
Discussion started by: verisund
1 Replies

10. UNIX for Dummies Questions & Answers

Run non-root script as root with non-root environment

All, I want to run a non-root script as the root user with non-root environment variables with crontab. The non-root user would have environment variables for database access such as Oracle or Sybase. The root user does not have the Oracle or Sybase enviroment variables. I thought you could do... (2 Replies)
Discussion started by: bubba112557
2 Replies
Login or Register to Ask a Question