I knew you alphists are too clever !
I received the answers about my question about the way to enlarge the /
filesystem. And they (of course) work!
I use only AdvFS , but I guess using UFS is similar.
Having an empty a partition on a disk (rz1) which is not the normal
booted one (rz0) , I used it to make an alternative boot.
Another suggested way is to boot from CD but I did'nt try.
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
Thanks to Alan Rollow , Charles Vachon , Lars Bro and Steve VanDevender .
Long life to alpha-osf-managers_at_ornl.gov !!
Emanuele
Emanuele Lombardi
mail: AMB-GEM-CLIM ENEA Casaccia
I-00060 S.M. di Galeria (RM)
ITALY
mailto:lele_at_mantegna.casaccia.enea.it
tel +39 6 30483366
fax +39 6 30483591
Here follows the step by step log of what I did and that for sure works:
1) Make an alternate bootable disk (rz1a)
mkfdmn -r /dev/rz1a root2_domain
mkfset root2_domain root
mount root2_domain#root /mnt
clonefset root_domain root root_clone
mount root_domain#root_clone /clone
vdump 0f - /clone | vrestore -xf - -D /mnt
umount /clone
rmfset root_domain root_clone
rmdir /clone
--edit of /mnt/etc/fstab so that:
a) the / filesystem is no more root_domain#root but
root2_domain#root
b) eliminating rz0b from swap device.
2) shutdown e reboot using the alternate disk
shutdown -h now
>>> boot dka1
3) delete old root_domain
rmfset root_domain root
rmfdmn root_domain
4) modify rz0 disklabel
disklabel rz0 > disklabl.rz0
cp disklabel.rz0 disklabel.rz0.new
--edit disklabel.rz0.new so that the a and b partitions limits are
as wanted. Check that size+offset of partition b is the same as
in the original disklabel. This ensures that other partitions are
left untouched.
disklabel -R rz0 disklabel.rz0.new
5) re-make the normal bootable disk (rz0a)
mkfdmn -r /dev/rz0a root_domain
mkfset root_domain root
mount root_domain#root /mnt
mkdir /clone
clonefset root2_domain root root_clone
mount root2_domain#root_clone /clone
vdump 0f - /clone | vrestore -xf - -D /mnt
umount /clone
rmfset root2_domain root_clone
rmdir /clone
--edit of /mnt/etc/fstab so that the / filesystem is back
root_domain#root and rz0b is again used as swap
6) shutdown e reboot using the enlarged normal disk
shutdown -h now
>>> boot dka0
Here follow the answers I got from my question:
----------------------------------------------------------------------------------
alan_at_nabeth.cxo.dec.com:
re: #2
You can't change the size or offset of an open partition. Having
the running root file system and primary page/swap space counts
as open.
re: #1
Yes, but. Enlarging the partition won't change how much space the
file system will try to use. Neither AdvFS nor UFS have any support
for growing into the additional space created by what you're doing.
So, you have to backup the partition, repartition, recreate the
file system and restore.
re: 99% full and reducing the page/swap space.
While you can reduce the size of the page/swap space, this will
limit the amount of virtual memory the system can use. While
you probably don't think you have a problem now, take a close
look at virtual memory to see if you'll have a problem after the
change. With the disks so full, you might want to consider
that you simply need more disk space.
----------------------------------------------------------------------------------
Charles Vachon <cvachon_at_mrn.gouv.qc.ca>:
1) Can I enlarge the a partition taking a piece of the b one without
> destroying data in all the other partitions?
Yes, this can be done. I would suggest that you boot DU from the
installation CD before modifying the partitions on the disk holding the
root filesystem. You will have to create devices entries in /dev to access
your physical disks (i.e. /dev/MAKEDEV rz, re or whatever). Then, you will
be able to manually edit the disklabel using disklabel -e. Simply make sure
that your redefined partition(s) do not overlap with any partition you
intend to keep. Remember also, you have to backup stuff residing in the
root partition before trying to enlarge it, and restore it later to the
enlarged partition. Data on the a partition WILL BE LOST when you redefine
it's size with disklabel. This is why it is nice to boot off a CD before
doing this.
Finally, since this is a bootable filesystem, you will have to specify a
boot block type using disklabel -t ufs or -t advfs to the a or c partition
of your boot disk.
>
>2) do you think I can enlarge the a partition (booted /) reducing
> the b partition while the system is running and swapping on the
> b partition of the same disk?
In my understanding of Unix, this is not possible.
---------------------------------------------------------------------------------
Lars Bro (lbro_at_dscc.dk):
Hi,
You will need to boot from the other boot partition, then relabel the
first disk. The partitions c,d,e,f,g,h should not be affected but you
will have to make a backup of the a partition, then create a new
filestystem that has the right size and finally restore the backup.
Sorry to say, there is no easy way to do this.
----------------------------------------------------------------------------------
Steve VanDevender <stevev_at_hexadecimal.uoregon.edu>:
> 1) Can I enlarge the a partition taking a piece of the b one without
> destroying data in all the other partitions?
Yes, just change the size of the a partition and the offset and
size of the b partition without changing the others. Also check
carefully to make sure the new partitions don't overlap.
> 2) do you think I can enlarge the a partition (booted /) reducing
> the b partition while the system is running and swapping on the
> b partition of the same disk?
Absolutely not. In fact, to accomplish this you'll have to boot
off the operating system CD or another partition, back up the A
partition, repartition and newfs the A partition, and then
restore it from the backup.
Received on Wed Jun 03 1998 - 10:09:23 NZST