SUMMARY: Pros & Cons of mounting entire disk & slice !

From: Sridhar M (sridhar@blr.hl.siemens.de)
Date: Thu Feb 04 1999 - 04:19:50 CST


Hi!

Thanx for all those who took time to respond.

Special Thanx to
Raymond Wong <negativl@netcom.com>
Dieter Gobbers
Stephen

General consenses was that it is not harmful to mount the entire disk &
a slice as the entire disk(slice 2 will be mounted starting from
first block to ending block - in my case it has mounted the root
partition - 2Gb). The system is working fine as of now.
The disk was partitioned was indeed partitioned for 2+2+4 Gb.
Most of them strongly recommended that I should change the entry in the
vfstab file and remount the partitions(which is obvisiouly the next
step).
---------------------------------------
My Original Question was:

Hi!

I have a typical question regarding mount!

root: format

Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 - 1199 2.05GB (1200/0/0) 4309200
1 unassigned wm 1200 - 2399 2.05GB (1200/0/0) 4309200
2 backup wm 0 - 4923 8.43GB (4924/0/0) 17682084
3 unassigned wm 2400 - 4923 4.32GB (2524/0/0) 9063684
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 0 0 (0/0/0) 0

/etc/vfatab entry shows ......

/dev/dsk/c0t1d0s1 /dev/rdsk/c0t1d0s1 /var/mail ufs 2 yes -
/dev/dsk/c0t1d0s2 /dev/rdsk/c0t1d0s2 /home2 ufs 2 yes -
/dev/dsk/c0t1d0s3 /dev/rdsk/c0t1d0s3 /pool6 ufs 2 yes -

root:prtvtoc /dev/c0t1d0s0 ....

* /dev/dsk/c0t1d0s0 partition map
*
* Dimensions:
* 512 bytes/sector
* 133 sectors/track
* 27 tracks/cylinder
* 3591 sectors/cylinder
* 4926 cylinders
* 4924 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
       0 0 00 0 4309200 4309199
       1 0 00 4309200 4309200 8618399 /var/mail
       2 5 00 0 17682084 17682083 /home2
       3 0 00 8618400 9063684 17682083 /pool6

root: df -k ......

Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t1d0s1 2026782 153062 1812919 8% /var/mail
/dev/dsk/c0t1d0s2 2026782 1600772 405743 80% /home2
/dev/dsk/c0t1d0s3 4262591 4163851 56115 99% /pool6
-------------------------------------

Here are the responses that I got...

----------------------------------------
Raymond Wong <negativl@netcom.com>

Actually, if you check, you'll notice that s2 is really s0 as mounted.
It's poor form, but until somoene tries to newfs (or maybe tunefs) the
system nothing will happen. s2 should always be the whole disk, but
if you just try and mount it you'll get whatever slice happens to start
at cylinder 0. If you want to make things show as they really are,
replace
s2 with s0 in the vfstab and reboot.

--------------------------------
df gets the partition sizes from some information in the partitions, not from
the disklabel which holds the information of the disk slices. Slice 2 of
a disk
under SunOS is the "backup volume" which spawns the entire disk. As
slice
starts at block 0 (same as your slice 0) you get the root partition if
you
mount the filesystem in slice 2. And you root partition is 2 GB => df
shows you
2 GB for /home which is indeed the root partition...

Dieter Gobbers
Systemadministrator UNIX and VM/SP

------------------------------

it appears tht the filesystems were made using the correct devices,
thus the object that starts at cylinder 0 is the 2G filesystem that
was built on the cylinders specified by slice 0. This will work,
but it is a bit confusing. I recommend fixing vfstab, then remount.
Note that the only error is that the filesystem on slice 0 is being
specified by slice 2. Just change the vfstab line for slice 2 to
point to slice 0.

-- 
Regards,
Stephen

-----------------------------

I don't know if you've got anything actually reading or writing to these partitions, but I can't believe that you have anything useful or reliable anywhere on that disk. Slice 2 is set up to refer to the whole of the disk, and slices 0,1 and 3 are set up as partitions within that disk. You should alter your vfstab immediately, if anything is written to /home2 as it stands, you will risk corruption of slices 0,1 and 3. I would not trust anything in any of the partitions on this disk, you should resolve your conflicts in the partition tables & vfstab and then restore these partitions from a known good backup. If you don't have a backup, then pray, and do the following:

umount /var/mail umount /home2 umount /pool6 fsck /var/mail fsck /pool6 fsck /dev/rdsk/c0t1d0s0

keep on fscking until you get clear runs on each of the filesystems (but don't fsck /dev/rdsk/c0t1d0s2 or /home2)

n.b. there's nothing specifically wrong with using slice 2 in Solaris any more - it's only the older BSD versions of UNIX that *require* slice 2 (or slice c, as it used to be known for 'Complete') to be present. You can never be quite sure though. I have heard from lots of people who use this slice without too many problems though. Personally, I leave it at the default setting, but I'm superstitious.

good luck Justin.

----------------------------------

It *will* break horribly. df -k reports the info from the superblock, which in each case will be at:

s1- start of cylinder 1200 s2- start of cylinder 0 s3- start of cylinder 2400

so they haven't managed to corrupt each other yet, but it's only a matter of time with that kind of overlapping.

Dunno why you only got 2GB for the s2 partition, but it sure needs fixing. Somebody may have tried to limit how large the FS was when made to avoid the overlap...

l & h, kev

----------------------------------- with regards.

Sridhar M Engineer - Systems ------------------------------------------------------------------ Siemens Semiconductor Ltd. 10th Floor, Discovere Bldg, WhiteField Road, Tel:91-80-8410017/16 Bangalore - 560 066. Fax:91-80-8410012

------------------------------------------------------------------



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:15 CDT