Solved

Disk Repartitioning

Posted on 2003-11-03
7
1,171 Views
Last Modified: 2013-12-27
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
Comment
Question by:dskhunter
7 Comments
 
LVL 18

Accepted Solution

by:
liddler earned 250 total points
ID: 9671013
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
 
LVL 7

Assisted Solution

by:glassd
glassd earned 125 total points
ID: 9671095
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
 
LVL 6

Assisted Solution

by:bummerlord
bummerlord earned 125 total points
ID: 9677334
... 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 6

Expert Comment

by:bummerlord
ID: 9677338
Oh, sorry glassd, you covered that already... I'm not used to this new flashy "design" yet..
/b
0
 

Author Comment

by:dskhunter
ID: 9678534
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
 
LVL 6

Expert Comment

by:bummerlord
ID: 9678633
Sounds like a feasible and very safe way to proceed :-)
Good luck
0
 

Author Comment

by:dskhunter
ID: 9686323
Thanks to you all for your comments and suggestions!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now