Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disk partition info on Solaris 5.8

Status
Not open for further replies.

Job317

Programmer
Aug 15, 2007
37
US
I am adding a new hard drive to my existing 5.8 Sparc machine but before I delve into that I need to understand what is going on on the current drive.

Can someone please explain to me the following information from the 'df' command and the format->partition->print command regarding my current drive?

Code:
# df
/                  (/dev/dsk/c0t0d0s0 ):  304868 blocks   262371 files
/proc              (/proc             ):       0 blocks    15866 files
/etc/mnttab        (mnttab            ):       0 blocks        0 files
/var/run           (swap              ): 1933200 blocks   109787 files
/tmp               (swap              ): 1933200 blocks   109787 files
/export/home       (/dev/dsk/c0t0d0s7 ): 6864902 blocks   789310 files

# format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
       0. c0t0d0 <ST39120A cyl 17660 alt 2 hd 16 sec 63>
          /pci@1f,0/pci@1,1/ide@3/dad@0,0
       1. c0t1d0 <ST320011A cyl 38790 alt 2 hd 16 sec 63>
          /pci@1f,0/pci@1,1/ide@3/dad@1,0
Specify disk (enter its number): 0
selecting c0t0d0
[disk formatted, no defect list found]
Warning: Current Disk has mounted partitions.

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

Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       0 -  4161        2.00GB    (4162/0/0)   4195296
  1       swap    wu    4162 -  4462      148.15MB    (301/0/0)     303408
  2     backup    wm       0 - 17659        8.49GB    (17660/0/0) 17801280
  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       home    wm    4463 - 17659        6.34GB    (13197/0/0) 13302576

I'm coming from a Linux background and I want to make sure I understand what I have first. The drive information above is from the 9 GB drive that came with the system. What I don't fully understand are how the /etc/mnttab, /var/run and /tmp partitions fit into the partition table and the "backup" tag which is about the size of the entire hard drive.

Would someone be willing to comment on this for me to shed a little light on how solaris partitions a drive before I continue with adding my new drive?

Are there other tools you would recommend using to examine this kind of information?

Thanks.
 
On Solaris partition 2 is traditionally the whole disk. "backup" is simply a name that was given to this partition.
 
First, use df -kh instead of df. Easier to read:))

From a partitions perspective, don't worry about mnttab and var/run. The mnttab basically shows you info about the currently mounted file systems. You can take a quick peek by catting or viewing /etc/mnttab. More important is the /etc/vfstab. This file determines what gets mounted and when. If you mess this file up, you can prevent your system from booting up properly.

When you lay out your disk partitions for a new install, you will allocate your swap space as well as your other partitions, ie /var, export/home etc. Google Solaris swap space and read up on it. It is a little too much to explain here but is worth learning how Solaris uses swap.

Hope this helps a little..

Gallows
 
I find it surprising that the majority of the disk is taken up by the /home filesystem, since the latter is not really used in Solaris as it is in other 'nixes - ie as a repository for users' home directories. Generally in Solaris /export/home is used for this purpose, but I see no emntion of it here. Did you set up the disk, or perhaps someone else with a knowledge of another unix variant?

I want to be good, is that not enough?
 
I inherited the disk which is why I want to understand what I have before I install the new disk.

There is no '-h' flag for df on sparc 5.8 :(

Do I have to format a disk on sparc using all of these partitions or can I just make a swap (1 GB) and put the rest in a single partition like I would on Linux?

I really have no need to limit the size of a particular folder like /usr or /var, etc.

Thanks.
 
You can do that - presumably you would want it to be root, /

I want to be good, is that not enough?
 
OK I have the drive formatted with a 1GB swap and the rest was all put in partition 0 using the "all free hog" option:

Code:
# df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t1d0s0    18207041       9 18024962     1%    /x/hdisk1

I have it mounted using the following /etc/vfstab entry:

Code:
#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
#
/dev/dsk/c0t1d0s0       /dev/rdsk/c0t1d0s0      /x/hdisk1       ufs     1       yes     -

The problem now may be permissions. The mount point is /x/hdisk1

Code:
# ls -l /x
drwxr-xr-x   3 root     develop      512 Nov 27 11:12 hdisk1

But when a user goes into that folder and tries to make a new directory, we get "permission denied".

I added the group for this mount point to the same group for which users are a member. Does this need to go somewhere else (like the /etc/vfstab file)?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top