>(there are other lines [fd, swap, auto_home etc] but I hope I am not
>wrong in assuming that this is the only line relevant to this
The ones you care about the are the ones that have any sort of
"/dev/dsk" entry -- those are the ones that are connected to
Quote:>The output (again partial) from
># cat /etc/vfstab
>/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -
/etc/vfstab is a better place to look. One way to look at only the
ones you care about is to do "grep '^/dev/dsk' /etc/vfstab".
Quote:>So I think whoever installed Solaris on the machine chose to use one
>single partition covering the whole disk.
That's possible, but you haven't given enough evidence for anyone
reading your article to conclude that. (Are there other filesystems in
>What I want to do is to use
>part of the disk for another filesystem. But if I was to try:
># newfs /dev/rdsk/c0d0s0
>then I guess I would be told there is already a filesystem on that
>partition (I'm scared to try in case it does something drastic)?
Good! That's a healthy fear! It would do something drastic: it would
erase every file on the filesystem!
Quote:>[incidentally, my book always uses c0d0s0 in its examples, but the
>results of my commands show c0t0d0s0; I can't find a description in my
>book of how this breaks down - why do I have a 't' and the book
SCSI disks are addressable by two different numbers per controller.
There's a target number (also called "SCSI ID") and there's also a disk
number (also called "LUN", logical unit number). So, "c0t0d0s0" can be
broken down like this:
c0 -- controller number 0 (in case you have multiple disk buses)
t0 -- SCSI target number 0 on that controller
d0 -- disk number 0 on that SCSI target
s0 -- slice number 0 on that disk
"Slice" is essentially the Solaris word for partition. Anyway, if you
have an IDE disk, there isn't a two-level addressing scheme. Each bus
can only have two devices, so all that's required is a disk number. So
whoever wrote c0d0s0 was thinking of IDE disks, probably.
>I had a look at the output of 'format' out of curiosity. I was
>surprised to get the choice of two disks (it's not my system, I
>assumed it only had one disk):
>I selected "1" and was told that the disk was formatted but I didn't
>get a warning that the current disk had mounted partitions.
In that case, there's a decent chance that the second disk is empty.
Quote:>Partition->Print displayed 8 partitions, only number 2 was not
>unassigned (it was tagged "backup").
That's a really good sign that it's empty. Slice 2 is always assigned
to the whole disk. Some people use slice 2 if they want a filesystem
that's the size of the whole disk, but it's better to create another
partition that also happens to be the whole disk and use that instead.
If I were you, I'd do this:
grep c0t1d0 /etc/vfstab /etc/mnttab
if that turns up no output, then it's pretty safe to assume that the
second disk is empty and can be used.
Quote:>(Eventually) my questions are:
>(1) If I only had the one disk, would I be able to create and mount
>the new filesystem without loss of data or re-installing?
If you only had one disk, you'd have to change the partitions around,
and in order to do that, you'd have to destroy the filesystems that are
on the disk right now. That doesn't mean you'd need to reinstall,
though: it's not too hard to put all the data in some temporary place
(even on some other machine on the network), rearrange the partitions
and filesystems on the disk, and then put the data back and make it
Quote:>(2) Given I appear to have 2 disks, can I create and mount a
>filesystem on the second disk? I'm not sure if I can do this given
>that the root filesystem is on the other disk and any new filesystem
>is, from what I can understand, a "child" of the root filesystem.
No, you can do that no problem. All filesystems are children of the
root filesystem, but not in the sense that you are thinking. The sense
that they are children is that the root filesystem is mounted at boot
time, and then other filesystems are mounted onto directories of the
mounted root filesystem by the kernel. So the connection between the
root filesystem and the others is something that exists only inside the
"mind" of the kernel.
What you need to do is go back into format, select c0t1d0, select
"partition", and then create a slice or two of the size you desire for
your new filesystem(s). The idiom is that you usually avoid using
slices 0, 1, and 2 for purposes like this (although you _could_ if you
want to). Anyway, create the entries you want, verify that everything
looks kosher with "print" (no overlapping slices, except of course
number 2, which will overlap everything), and type "label" to write the
disk label (i.e. partition table) to the disk.
Now you've created the slices, so your next task is to create slices on
them. You need to use newfs for that. If you created slices 3 and 4,
you'd do "newfs /dev/rdsk/c0t1d0s3" and "newfs /dev/rdsk/c0t1d0s4".
Then, you need to add entries to /etc/vfstab so the system knows where
to mount them. Just pattern your entries after one that already
exists, such as the one for the root filesystem. Put /var/abc before
/var/abc/log in the file. You also will want to make sure that each
entry for a given disk has a different number in the fifth field. So,
/var/abc would have "1" and /var/abc/log would have "2", for example.
You also need the sixth column to say "yes", so they are automatically
mounted at boot time.
Finally, you should be able to just type
and you should see the filesystems showing up in the output of
Hope that helps. By the way, there are some procedures for doing some
of this kind of thing at http://docs.sun.com/ . Just look in the
system administrator's guide, which is in the system administration
"I'll tell you something. Luxury disgusts me." Giorgio Armani, Jan 17, 2002
( http://dailynews.yahoo.com/h/nm/20020117/re/life_fashion_armani_dc_1.... )