System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Can I expand root easily on this disk?

R Swenson
Frequent Advisor

Can I expand root easily on this disk?

I have a 4.3 GB disk that needs much more room on root. Using DISKCONFIG, I found that there are 3 partitions in use on this disk as follows:

a = root (128MB, root_domain)
b = swap (2GB)
g = usr patchkit (2GB, usr_domain)

'df -k' produces these results:
Filesystem 1024-blocks Used Available Capacity Mounted on
root_domain#root 131720 115834 8816 93% /
/proc 0 0 0 100% /proc
usr_domain#usr 2097144 1324614 563416 71% /usr

Is it possible to backup /usr to tape, then drop the size from 2GB to 1GB, move swap as an intact 2GB file, and then expand root to 1GB or am I being way too simplistic? Thanks for your help!
12 REPLIES
Michael Schulte zur Sur
Honored Contributor

Re: Can I expand root easily on this disk?

Hi,

I would dump all to tape, boot from cdrom, create new disklabel, file systems and restore from tape.

greetings,

Michael
Ivan Ferreira
Honored Contributor

Re: Can I expand root easily on this disk?

Yes, you can do that, but is there an specific reason to expand the root directory? Can't you create a new file set and mount it? For example, if you need more /tmp space, create a new fileset.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Archunan Muthiah
Honored Contributor

Re: Can I expand root easily on this disk?

Swenson,

you could have mentioned your OS version.

The latest version will support /root expansion using usual "mount -o extend" cmd.

Also if the root is on LSM volume or a RAID/SAN type controller that allows extending an existing volume it might be easier, but this is possible only with the latest release.


Archunan
God is Artist, we are all just brushes
Archunan Muthiah
Honored Contributor

Re: Can I expand root easily on this disk?

Swenson,

The other way is as other said that backing up, re-install with expanded root size and restore.


Archunan
God is Artist, we are all just brushes
R Swenson
Frequent Advisor

Re: Can I expand root easily on this disk?

My current OS is Tru64 5.1 (no suffix). I need to upgrade to a MINIMUM of 5.1a, PK 4 in order to upgrade my SAS application software.

The reason I'm looking to expand 'root' is because I only have abouyt 8MB of free space left (out of 128MB), and I anticipate that 5.1a will want much more space than that.
Vladimir Fabecic
Honored Contributor

Re: Can I expand root easily on this disk?

In that case backup/restore is the best (and maybe only) way.
Or you can move root to another bigger disk.
If you have to upgrade, do it to supported version, i.e. 5.1B.
In vino veritas, in VMS cluster
Michael Schulte zur Sur
Honored Contributor

Re: Can I expand root easily on this disk?

Hi,

when you do that can't you replace the disk with a bigger one?

Michael
R Swenson
Frequent Advisor

Re: Can I expand root easily on this disk?

HP Support suggested that root be 500MB to 1GB in size. Are there benefits to going larger than that? (PS - We're one of those 'poor' academic places, so buying a larger disk would be unpopular).
Michael Schulte zur Sur
Honored Contributor

Re: Can I expand root easily on this disk?

Hi,

1GB should be really enough. Oracle needs a lot of temporary space during installation but you could give /tmp its own space and you could move swap to another disk.

Michael
Venkatesh BL
Honored Contributor

Re: Can I expand root easily on this disk?

If and when you re-partition the disk ensure that you have many 'usable' parititions that do not overlap with other partitions. You could use 'diskconfig' for that.

Say,
a: 512MB (root)
b: 2GB (for usr_domain)
f: 1GB (for swap)
g: 512MB (free)
h: 128MB (free)

This is close to what you've got. But, the difference is, 'g' and 'h' can be added as swap space if and when required.
(or)
If you temporarily want /tmp to be in a different filesystem, you could create an advfs domain for it with one of these disk parititions.
(or)
If you have 'Advanced AdvFS Utilities' license, you could add these disks to your existing usr_domain domain on demand!
Shardha
Valued Contributor

Re: Can I expand root easily on this disk?

Dear Swenson,

you can used following procedure to resize the partitions.

To restore (/ and /usr and /var).
/ file system
- boot cd
Provide the installation options (resize the paritions).
Let the installation procedure to create / swap /usr /var file systems.
Press control C when it starts coping subsets
Restore / file system
- cd /etc/fdmns
- mkdir root_domain
- cd root_domain
- ln -s /dev/rz0a
- mount root_domain#root /mnt
-/dev/MKDEVICE tz5x
# cd /mnt
#vrestore -i
-add /
-verbose
-extract
-umount /mnt

Restore /usr file system
- cd /etc/fdmns
- mkdir usr_domain
- cd usr_domain
- ln -s /dev/rz0g
- mount usr_domain#usr /mnt
# cd /mnt
# mt fst 1
#vrestore -i
-add /
-verbose
-extract
-umount /mnt

Restore /var file system
- cd /etc/fdmns
- mkdir var_domain
- cd var_domain
- ln -s /dev/re0h
- mount var_domain#var /mnt
# cd /mnt
# mt fst 2
#vrestore -i
-add /
-verbose
-extract
-umount /mnt
Now halt the system and boot normally.

Shardha
Shardha
Valued Contributor

Re: Can I expand root easily on this disk?

Dear Swenson,

you can used following procedure to resize the partitions.

To restore (/ and /usr and /var).
/ file system
- boot cd
Provide the installation options (resize the paritions).
Let the installation procedure to create / swap /usr /var file systems.
Press control C when it starts coping subsets
Restore / file system
- cd /etc/fdmns
- mkdir root_domain
- cd root_domain
- ln -s /dev/rz0a
- mount root_domain#root /mnt
-/dev/MKDEVICE tz5x
# cd /mnt
#vrestore -i
-add /
-verbose
-extract
-umount /mnt

Restore /usr file system
- cd /etc/fdmns
- mkdir usr_domain
- cd usr_domain
- ln -s /dev/rz0g
- mount usr_domain#usr /mnt
# cd /mnt
# mt fst 1
#vrestore -i
-add /
-verbose
-extract
-umount /mnt

Restore /var file system
- cd /etc/fdmns
- mkdir var_domain
- cd var_domain
- ln -s /dev/rz0h
- mount var_domain#var /mnt
# cd /mnt
# mt fst 2
#vrestore -i
-add /
-verbose
-extract
-umount /mnt
Now halt the system and boot normally.

Shardha