How can i list Solaris External storages?


 
Thread Tools Search this Thread
Operating Systems Solaris How can i list Solaris External storages?
# 1  
Old 06-01-2015
How can i list Solaris External storages?

Hi

how can i list Solaris external storage's only, ie SAN,

Code:
# for fs in `mount -p | egrep 'ufs|zfs|vxfs' | awk '{print $3}'`; do df -h $fs | sed 's/%//g' | grep -v capacity; done

/dev/dsk/c2t5000C5003C31721Bd0s0    30G    18G    12G    61    /
/dev/dsk/c2t60060160B9612E00636A2F0D094AE211d0s3    15G   6.8G   7.8G    47    /comsaps-root
/dev/dsk/c2t5000C5003C31721Bd0s5   148G    24G   122G    17    /comsdir
/dev/dsk/c2t60060160B9612E00A49FB80CFC49E211d0s3    15G   6.5G   8.1G    45    /comsdb-root
/dev/dsk/c2t5000C5003C31721Bd0s6    66G    11G    55G    17    /export/home
/dev/dsk/c2t60060160B9612E00636A2F0D094AE211d0s0    84G    15G    68G    18    /comsaps-root/root/comsapps
/dev/dsk/c2t60060160B9612E00A49FB80CFC49E211d0s0   192G   149G    41G    79    /comsdb-root/root/data1
/dev/dsk/c2t60060160B9612E0096CF5723FC49E211d0s0   197G    56G   139G    29    /comsdb-root/root/orabkp

is there any other way to achieve this. the output is also listing local HDD

thanks & Regards,
Ben
# 2  
Old 06-01-2015
Store the disk of "/" (minus the dXsX at the end), and search for other disks.
Code:
mount -p | awk '($3=="/") {disk=$1; sub("d[0-9]+s[0-9]+$","",disk)} ($4~/^(ufs|zfs|vxfs)$/ && $1!~"^"disk) {print $3}'


Last edited by MadeInGermany; 06-01-2015 at 10:33 AM.. Reason: added {print}
# 3  
Old 06-01-2015
Quote:
Originally Posted by MadeInGermany
Store the disk of "/" (minus the dXsX at the end), and search for other disks.
Code:
mount -p | awk '($3=="/") {disk=$1; sub("d[0-9]+s[0-9]+$","",disk)} ($4~/^(ufs|zfs|vxfs)$/ && $1!~"^"disk) {print $3}'


Got error

Code:
root@globaldev6 # mount -p | awk '($3=="/") {disk=$1; sub("d[0-9]+s[0-9]+$","",disk)} ($4~/^(ufs|zfs|vxfs)$/ && $1!~"^"disk) {print $3}'
awk: syntax error near line 1
awk: illegal statement near line 1
awk: syntax error near line 1
awk: bailing out near line 1

# 4  
Old 06-01-2015
Use nawk or /usr/xpg4/bin/awk! (/usr/bin/awk does not know sub())
# 5  
Old 06-01-2015
HI

that also gives me error like -p option is nor there with mount.

i have achieved that same with below command:

Code:
root@globaldev6 # luxadm probe | grep -v "Node WWN:" | awk -F\/ 'NR>3{print $4}'|sed 's/..$//g'
c3t600D0231000BE73D1C9ED0B453F185C2d0
c3t600D0231000BE73D4A2C042D18A2E641d0
c3t600D0231000BE73D6D42C80D77B8DDF0d0
c3t600D0231000BE73D194D85CA4D102795d0
c3t600D0231000BE73D435D27657C919F6Ed0
c3t600D0231000BE73D5482A3BE75F412FCd0
c3t600D0231000BE73D5619FDD6500CF273d0
c3t600D0231000BE73D37672E311947B18Cd0

# 6  
Old 06-01-2015
Hmm, you gave us the mount -p.
It should work in Solaris 8 and later.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How i can backup data's to External Drive in Solaris 10/11?

Hello all, I'm new member and it's a very important for me. I need to backup data's from 3 server ( V880, M5000m and V490) I dont have a chance to use NFS. So i need to backup to Usb External Drive, can you help me with this issue? I dont have any experience about backup, but i need to... (1 Reply)
Discussion started by: sahkel
1 Replies

2. Solaris

Solaris - Sendmail - Adding .com.gr in external senders e-mails

Hello Everybody ! I'm Harry from Athens Greece and i have a problem with my Sendmail 8.13.3 installed on Solaris SunOS ultra 5.10. The problem is that when someone sends to us an e-mail and his e-mail address is like : xxxx@xxxx.com, our e-mail server adds up in the senders address a .com.gr... (2 Replies)
Discussion started by: Mcasim
2 Replies

3. Solaris

Solaris can't detect external HDD on HP server

Hello, Unix users :) Has anyone had this problem when you connect an external hard drive to the server and it is simply not visible with any commands? The server is HP DL380 g8, and OS is: root@...:/# cat /etc/release Oracle Solaris 10 8/11 s10x_u10wos_17b X86 ... (16 Replies)
Discussion started by: Aratai
16 Replies

4. AIX

HACMP two-node cluster with two SAN storages mirrored using LVM

HACMP two-node cluster with mirrored LVM. HACMP two-node cluster with two SAN storages mirrored using LVM. Configured 2 disk heartbeat networks - 1 per each SAN storage. While performing redundancy tests. Once one of SAN storage is down - cluster is going to ERROR state. What are the guidelines... (2 Replies)
Discussion started by: OdilPVC
2 Replies

5. Solaris

Boot Solaris off of an old external hard drive

Hi Folks, First a little background, I am working on a ship that operates in the Indian Ocean and Persian/Arabian gulf area. We had a Sunblade 2000 that finally died. The Video board burned up and I guess damaged the mother board. So we ordered 2 rebuilt 2000s one as a spare. Due to mounting... (1 Reply)
Discussion started by: Sean.kelly
1 Replies

6. Solaris

how to install solaris on portable external harddisk

Hi Fnds, I dont have enough space on my Vista based PC and I want solais to be installed on a portable external hard disk. Can anybody tell me how I can install solaris on external harddisk. cheers :), Vinodky (1 Reply)
Discussion started by: vinodky
1 Replies

7. UNIX for Dummies Questions & Answers

External Network Adapter for Solaris 10

Hi All, I am new here - this is my first post. I have installed Solaris 10 5/09 on my Dell M6300. The install went well, but the Dell's onboard network card is the Broadcom BCM5756ME Gigabit Ethernet - and sadly no Solaris driver exists for it. The Solaris 10 install just jumped by the... (1 Reply)
Discussion started by: soulmerchant
1 Replies

8. Shell Programming and Scripting

Rsync to an external list of URLs

I'm going to have a text file formatted something like this: some_name http://www.someurl.com/ another_name http://www.anotherurl.com/ third_name http://www.thirdurl.com/ I need to write a script that can rsync from a file path I'll set, to each URL in the list. Any ideas? (8 Replies)
Discussion started by: ibsen
8 Replies

9. UNIX for Advanced & Expert Users

Reset External Modem / Solaris 8

It's no longer auto answering. I've power cycled the modem, but is there a command to reinitialize the modem/serial port? (1 Reply)
Discussion started by: jgordon
1 Replies

10. UNIX for Dummies Questions & Answers

Install Solaris on External Firewire Disk

Hello All, I have a laptop running windows 2000 and I have a External Firewire Hard Disk of 60 GB. Now my question is, " Is it possible to install Solaris 8 on this external Firewire Hard Disk". When I tried installing, It did not find the external Firewire Disk, the only partition information,... (1 Reply)
Discussion started by: sanjay92
1 Replies
Login or Register to Ask a Question