Cloning Hard Drives and Resizing Partitions

Hello Everyone

Apologies in advance for my ignorance and amateur attempt at resolving my issue.

I have a Solaris system that is running out of space. I want to move the existing hard drive to a new larger drive and resize the partitions on the new larger drive in order to solve my problem.

I have attempted to use cloneZilla to create an image of the drive but I always get a warning like the following:
"Warning: The disk CHS geometry (306473,255,2) reported by the operating system does not match the geometry stored on the disk label (38309,16,255)."

And from there clonezilla refuses to make an image.

I tried making an image using ubuntu with disk image writer and am able to do so successfully. When I load the image on a new hard drive it seems to be fine and Solaris recognizes the drive and is able to operate as normal.

Now I want to resize the partitions on the drive, but when booting a live CD of GParted or using ubuntu I get the exact same warning message as with clonezilla and GParted refuses to see the partitions indicating that all the space is unallocated which I can confirm from ubuntu is not the case.

I have reached my wits end and would appreciate any advice on the matter. Is there a better way of creating an image? How can I resolve the warning? Is there anything I can do?

Any advice would be appreciated.

Kind Regards,
Solaris is not for rookies

Welcome!

The CHS (cylinders/heads/sectors) should not matter, because LBA (logical block addressing) is used.
The oldish disk labels still require the CHS values instead of the total size.
Total size = C * H * S
The total size used by the OS should be equal or little less.

Do you have Solaris x86 or Solaris Sparc? They have quite different disk labels. Sparc labels are often not recognized in the x86 world.

I believe its Solaris Sparc.

Please give output of the Solaris commands

uname -a
df -klP

uname -a:
SunOS fls002 5.9 Generic_118558-28 sun4u sparc SUNW,Sun-Blade-100

df -klP
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/dsk/c0t0d0s0 10326052 1652632 8570160 17% /
/dev/dsk/c0t0d0s3 10326052 3396362 6826430 34% /var
swap 2764576 112 2764464 1% /var/run
/dev/dsk/c0t0d0s7 96311 1041 85639 2% /databases
swap 2764464 0 2764464 0% /tmp
/dev/dsk/c0t0d0s6 4130982 4121 4085552 1% /dump
/dev/dsk/c0t0d0s4 10326052 2309246 7913546 23% /opt
/dev/dsk/c0t0d0s5 39663692 33538486 5728570 86% /export
/export/home/sybase 39663692 33538486 5728570 86% /home/sybase
/export/home/apa 39663692 33538486 5728570 86% /home/apa

Thank you for your response and welcome

So yes it is Sparc. And Sparc disk labels.
And plain partitions. No Solaris volume manager (that is IMHO not reliable in the case of a power cut, but can online-grow a meta disk).
Solaris 9, so ZFS is not an option.

I don't know how cloning the disk could ever grow the disk, perhaps the disk label and partition table on the new disk has been cloned to the old size.
Then you can only add new plain partitions, not grow existing ones (exception: the last partition with the highest sector).

I suggest to attach the new disk as a secondary disk on the Sparc box, and recreate the disk label and partition table to the new desired sizes.
Then newfs the new partitions.
Then put a boot block to the partition that will hold the / (root file system).
Then copy over all the files ( ufsdump | ufsrestore).
When DB files are copied it is advisable to shutdown the DB (sybase).

It is very important that you never mix up the disks! Recreating something on the old disk would destroy its data.
Ensure you have a recent data backup, just in case...

1 Like

In addition to the good advice given by @MadeInGermany I would also add......

(and this all assumes that it's a Sparc system, the filesystems are ufs)

that ufsdump and ufsrestore is the preferred backup tool for ufs filesystems because it deals with specific filesystems a.k.a partitions (or in Solaris speak 'slices')

You list a number of filesystems and each of these can be backed up reliably and individually using ufsdump either to NFS storage or, as MadeInGermany said by piping ufsdump directly to ufsrestore on the new disk installed as a second drive.

You should be professional and ensure that you have a complete backup of the whole system before beginning in case anything goes wrong.

Then using 'ufsdump' you can create backups of each filesystem, remove the old hard disk for safe keeping, install the new hard drive, boot Solaris from DVD into single user, use 'format' to create and write out a new partition table including swap space (known as a VTOC, Virtual Table of Contents in Solaris speak), use 'newfs' to create new empty filesystems where you need them (taking care to create enough new inodes if they are also running low on the old system), and use 'ufsrestore' to write the filesystems back to the new drive. Then use 'installboot' to write a boot block to the drive.

Whether the above is of any use to you will depend on your level of experience with *nix systems but you did mention Ubuntu in your post.

The above would be the recommended method to restore your system to a new drive and there's certainly more than enough knowledge on this forum to guide you through it.

Thank you so much for your response and direction.

You're expertise is sincerely appreciated.

Thank you so much for your response. Really appreciate the assistance.

Rest assured I have the hard drives backed up as I wade into these treacherous waters.