Solved

Disk Repartitioning

Posted on 2003-11-03
7
1,172 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
error while running the scirpt 24 125
cant install flashplugins for firefox in freebsd 8 9 44
UNIX SCP 5 64
How to check the PVU´s on AIX TSM servers? 3 74
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:

929 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

13 Experts available now in Live!

Get 1:1 Help Now