I am trying to expand the root partition on Solaris 10. I can expand root partition using format/partition command, but usually increasing cylinders on partition is done on back end. In this case I would have to expand from the front end following the table below, meaning I would have to move the starting cylinder. My concern is if moving the starting cylinder of root will cause some problems with Solaris. Cylinders 526-54422 seem to unallocated and should be able to use. I was thinking if I can move the starting cylinder and increase it then I can use growfs command on root partition to expand the size.
Current partition table (original):
Total disk cylinders available: 60797 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 54423 - 60796 48.83GB (6374/0/0) 102398310
1 swap wu 3 - 525 4.01GB (523/0/0) 8401995
2 backup wm 0 - 60796 465.73GB (60797/0/0) 976703805
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 - 0 7.84MB (1/0/0) 16065
9 alternates wu 1 - 2 15.69MB (2/0/0) 32130
I guess my main question is if moving starting cylinder of my root partition be harmful to the system even though I have plenty of unallocated space to use.
The man page for growfs states:
The following con-
ditions prevent you from expanding file systems: When acct
is activated and the accounting file is on the target dev-
ice. When C2 security is activated and the logging file is
on the target file system. When there is a local swap file
in the target file system. When the file system is root (/),
/usr, or swap.
Since you are talking about root, I think you're in trouble right there. But growfs is for ufs filesystems. I assume you have a ufs root? If it's zfs then I will have to defer to someone else. I have never used zfs.
Yes, it is ufs root. I've only created slices or partitions on a device, but it would seem that expanding the root and using growfs would be a solution only if moving the starting root partition was valid option. I've read others successfully doing so, but my situation may be different. If all else I guess I could just make another slice of a partition, but then that would require me to move directories/files over and renaming.
I think you can create a new partition on that disk and do a live upgrade that uses the new partition as its root disk.
man live_upgrade
Perhaps adding a slice and creating a new partition mount might be the safer alternative. I was hoping to expand root, but not at the risk of jeapordizing the system. Seems like a waste of space that is not used just sitting there.
how about a backup of your system with a flasharchive and a "new" install from the flasharchive with a new filesystem layout?
This won't work as growfs can only expand a file system if space is added at the end of it, not before.
As you have plenty of free space available, you can simply create a ~400 GB slice 3, then dump/restore slice 0 to it, then make s3 your boot partition.
Ok that sounds like an alternative option. I'll look into that. I assume you mean ufsdump and ufsrestore.
@mjminal,
I had increase the root file system on solaris 10.. without a pain. Its the utility which is available to increase the cylinder starting/ending count.
#format,
then go for p(for print)
print>p (for print again),
Now select the slice number, which will be 0
go ahead to specify the cylinder end count, which results in increasing the cylinder count which reflects on the '/' overall size being increased.
Pls let me knw if this worked for you, it did for me..
The growfs would help if we are adding an additional memory to the root.
What I was lookin at is to have the space available within the disk to be added to root by increasing that count.
may be ur to loose ur file system