Summary : resizing or adding slice with format command

From: Bigadmin <bigadmin_at_unixplanet.biz>
Date: Mon Apr 21 2008 - 02:40:49 EDT
Special Thanks to "Matthew Stier" , "Darren Dunham" and "JESSE CARROLL"


Solaris 10 supports mirroring hard drives at installation time, and here is
the sample profile:


install_type    initial_install
system_type     standalone
partitioning    explicit
cluster         SUNWCall
filesys         mirror:d10 c0t0d0s0 c0t1d0s0 8000 /
filesys         mirror:d20 c0t0d0s1 c0t1d0s1 1000 swap
metadb          c0t0d0s3 size 8192 count 3
metadb          c0t1d0s3 size 8192 count 3
filesys         mirror:d30 c0t0d0s5 c0t1d0s5 10000 /export/home

if solaris is already installed with no slice considered for solstice and
metadb, 
you need to add a 10 to 50 MB slice for solstice metadb. So run
format --> Partition --> choose an unassigned partition --> then choose
start cylinder and size of the new slice

To increase a file system that can be un-mounted and it is already part of
meta device, 
for example /export/home: 

1-  grep -i home /etc/vfstab 
/dev/md/dsk/d30 /dev/md/rdsk/d30        /export/home    ufs     2       yes
-

2-  metastat 
d30: Mirror
d31: Submirror of d30
d32: Submirror of d30

3-  add slice on both disks through format -- partition -- choose number 4
-- start cylinder -- size 

4-  umount /export/home 

5-  metattach d31 /dev/rdsk/c0t0d0s4 
d31: component is attached

6-   metattach d32 /dev/rdsk/c0t1d0s4 
d32: component is attached

7-  mount /export/home 

8-  growfs -M /export/home /dev/md/rdsk/d30 
/dev/md/rdsk/d30:       6248112 sectors in 1326 cylinders of 19 tracks, 248
sectors
        3050.8MB in 83 cyl groups (16 c/g, 36.81MB/g, 17664 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 75680, 151328, 226976, 302624, 378272, 453920, 529568, 605216, 680864,
 5505952, 5581600, 5657248, 5732896, 5808544, 5884192, 5959840, 6035488,
 6111136, 6186784,


The only thing that I couldn't accomplish , was increasing the root
partition. 

Here is solution That Mathew provided and I found it very useful:

The only way to increase the size of the root partition is to
dump-reparttion-restore.  
With Logical Volume Management (LVM), it can only be mirrored.  
It cannot be concatenated to, nor stripped across multiple physical
partitions.

The only times I've done this, is when replacing the root drives with larger
ones, 
but you could use this technique to use the unallocated boot disk space.

1) Remove the boot disk from LVM.  This includes metadb's.

2) Repartition the secondary drive. Newfs the slices that will have
filesystems.

3) For each filesystems to be copied, mount the filesystem on /mnt, change
directory to /mnt, 
   and use ufsdump/ufsrestore to copy the old filesystem to the new
partition.  
   When copying the root filesystem, follow the manpage, and run
'installboot' to make the disk bootable. 
   Once completed change directory out of /mnt and unmount it.

4) Once all partitions  are copied, you should be able to shut the system
down, swap drives, 
   and boot on the newly repartitioned "primary" drive.

5) Now all that's left is to repartition the new "secondary" drive, and
recreate all the metadevices.  
   When creating the metadevices, encapsulate all the partitions in their
own metadevice, and initiate the 
   mirrors with their primary halves, but wait on attaching secondaries
until everything else is finished, 
   or you going to be waiting extended periods of time, for syncing. With
all the metadevices ready, 
   you can metaroot the root filesystem, and then edit /etc/vfstab to switch
swap and the other 
   boot disk partitions to to their mirrors, and reboot the system.

6) With a successful reboot, and everything mounting as expected, 
   you can now attach the mirror secondaries, and wait for them to sync.



 


-----Original Message-----
From: sunmanagers-bounces@sunmanagers.org
[mailto:sunmanagers-bounces@sunmanagers.org] On Behalf Of Bigadmin
Sent: Tuesday, April 15, 2008 9:26 PM
To: sunmanagers@sunmanagers.org
Subject: resizing or adding slice with format command

Hello Sun Managers,

We are trying to install Solaris 10 through jump start and then mirror 
2 * 30 GB hard drives with solstice. 

1- If we install solaris 10 with following profile, which swap is in second
partition


install_type    initial_install
system_type     standalone  # or it can be server
partitioning    explicit
filesys         rootdisk.s0     8000    /
filesys         rootdisk.s1     1000    swap
filesys         rootdisk.s4     1000    /tmp
filesys         rootdisk.s5     10000    /export/home
cluster         SUNWCall

then later when run format to add 50 MB slice for solstice, we receive the
following error:

Select partitioning base:
        0. Current partition table (unnamed)
        1. All Free Hog
Choose base (enter number) [0]? 0
Warning: Non-contiguous partition (0) in table.
Warning: Overlapping partition (1) in table.
Warning: Fix, or select a different partition table.

2- we changed the profile and put swap in first slice ,but When tried to add
slice , 
we got error that there is no free hog to add a partition.

What is the best way of partitioning Solaris so in future we can add slice
Or increase the file system size. 

Any time we tried to change the slice size with format command , System
become unbootable.


Thanks for help
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Sun Apr 20 16:45:04 2008

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:44:10 EST