Thanks for
Boguslaw Kempny
Bryan Bahnmiller
Alex_Nord_at_jabil.co
alan_at_nabeth.cxo.de
Suleyman Nazif Kutlu
Gyula Szokoly
Cliff Krieger
Harald Lundberg
Ray Bellis
Oral Mohan
Dejan Muhamedagic
-----------------------------------------------------------
My original question:
------------------------------------------------------------
> Hello Managers,
>
> We installed DU3.2c to our DEC 3000-400 which has two disks (2GB each)
>
> I saw that when I use df -k to show mounted disks, it shows that the
> disk has about 1 GB capacity on /usr. (which should be about 2 GB)
>
> I think it is because we used only partition g for /usr.
> The output of disklabel shows that there is also partition h which is now
> unallocated.
> I want to use both g and h partition for /usr.
>
> Can I specify 2 partitions (g and h) while creating a file domain?
>
> Are there any suggestions how it could be done?
>
> Thanks in advance..
>
> Here is the output when I issue disklabel -r /dev/rz3a command.
>
>
> # /dev/rrz3a:
> type: SCSI
> disk: RZ28M
> label:
> flags:
> bytes/sector: 512
> sectors/track: 99
> tracks/cylinder: 16
> sectors/cylinder: 1584
> cylinders: 2595
> sectors/unit: 4110480
> rpm: 3600
> interleave: 1
> trackskew: 0
> cylinderskew: 0
> headswitch: 0 # milliseconds
> track-to-track seek: 0 # milliseconds
>
> 8 partitions:
> # size offset fstype [fsize bsize cpg]
> a: 131072 0 ADVfs # (Cyl. 0 -82*)
> b: 401408 131072 unused 1024 8192 #(Cyl.82*- 336*)
> c: 4110480 0 unused 1024 8192 # (Cyl.0 -2594)
> d: 1191936 532480 unused 1024 8192 #(Cyl.336*- 1088*)
> e: 1191936 1724416 unused 1024 8192 #(Cyl.1088*- 1841*)
> f: 1194128 2916352 unused 1024 8192 #(Cyl.1841*- 2594*)
> g: 1787904 532480 ADVfs # (Cyl.336*-1464*)
> h: 1790096 2320384 unused 1024 8192 #(Cyl.1464*- 2594*)
---------------------------------------------------------------------
The solutions:
--------------------------------------------------------------------
> Can I specify 2 partitions (g and h) while creating a file domain?
Yes, if you have an ADVFS licence (advanced file system utilities).
The command is:
addvol /dev/rz3h usr_domain
This will work, but it's not the correct solution. What you should
do instead is to
1. bring the machine down into single user mode
2. 'vdump' the /usr partition (to an other disk or a tape drive)
2.a Verify the backup
2.b Verify the backup
2.c Verify the backup
2.d Verify the backup
2.e Verify the backup
3. run /sbin/bcheckrc (this will mount every partition R/W)
4. edit the disklabel (set the EDITOR environment variable first, or
practice
'vi' -- default if available).
5. Create a 'f' partition, which covers *both* g and h
f: 3578000 2320384 unused 1024 8192 # (Cyl. 1841*-2594*)
6. Dismount /usr
7. Remove usr_domain#usr file set (rmfset)
8. Remove usr_domain file domain (rmfdmn)
9. If you don't have ADVFS license, just blast away /etc/fdmns/usr_domain
(or rename it to be safe). In this case step 7-8 is not needed (and
without the license can't be done).
10. Create a new usr_domain file domain (mkfdmn /dev/rz3f usr_domain)
11. Create a file set in the domain (mkfset usr_domain usr)
12. Mount it (mount /usr)
13. Restore /usr
14. Reboot
Gyula
Sorry, I thing I forgot to specify the correct 'f' partition in my
previous
e-mail. Set the offset to the offset of the first of g and h (in your
case g is the first, so the offset is 532480) and the size to the combined
size of g and h (1787904+1790096).
You have to use a new partition because you need 'vi' to edit the
partition table, which resides in /usr, hence it has to be mounted. You
can't edit an active partition (in your case 'g'). You can edit 'h',
but it's easier to use a new one (so you can see the two old partition).
Gyula
--------------------------------------------------------------------
>
> Can I specify 2 partitions (g and h) while creating a file domain?
Yes, you can, issuing command 'addvol', but you need POLYCENTER Advanced
File System Utilites licence.
>
The second method is to edit label of the disk:
disklabel -e [-r] disk
to move the boundary of 'g' partition to end of the disk:
a: 131072 0 ADVfs # (Cyl. 0 -82*)
b: 401408 131072 unused 1024 8192 # (Cyl.82*-336*)
c: 4110480 0 unused 1024 8192 # (Cyl. 0-2594)
d: 1191936 532480 unused 1024 8192 # (Cyl.336*-1088*)
e: 1191936 1724416 unused 1024 8192 # (Cyl.1088*-1841*)
f: 1194128 2916352 unused 1024 8192 # (Cyl.1841*-2594*)
g: 3578000 532480 ADVfs #(Cyl.336*- 1464*)
h: 1790096 2320384 unused 1024 8192 # (Cyl.1464*-2594*)
Regards
Boguslaw Kempny
-----------------------------------------------------------------------------
The simplest solution may be to create a new disk label that combines the
g and
h partitions. Edit the /etc/disktab file, and copy the rz28m entry to
something
new (like rz28m1).
For example:
rz28m|RZ28M|DEC RZ28M Winchester:\
:ty=winchester:dt=SCSI:ns#99:nt#16:nc#2595:\
:oa#0:pa#131072:ba#8192:fa#1024:\
:ob#131072:pb#401408:bb#8192:fb#1024:\
:oc#0:pc#4110480:bc#8192:fc#1024:\
:od#532480:pd#1191936:bd#8192:fd#1024:\
:oe#1724416:pe#1191936:be#8192:fe#1024:\
:of#2916352:pf#1194128:bf#8192:ff#1024:\
:og#532480:pg#1787904:bg#8192:fg#1024:\
:oh#2320384:ph#1790096:bh#8192:fh#1024:
rz28m1|RZ28M1|DEC RZ28M1 Winchester:\
:ty=winchester:dt=SCSI:ns#99:nt#16:nc#2595:\
:oa#0:pa#131072:ba#8192:fa#1024:\
:ob#131072:pb#401408:bb#8192:fb#1024:\
:oc#0:pc#4110480:bc#8192:fc#1024:\
:od#532480:pd#1191936:bd#8192:fd#1024:\
:oe#1724416:pe#1191936:be#8192:fe#1024:\
:of#2916352:pf#1194128:bf#8192:ff#1024:\
:og#532480:pg#3578000:bg#8192:fg#1024:
Then use vdump to dump the partition you are going to write over, but preferably
the whole disk to be safe. Then do a "disklabel -z /dev/rz3a" to overwrite
the disklabel on the disk, then a "disklabel -rw /dev/rz3a rz28m1" to
write the new label.
However, if this is the boot disk this won't work. You'll have to follow
the instructions in the DU 3.2 installation manual. You have to start the
install process, then edit the disklabel using the "disklabel -e" command.
Unfortunately this will use the "ed" editor, and this process is very
painful. You could still use the above info to do this.
Good luck.
Bryan
------------------------------------------------------------------------------
Actually, df(1) shows mount disk *partitions*, not necessarily
disks. Using just the partition table you can have up to
7 file systems on a single disk. In your case you appear to
have an AdvFS on the A partition and one on G (/usr I assume).
You should check that B isn't being used for page/swap space.
Some older versions didn't write anything in the fstype field
when a partition was used for page/swap. It could be very
bad to start using that space for a file system if it is also
used for page/swap.
When a domain is created only a single device can be specified.
If you have the AdvFS Utilities, you can use addvol to add
additional volumes later. So you could add the H space to the
/usr domain with addvol, but I think you'd be better off
backing the data up, repartition to have G use all the space,
recreate the domain, and restore the data.
Alternatively, if you have a space partition large enough and
the utilities, add the partition to the volume and then remove
the original. This will cause all the data to migrate to the
new partition. Repartition the old G/H pair to make one large
partition and then add it to the domain. Remove the temporary
partition and the data will migrate back.
There are other options for arranging the space, but has mostly
to do with spliting up /usr. A common split is to put /usr/var
into its own file system and mount it under /var. This moves
all the read/write parts of /usr to their own file system, leaving
/usr read-mostly. The H partition is probably big for that, so
you'd want to repartition anyway.
alan_at_nabeth.cxo.dec.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AKiLE SAHiN EgeNET Network &
akile_at_bornova.ege.edu.tr UNIX System Administrator
http://bornova.ege.edu.tr/~akile Ege University Computer Center
+90 232 3881080x249 35020 Bornova, Izmir - TURKEY
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Received on Thu Feb 27 1997 - 11:18:51 NZDT