Solved

Disk Repartitioning

Posted on 2003-11-03
7
1,173 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
prtdiag report hdd failure 10 149
AIX  NFS  question 1 136
UNiX Script filesystem space usage Part2 54 86
UNIX SCP 5 76
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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…

813 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

11 Experts available now in Live!

Get 1:1 Help Now