solaris new partitions

I need to setup a second disk I have on a solaris 9 box for my apps and logs.
Ok, I thought I had this but guess I don't. Below is what my 2nd disk looks like now that I've played with it. what I want to do here is use:
#1 for more swap
#6 for apps
#7 for logs/archives and backups

doesn't seem right, how do I give it the names that I want, like /opt /backup /logs
do I do that after I run the newfs on each one, not sure here, never actuall created this and just not sure what the next steps are.

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

Part      Tag    Flag     Cylinders        Size            Blocks
  0 unassigned    wm       0               0         (0/0/0)           0
  1 unassigned    wm    6677 - 7504        1.86GB    (828/0/0)   3901536
  2     backup    wm       0 - 7505       16.86GB    (7506/0/0) 35368272
  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 - 3560        8.00GB    (3561/0/0) 16779432
  7 unassigned    wm    3561 - 6676        7.00GB    (3116/0/0) 14682592
bt707Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CadburyKatCommented:
Hello,

This is how I would setup a disk through Solstice Volume manager (I run Solaris 10).  In this example I will use format to figure out which disk I am referencing.  Your results will be different.

localhost>format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
       0. c0t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@1d,700000/scsi@4/sd@0,0

In this case I am referencing disk c0t0d0.  The slice in your example is s6 or s7 with some left over space in s1 for swap.  (You should not reference s2 here).

You then need to newfs the slice and mount it.

the commands you need are:

newfs /dev/dsk/c0t0d0s1
newfs /dev/dsk/c0t0d0s6
newfs /dev/dsk/c0t0d0s7

You then need to add these slices with entries in your /etc/vfstab

Here is an example:

/dev/dsk/c0t0d0s1  -       -       swap    -       no      -
/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /apps ufs 3 yes -
/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /logs/archives ufs 3 yes -

Ensure that the mountpoints /apps and /logs/archives exist and then issue the command:

mount /apps
mount /logs/archives

verify success with command:

df -k

Enable the swap by issueing the command:

swap -a /dev/dsk/c0t0d0s1

verify additional swap with command:

swap -l


Good Luck.

p.s.  I would look into using Solstice Volume manager to mirror your disks.  Some commands of interest are metainit, metadb, and metastat.  They should be documented in the man pages.
0
bt707Author Commented:
I created a swap for #1 -- /opt for #6 -- and /backup for #7

the swap and /opt is working fine, however I'm getting a error when doing a mount on /backup

bash-2.05$ sudo mount /backup
mount: mount-point /backup does not exist

did the newfs, did not show any errors?


newfs /dev/dsk/c0t1d0s7
newfs: construct a new file system /dev/rdsk/c0t1d0s7: (y/n)? yes
/dev/rdsk/c0t1d0s7:     14682592 sectors in 3116 cylinders of 19 tracks, 248 sectors
        7169.2MB in 142 cyl groups (22 c/g, 50.62MB/g, 6208 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 103952, 207872, 311792, 415712, 519632, 623552, 727472, 831392, 935312,
 13684704, 13788624, 13892544, 13996464, 14100384, 14204304, 14308224,
 14412144, 14516064, 14619984,


/opt is showing up and is mounted


Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t0d0s0    1985043  338290 1587202    18%    /
/dev/dsk/c0t0d0s3    3009327 1540553 1408588    53%    /usr
/proc                      0       0       0     0%    /proc
mnttab                     0       0       0     0%    /etc/mnttab
fd                         0       0       0     0%    /dev/fd
/dev/dsk/c0t0d0s4    4032142  138656 3853165     4%    /var
swap                 8216432      48 8216384     1%    /var/run
swap                 8216432      48 8216384     1%    /tmp
/dev/dsk/c0t0d0s5    3799710 1085865 2675848    29%    /home
/vol/dev/dsk/c0t6d0/sol_9_904_sparc/s5
                         114       4     100     4%    /cdrom/sol_9_904_sparc/s5
/vol/dev/dsk/c0t6d0/sol_9_904_sparc/s4
                         114       4     100     4%    /cdrom/sol_9_904_sparc/s4
/vol/dev/dsk/c0t6d0/sol_9_904_sparc/s3
                         114       4     100     4%    /cdrom/sol_9_904_sparc/s3
/vol/dev/dsk/c0t6d0/sol_9_904_sparc/s2
                         114       4     100     4%    /cdrom/sol_9_904_sparc/s2
/vol/dev/dsk/c0t6d0/sol_9_904_sparc/s1
                      555754  514128       0   100%    /cdrom/sol_9_904_sparc/s1
/vol/dev/dsk/c0t6d0/sol_9_904_sparc/s0
                     3481568 3481568       0   100%    /cdrom/sol_9_904_sparc/s0
/dev/dsk/c0t1d0s6    8261393    8217 8170563     1%    /opt


Current partition table (original):
Total disk cylinders available: 7506 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders        Size            Blocks
  0 unassigned    wm       0               0         (0/0/0)           0
  1 unassigned    wm    6677 - 7504        1.86GB    (828/0/0)   3901536
  2     backup    wm       0 - 7505       16.86GB    (7506/0/0) 35368272
  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 - 3560        8.00GB    (3561/0/0) 16779432
  7 unassigned    wm    3561 - 6676        7.00GB    (3116/0/0) 14682592


swap shows up as ok

bash-2.05$ swap -l
swapfile             dev  swaplo blocks   free
/dev/dsk/c0t0d0s1   32,1      16 9216656 9216656
/dev/dsk/c0t1d0s1   32,9      16 3901520 3901520


This is what I have in the /etc/vfstab

#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
#
fd      -       /dev/fd fd      -       no      -
/proc   -       /proc   proc    -       no      -
/dev/dsk/c0t0d0s1       -       -       swap    -       no      -
/dev/dsk/c0t0d0s0       /dev/rdsk/c0t0d0s0      /       ufs     1       no      -
/dev/dsk/c0t0d0s3       /dev/rdsk/c0t0d0s3      /usr    ufs     1       no      -
/dev/dsk/c0t0d0s4       /dev/rdsk/c0t0d0s4      /var    ufs     1       no      -
/dev/dsk/c0t0d0s5       /dev/rdsk/c0t0d0s5      /home   ufs     2       yes     -
swap    -       /tmp    tmpfs   -       yes     -
/dev/dsk/c0t1d0s1       -       -       swap    -       no      -
/dev/dsk/c0t1d0s6       /dev/rdsk/c0t1d0s6      /opt    ufs     3       yes     -
/dev/dsk/c0t1d0s7       /dev/rdsk/c0t1d0s7      /backup         ufs     3       yes     -


any ideas on the errors on /backup?

Thanks,

0
CadburyKatCommented:
does the mount point /backup exist?  You can tell by issueing the following:

cd /
ls -al | grep backup

If it does not exist, you can make the mount point via:
mkdir /backup

If you did not make the previous mount point you mounted over data.  That is probably not what you wanted to do with respect to /opt

You may need to unmount /opt, tar it up, remove the data in /opt, remount it, and untar the existing data.  

0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

bt707Author Commented:

CadburyKat, I think I had it all ok was just a bit confused about a few things, thanks for
the help, the info you gave me helped to understand more here.



One thing I still cannot get right or understand is now that I have /opt and /backup mounted on
the second Disk "c0t1d0*" what do I need to do for the /opt and /backup to show up when I go into
partion from format. I've tried to give the Tag a name but it just gives me errors saying what ever I
put in was not expected.

Disk one and two showing what I setup and is all ok.



Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c0t0d0s0      1.9G   330M   1.5G    18%    /
/dev/dsk/c0t0d0s3      2.9G   1.5G   1.3G    53%    /usr
/proc                    0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
fd                       0K     0K     0K     0%    /dev/fd
/dev/dsk/c0t0d0s4      3.8G   135M   3.7G     4%    /var
swap                   7.9G    40K   7.9G     1%    /var/run
swap                   7.9G    48K   7.9G     1%    /tmp
/dev/dsk/c0t0d0s5      3.6G   1.0G   2.6G    29%    /home
/dev/dsk/c0t1d0s7      6.9G   7.0M   6.8G     1%    /backup
/dev/dsk/c0t1d0s6      7.9G   8.0M   7.8G     1%    /opt


________________________________________________________________________

*******************************************************************

question here is how do I get the correct names in the Tag (i.e #1 swap #6 /opt #7 /backup)

*******************************************************************


AVAILABLE DISK SELECTIONS:
       0. c0t0d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /pci@1f,4000/scsi@3/sd@0,0
       1. c0t1d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /pci@1f,4000/scsi@3/sd@1,0
Specify disk (enter its number): 1
selecting c0t1d0
[disk formatted]
Warning: Current Disk has mounted partitions.

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

Part      Tag    Flag     Cylinders        Size            Blocks
  0 unassigned    wm       0               0         (0/0/0)           0
  1 unassigned    wm    6677 - 7504        1.86GB    (828/0/0)   3901536
  2     backup    wm       0 - 7505       16.86GB    (7506/0/0) 35368272
  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 - 3560        8.00GB    (3561/0/0) 16779432
  7 unassigned    wm    3561 - 6676        7.00GB    (3116/0/0) 14682592


Thanks,
0
XoFCommented:
you cannot see mountpoints in format-output. the tags you can assign within format are kind of historical nature and do not have any impact on where the slice actually will be mounted - mountpoints are only determined by /etc/vfstab. Leaving the tag "unassigned" isn't the worst choice at all.

Regards,
-XoF-
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bt707Author Commented:
Thanks to both for the info, didn't really understand it like I thought I did but see it much better now.

Thanks again
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.