New To Solaris

Hi,

I have recently been told i need to look after a clients Solaris servers (8,9 and 10) and wondered if i could ask the forum for some quick advice on a couple of things. All my previous admin work is on HPUX and have discovered the way the Solaris disk management and file system management is massively different. So i wonder if you might be able to offer some help on a couple of questions.

One of my first tasks is to identify if the servers have got mirrored boot disks. In HPUX i would simply type lvlnboot -v and it would tell me, but i cannot find anywhere a single command in Solaris that would tell me this.

Question1 : Is there a single command i can run that will tell me if the disks are mirrored?

The other think that is confusing me is how the filesystems are set up. I have been looking at the format command as this is the only way i have found that will list the disks and give me an idea if they are internal or in an external array.

While i was looking in the format command i checked out the partition table. On the server i looked at i went into the format command twice, each time choosing a different disk, both of which appear to be internal and i saw these outputs from the print command;

DISK1;
partition> print
Current partition table (original):
Total disk cylinders available: 14087 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 1 - 1895 9.20GB (1895/0/0) 19283520
1 swap wu 1897 - 2350 2.20GB (454/0/0) 4619904
2 backup wm 0 - 14086 68.35GB (14087/0/0) 143349312
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 2352 - 2366 74.53MB (15/0/0) 152640

DISK2:
partition> print
Current partition table (original):
Total disk cylinders available: 24620 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 1 - 6751 9.30GB (6751/0/0) 19503639
1 swap wu 6752 - 8421 2.30GB (1670/0/0) 4824630
2 backup wm 0 - 24619 33.92GB (24620/0/0) 71127180
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 8422 - 8475 76.17MB (54/0/0) 156006

Question 2: Is there a single command that will tell me if a disk is internal or external instead of using format?

Question 3: Looking at the above output am i correct in assuming that the 2nd disks is a mirror of the first? It just bothered me why the number of blocks was so different to achieve roughly the same size (9.20Gb)

I am going to try and find some documentation for Solaris 8,9 and 10 that explains how Solaris manages disks and filesystems in the meantime, but any help would be brilliant.

Thank you.

Ad. Q1: There are three ways (two if it is Solaris 8 or 9) in which Solaris can mirror root disk:

  1. SVM - Solaris Volume Manager. To check if it is the case do the following:
df -h /

If "Filesystem" is something like /dev/md/dsk/d0 then you have root on SVM volume. Next check if it is mirror by doing:

metastat d0

d0 might be something else in your case.
2. ZFS - only for Solaris 10. Check it the same way:

df -h /

If it says something like rpool/ROOT/sol_10_u9_zfs (last part will be different), then you have ZFS root. To check if it is mirrored do:

zpool status rpool
  1. Hardware RAID. It is the least common. I only encountered this kind of mirroring on some T2000 servers. Output of df -h / will look like root was placed on local disk slice (c0t0d0s0), but when you do
raidctl -l

it will list that disk (c0t0d0) as volume built from physical disks.
Ad. Q2: most often external disks are SAN LUNS, which look like this in format output: "c5t60080E8004D2A6000000A1A500000D21d0". Anything else (much shorter, like c0t1d0) is most likely internal disk.
Ad. Q3: You cannot tell from format's output if the disk is part of a mirror.

your disks are certainly tracking quite closely....
what system (hardware) are you running?
post the outputs of `metastat -a` & `metadb`
post up /etc/vfstab too - that'll give us an indication of whats going on too

Use format to find the disks. They will look like "c1t0d0" or "c0t3d0" or something with cNtNdN designation. Run this to see the disk list:

echo | format

This will give you output like this:

# echo | format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c1t0d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
          /pci@9,600000/SUNW,qlc@2/fp@0,0/ssd@w2100000087ac64ef,0
       1. c1t1d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
          /pci@9,600000/SUNW,qlc@2/fp@0,0/ssd@w2100000087ac7f65,0
Specify disk (enter its number): Specify disk (enter its number):
#

Then use prtvtoc to see the disk partitions. Run:

prtvtoc /dev/dsk/c1t0d0s2 

to see the partitions. Dont forget to add the "s2" at the end of the disk. You'll see something like this:

# prtvtoc /dev/dsk/c1t0d0s2
* /dev/dsk/c1t0d0s2 partition map
*
* Dimensions:
*     512 bytes/sector
*     848 sectors/track
*      24 tracks/cylinder
*   20352 sectors/cylinder
*   14089 cylinders
*   14087 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      2    00          0  25175424  25175423
       1      3    01   25175424  25175424  50350847
       2      5    00          0 286698624 286698623
       3      7    00   50350848  30731520  81082367
       4      8    00   81082368  20982912 102065279
       5      0    00  102065280 184572288 286637567
       7      0    00  286637568     61056 286698623

HTH