tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Summary : Adding second HD - from physical disk to filesystems.
@ 1998-07-15 14:39 chas
  0 siblings, 0 replies; only message in thread
From: chas @ 1998-07-15 14:39 UTC (permalink / raw)
  To: tru64-unix-managers

A most sincere thank you to Michael Richter, Girish Phadke, 
George Guethlein, Dr. Tom Blinn & Jean-Loup Risler for the 
help and replies, especially those written in a neophyte-friendly
manner which I really appreciated :)
Not only did this help me accomplish the desired task but 
more importantly, finally understand what was happening
a lot better than before. 

Summary : 

1) In my initial configuration, I should have used 
   # disklabel -w -r rz6 ST32151N
   since ST32151N is the disk model number

2) I converted the one large partition on the second disk
   to the desired 300 MB swap space and one data partition
   as follows :
       # /sbin/umount /disk2

   	# disklabel -z rz6

   	# disklabel -w -r rz6 ST32151N

	# disklabel -e /dev/rrz6c
	(Edited the disk label partition info as follows :
	       size   offset    fstype   [fsize bsize   cpg]
  	a:  3579015        0    unused        0     0        
  	b:   614400  3579015    unused        0     0      
  	c:  4193415        0    unused        0     0     
  	d:        0        0    unused        0     0      
  	e:        0        0    unused        0     0     
  	f:        0        0    unused        0     0       
  	g:  1900099   393216    unused        0     0    
  	h:  1900100  2293315    unused        0     0  

	# newfs /dev/rrz6a

	Added the following to /etc/fstab :
	/dev/rz6a	/disk2	ufs rw 1 2
	/dev/rz6b	swap2	ufs sw 0 2

	# mount /disk2

	# swapon -a

3) From Jean-Loup Risler :
   WARNING: do not put a swap partition onto the "a" partition
   since it could erase the label.
   Put your large partition onto "a" and the swap onto "b"
   
   I actually found that my new label refused to write when the 'a'
   was the smaller partition so this tip also helped.

4) Another caveat : MAKE CERTAIN THE DISK PARTITIONS DO NOT OVERLAP

5) There is also a GUI diskconfig tool but this app fails to 
   start up on my machine, spewing error messsages everywhere.
   
For completeness (and b/c they explain this better than I could hope to)
I attach the replies from that helped. Again, most sincere thanks and
my apologies for this tome of a summary... I just hope it helps others
in the future.

chas

-----------------------------------------------------------------------
From: Jean-Loup Risler <risler@genetique.uvsq.fr>

> But I really would like to have one large file system on this 
> second disk as opposed to splitting the usable section between
> /dev/rz6a and /dev/rz6c. Is it possible to just split this new
> disk into one small 300 MB swap partition and assign the rest 
> to one partition ?

1) Yes, you can split easily your disk into two filesystems with:

disklabel -e -r /dev/rrz6

2) WARNING: do not put a swap partition onto the "a" partition
   since it could erase the label.

   Put your large partition onto "a" and the swap onto "b"

Cheers,

Jean-Loup

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

From: Michael Richter <richter@chemie.uni-hamburg.de>

use the GUI Diskconfig Utility. 

First step:

Backup all of your Data on the new Disk. Then delete the disklabel of the
new disk.

Second Step:

Start diskconfig and configure your new disk.

bye,

Michael Richter


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

From: Girish Phadke <pgirish@binariang.maxisnet.com.my>

hello
yes that is not problem it is not mandatory to use secondary swap as rz6b.
  use disklabel -e and modify for one continues and  rest for 300mb  of b.
What you have modify is size of a 
 offset of a =0  s
offset of b=size of a partition
then write the new disklabel.

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

From: George Guethlein <GGuethlein@GiantOfMaryland.com>

YES, you can make your disk layout in two useable pieces
like you want.  Just do the following :

1.)  Remove the filesystem you created (and swap space ?)
2.)  May want to comment out any /etc/fstab changes too
3.)  Run the disklabel command again, just to be sure
4.)  "disklabel -r rz6  >  rz6_label.out"
5.)  "disklabel -e rz6"
6.)  Change the size of the a partition to be 614400
      (The # of 512-byte sectors, which equals 300MB)
7.)  Change the offset of the c partition to 614400
      (c will start right after a, to the end of the disk)
8.)  Reduce the size of the c partition to account for the
      space that was removed and added to the a partition
      (ie. the size of a + c = What c was before you started)
9.)  Change size & offset of b partition to 0 (zero)
      (just ensure it can't be used later & mess up a and c)
10.) Re-create your filesystem and swap space
11.) Re-add the changes to /etc/fstab.

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

From: "Dr. Tom Blinn, 603-884-0646" <tpb@zk3.dec.com>
X-Mts: smtp

> duck vmunix: rz0 at scsi0 target 0 lun 0 (LID=0) (QUANTUM FIREBA
> LL_TM2110S 300N)
> duck vmunix: tz4 at scsi0 target 4 lun 0 (LID=1) (WangDAT Model
> 3400DX     125F)
> Jul 15 23:39:02 duck vmunix: rz6 at scsi0 target 6 lun 0 (LID=2)
> (SEAGATE ST32151N         0328)
> 
> I then did the following to create the filesystem on the disk :
> 
> 1) created the special device files for the disk :
>    # cd /dev
>    # ./MAKEDEV rz6
>    MAKEDEV: special file(s) for rz6:
> 
> 2) placed a label on the disk :
>    # disklabel -w -r rz6 SWXCR
>    # disklabel -e rz6
>   (I guess this uses the SCSI controller to automatically work out
>   the disktab data for the seagate HD.)

You should not have used "SWXCR" as the disk name string, but as long as you
don't have a "SWXCR" entry in your /etc/disktab, it's just an arbitrary name
and the software will do the right thing.  What you should have used is this
command:

	# disklabel -z rz6
	# disklable -w -r rz6 ST32151N

since ST32151N is the disk model number.  That's the convention to use.
 
> 3) created a new file system :
>    # newfs /dev/rrz6c
> 
> 4) mount the file system :
>    # mkdir /disk2
>    # /sbin/mount /dev/rz6c /disk2
> 
>    Now, this works as df shows :
>    # df -k
>    Filesystem  1024-blocks        Used   Available Capacity  Mounted on
>    /dev/rz0a         63335       35593       21408    63%    /
>    /proc                 0           0           0   100%    /proc
>    /dev/rz0g        901949      761687       50067    94%    /usr
>    /dev/rz6c       2030059           1     1827052     1%    /disk2
> 
> 5) Add the File system to /etc/fstab :
>    /dev/rz0a        /      ufs rw 1 1
>    /proc            /proc  procfs rw 0 0
>    /dev/rz0g        /usr   ufs rw 1 2
>    /dev/rz0b        swap1  ufs sw 0 2
>    /dev/rz6c        /disk2 ufs rw 1 3
> 
> So, it appears to work OK but I'm surprised at how little trouble
> this was ... which makes me suspect I've screwed up somewhere.
> 
> Also :
> I think I should have added more swap space instead of assigning
> the whole disk to data. So, I think I could recreate the filesystems
> on this new HD by doing :
>    # newfs /dev/rrz6a
>    # newfs /dev/rrz6b
>    # newfs /dev/rrz6g
> 
> And in /etc/fstab :
>    /dev/rz6a 		/disk2b
>    /dev/rz6b 		swap2
>    /dev/rz6g		/disk2a
> 
> But I really would like to have one large file system on this
> second disk as opposed to splitting the usable section between
> /dev/rz6a and /dev/rz6c. Is it possible to just split this new
> disk into one small 300 MB swap partition and assign the rest
> to one partition ?
> 
> Sorry - I'm making this more complicated than it really is perhaps.
> 
> Thank you,
> 
> chas

OK, as I noted above, put a new label on your rz6 disk (wipe out what's
there).  Obviously, you have to unmount it first:

	# /sbin/umount /disk2
	# disklabel -z rz6
	# disklabel -w -r rz6 ST32151N

and then edit the disklabel to split the disk between a swap partition and
a data partition; for instance if you want the swap to be the default size
but you want a large data partition also, then change the "a" partition to
be at the start of the disk and be everything except the size of the "b",
and move the "b" to begin after the new "a" (that is, the start of "b" will
be the size of "a", and the size of "a" will be the size of the disk minus
the size of the "b" partition).

	# disklabel -e /dev/rrz6c

then do the editing, save the label with the appropriate changes.

If that won't save the label (because you've changed the size of "a"), then
you can use the trick of saving the label to a file, editing the file, and
then restoring the label to the disk; see the disklabel reference page for
hints on doing this.  Also, you can mark the swap partition for swap when
you edit the label, but don't mark the data partition as used or the newfs
will complain later on (if you've got current software).

Now make a new file system in the "a" partition but do nothing to the "b":

	# newfs /dev/rrz6a

and in /etc/fstab

	/dev/rz6a	/disk2	ufs rw 1 2
	/dev/rz6b	swap2	ufs sw 0 2

both with the appropriate flags, etc (see the reference pages or mimic what
is on a similar line).

Then you should be able to just

	# mount /disk2
	# swapon -a

and have swapping start on the new partition.

MAKE CERTAIN THE DISK PARTITIONS DO NOT OVERLAP.

Tom

============== original question : =========================

This morning I added an extra HD and a tape drive
to my DEC 200, running DU 4.0 b.
I was very happy to see that the peripherals were
automatically detected. Startup messages were :

duck vmunix: rz0 at scsi0 target 0 lun 0 (LID=0) (QUANTUM FIREBA
LL_TM2110S 300N)
duck vmunix: tz4 at scsi0 target 4 lun 0 (LID=1) (WangDAT Model
3400DX     125F)
Jul 15 23:39:02 duck vmunix: rz6 at scsi0 target 6 lun 0 (LID=2) 
(SEAGATE ST32151N         0328)


I then did the following to create the filesystem on the disk :

1) created the special device files for the disk :
   # cd /dev 
   # ./MAKEDEV rz6
   MAKEDEV: special file(s) for rz6: 

2) placed a label on the disk :
   # disklabel -w -r rz6 SWXCR
   # disklabel -e rz6
  (I guess this uses the SCSI controller to automatically work out
  the disktab data for the seagate HD.)

3) created a new file system :
   # newfs /dev/rrz6c 

4) mount the file system :
   # mkdir /disk2
   # /sbin/mount /dev/rz6c /disk2

   Now, this works as df shows :
   # df -k
   Filesystem  1024-blocks        Used   Available Capacity  Mounted on
   /dev/rz0a         63335       35593       21408    63%    /
   /proc                 0           0           0   100%    /proc
   /dev/rz0g        901949      761687       50067    94%    /usr
   /dev/rz6c       2030059           1     1827052     1%    /disk2

5) Add the File system to /etc/fstab :
   /dev/rz0a        /      ufs rw 1 1
   /proc            /proc  procfs rw 0 0
   /dev/rz0g        /usr   ufs rw 1 2
   /dev/rz0b        swap1  ufs sw 0 2
   /dev/rz6c        /disk2 ufs rw 1 3
   
So, it appears to work OK but I'm surprised at how little trouble
this was ... which makes me suspect I've screwed up somewhere.

Also :
I think I should have added more swap space instead of assigning
the whole disk to data. So, I think I could recreate the filesystems 
on this new HD by doing :
   # newfs /dev/rrz6a
   # newfs /dev/rrz6b
   # newfs /dev/rrz6g
   
And in /etc/fstab :   
   /dev/rz6a 		/disk2b
   /dev/rz6b 		swap2
   /dev/rz6g		/disk2a

But I really would like to have one large file system on this 
second disk as opposed to splitting the usable section between
/dev/rz6a and /dev/rz6c. Is it possible to just split this new
disk into one small 300 MB swap partition and assign the rest 
to one partition ?

Sorry - I'm making this more complicated than it really is perhaps.

Thank you,

chas

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-07-15 14:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-07-15 14:39 Summary : Adding second HD - from physical disk to filesystems chas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox