View Single Post
Old 4th December 2022
lattimro lattimro is offline
Port Guard
 
Join Date: Jun 2021
Posts: 15
Default

Quote:
Originally Posted by jggimi View Post
If you examine the output from disklabel(8) using sector counts -- that is, without using "m" or "g" to print the partition layout -- you will more easily be able to see if there are any unallocated sectors.

The growfs(8) utility can increase the size of a partition, but only if there are adjacent unallocated sectors that follow. The only other way to change an existing partition's size is to back it up, delete and reallocate it, then restore.
I was able to reclaim more sectors than 33 554 368, and I created a newfs wd0i and mount to /usr/src (as it can be seen in the screenshot) add to fstab, reboot, all good. Next step was to increase wd0f mounted on /usr.

Thanks jggimi, much appreciated, I noticed I have issues with "c" increase size of wd0f. Could be because m or g or adjacent unallocated sectors or both. However I can shrink partition (but not saved just testing "c" command).

The last question on this thread, please can you show me the adjacent unallocated on my label. I think it is the partition with the biggest offset 33 543 712 wd0i

I think I will try to dump/restore method.

I do not have room on / so I mounted newly created 8G wd0i partition on /mnt and dump|restore
Code:
dump -0af - /usr | restore -rf - | rm restoresymtable
BTW, there is no "-" (dash) before -rf in the correct example usage below:

Quote:
-r Restore (rebuild) a file system. The target file system should be made pristine with newfs(8), mounted, and the user changed working directory into the pristine file system before starting the restoration of the initial level 0 backup. If the level 0 restores successfully, the -r flag may be used to restore any necessary incremental backups on top of the level 0. The -r flag precludes an interactive file extraction and can be detrimental to one's health (not to mention the disk) if not used carefully. An example of correct usage:
# newfs /dev/rsd0g
# mount /dev/sd0g /mnt
# cd /mnt
# restore rf /dev/rst0
Going forward, here is the output of dump|restore:
Changed in fstab /usr from (in my disklabel) "f" to "i". Reboot and first no X. At login prompt I can't log in because it is looking for /usr/local/bin/bash and I think it can't read /usr. However, I rebooted to single-user (boot -s) and I have access to /.
Here's the disklabel and fstab (see attached). Note du output proved the dump |restore "copied" to /usr
Not sure what I'm doing but ... I changed the SHELL for root to /bin/ksh and exit single-user and continue booting ...
and got X, all good (see attached)
Attached Images
File Type: png Screenshot_2022-12-03_21-34-19.png (178.8 KB, 11 views)
File Type: png Screenshot_2022-12-04_20-26-04.png (205.2 KB, 9 views)
File Type: png Screenshot_2022-12-04_20-52-27.png (154.5 KB, 7 views)
File Type: png Screenshot_2022-12-04_21-06-26.png (114.4 KB, 6 views)
File Type: png Screenshot_2022-12-04_21-36-36.png (229.8 KB, 8 views)

Last edited by lattimro; 5th December 2022 at 02:40 AM.
Reply With Quote