Solved

Disk Repartitioning

Posted on 2003-11-03
7
1,177 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

726 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