• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1188
  • Last Modified:

Disk Repartitioning

I need to free up slice 7 (c0t0d0s7 - for Disk Suite metadb files), on which '/var' is currently mounted.  I'm hoping to avoid a complete backup/repartition/restore.  In the end, I only need 35MB for this slice (and it currently has 2.56GB) and I still need to mount all the currently mounted points.  

Ideas/comments/solutions appreciated.

Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm       0 -  130      301.40MB    (131/0/0)    617272
  1       swap    wu     131 - 1021        2.00GB    (891/0/0)   4198392
  2     backup    wm       0 - 7505       16.86GB    (7506/0/0) 35368272
  3        usr    wm    1022 - 3247        5.00GB    (2226/0/0) 10488912
  4 unassigned    wm    3248 - 5028        4.00GB    (1781/0/0)  8392072
  5       home    wm    5029 - 5474        1.00GB    (446/0/0)   2101552
  6 unassigned    wm    5475 - 6365        2.00GB    (891/0/0)   4198392
  7        var    wm    6366 - 7505        2.56GB    (1140/0/0)  5371680


Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t0d0s0     288603  133382  126361    52%    /
/dev/dsk/c0t0d0s3    5163654  804515 4307503    16%    /usr
/proc                      0       0       0     0%    /proc
fd                         0       0       0     0%    /dev/fd
mnttab                     0       0       0     0%    /etc/mnttab
/dev/dsk/c0t0d0s7    2631327   88124 2490577     4%    /var
swap                 3486424      24 3486400     1%    /var/run
swap                 3486496      96 3486400     1%    /tmp
/dev/dsk/c0t0d0s4    4131866   85536 4005012     3%    /opt
/dev/dsk/c0t0d0s5    1018191     473  956627     1%    /export/home
/dev/dsk/c0t0d0s6    2056211      11 1994514     1%    /opt/var
0
dskhunter
Asked:
dskhunter
3 Solutions
 
liddlerCommented:
Unfortunately AFAIK, i'ts not possible to do it easily.  Depending on what you are using /var, /opt & /opt/var for, your will have to combine two of them, say put /opt/var/ onto /opt
move data from /opt/var into a subdirectory on opt, remove /opt/var partition
tar /var into /opt/var.tar
Boot into single user mode
use format to resize s6 (as all s6 and most of s7) & s7 (as the last 35Mb
newfs s6
mount /var on s6, then untar /opt/var.tar (you'll have to mount /usr & /opt)
edit you /etc/vfstab to reflect the new mount points.
reboot (& cross fingers)
If you are going to use DiskSuite to mirrow this disk, you can then use format to copy the disklabel onto the second disk.
Obviously remember to do a full tape (or whatever you use) backup before starting the procedure.

Let me know if you need any clarification.
0
 
glassdCommented:
I don't think that you need to put the state database on a separate partition. It can exist inside an existing partition.

Alternatively, if the purpose is to mirror the system disk, why not:

partition the second disk the way you want it
clone the first disk onto the second
boot from the second disk
partition the first disk to match the second
now mirror the disks
0
 
bummerlordCommented:
... also if you need slice 7 to put your metadb's on, there is no need to allocate 35Mbyte. 4 cylinders should be enough for 2 copies.
Also you may not have to repartition your disk since the state replica can exist on a slice that is also part of a metadevice.
Though you have to add the state replica first. So you could (as mentioned above) backup e.g. /var to /opt/var, then create state replicas on the slice that hosted /var (and the relevant slice on disk2), setup these slices as simple stripes and create a filesystem on one of them.
I assume you know enough about disksuite to take it from there :-)

/b
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
bummerlordCommented:
Oh, sorry glassd, you covered that already... I'm not used to this new flashy "design" yet..
/b
0
 
dskhunterAuthor Commented:
What I've decided to do is: partition a second disk moving '/opt/var' to '/opt' as suggested (the only thing currently on '/opt' is two symbolic links pointing to a '/shared' mount point which mounts '/opt/var' on a RAID 5 StorEdge Disk Array), then restore a Tivoli backup to the newly partitioned disk with slice 7 unused boot up and see how the application (BroadVision One to One) handles the change.  If it works, this will become my new root/boot disk.  I'll prtvtoc the new to the existing, format, newfs and use it as the DiskSuite mirror disk.  Sound feasible?
0
 
bummerlordCommented:
Sounds like a feasible and very safe way to proceed :-)
Good luck
0
 
dskhunterAuthor Commented:
Thanks to you all for your comments and suggestions!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now