Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spliting a partition

Status
Not open for further replies.

bigscouse

MIS
Oct 6, 1998
420
GB
I have Sun Ultra10 with 1 disk, it has 6 partitions, I need to create a 7th by spliting /opt into /opt and /vol01.<br><br>How do I best approach this?<br><br>Thanks for any help offered. <p>Ged Jones<br><a href=mailto:gedejones@hotmail.com>gedejones@hotmail.com</a><br><a href= > </a><br>
 
It's as simple as creating the new partition, mounting it as &quot;/vol01&quot;, and then deciding what to move across from &quot;/opt&quot;.&nbsp;&nbsp;You may need to provide symbolic links back to the original &quot;/opt&quot; location for the directories you move.<br><br>Don't forget to take backups before doing anything, though :)<br><br>Hope this helps. <p> <br><a href=mailto: > </a><br><a href= > </a><br>--<br>
0 1 - Just my two bits
 
Thanks AndyBo,<br><br>&nbsp;I have already run tar on opt, put an entry in vfstab, and unmounted opt. Now I need to know how to create the new partition. <p>Ged Jones<br><a href=mailto:gedejones@hotmail.com>gedejones@hotmail.com</a><br><a href= > </a><br>
 
Ah...&nbsp;&nbsp;this bit is relatively easy :)<br><br>Assuming you want to create a UFS file system, run:<br><FONT FACE=monospace><br>newfs /dev/rdsk/c?t?d?s?<br></font><br>Of course, you want to replace the question marks with the appropriate values...&nbsp;&nbsp;This will prompt you for confirmation, and then create the new file system for you.<br><br>For more details, see &quot;man newfs&quot; and &quot;man mkfs_ufs&quot;.<br><br>Hope that helps. <p> <br><a href=mailto: > </a><br><a href= > </a><br>--<br>
0 1 - Just my two bits
 
I had tried that but got the answer &quot;preposterous size 0 sectors.&quot; <br><br>I need to reallocate the space on /opt between /opt and the new partition, that is the bit that is phasing me.<br><br>Thanks again for your help. <p>Ged Jones<br><a href=mailto:gedejones@hotmail.com>gedejones@hotmail.com</a><br><a href= > </a><br>
 
Just so I'm clear on things, you have /opt that contains an amount of data.&nbsp;&nbsp;You have created a new partition that needs a file system (known as /vol01) creating on it.&nbsp;&nbsp;Once you have /vol01, you want to move some things off /opt onto /vol01.&nbsp;&nbsp;Do you also want to change the current size of /opt so that it is smaller, and then allocate the space that has been freed up to /vol01?&nbsp;&nbsp;(All of this assumes that /opt has been set up on it's own disk partition...)<br><br>Assuming you have the new parition created, you could try running <FONT FACE=monospace>mkfs</font> directly, instead of via <FONT FACE=monospace>newfs</font>:<br><FONT FACE=monospace><br>mkfs -F ufs /dev/rdsk/c?t?d?s? <i>size_of_partition</i><br></font><br>The &quot;size_of_partition&quot; value is specified as the number of sectors in the partition.&nbsp;&nbsp;You should have this information from when you created the partition.&nbsp;&nbsp;If not, then &quot;<FONT FACE=monospace>prtvtoc /dev/rdsk/c?t?d?s2</font>&quot; will show it.<br><br>Post back if you need to resize the &quot;/opt&quot; partition.&nbsp;&nbsp;That could start to get a bit tricky, depending upon how much unallocated disk you have elsewhere on the system. <p> <br><a href=mailto: > </a><br><a href= > </a><br>--<br>
0 1 - Just my two bits
 
There is the problem, I have not vreated /vol01 as such yet.<br>/opt is 4.5 gig loads of space on /dev/rdsk/c0t0d0s5 and I need to set up /vol01 on c0t0d0s6 using 2 gig from /opt.<br>I have been using format but must be doing something wrong. <p>Ged Jones<br><a href=mailto:gedejones@hotmail.com>gedejones@hotmail.com</a><br><a href= > </a><br>
 
There is the problem, I have not created /vol01 as such yet.<br>/opt is 4.5 gig loads of space on /dev/rdsk/c0t0d0s5 and I need to set up /vol01 on c0t0d0s6 using 2 gig from /opt.<br>I have been using format but must be doing something wrong. <p>Ged Jones<br><a href=mailto:gedejones@hotmail.com>gedejones@hotmail.com</a><br><a href= > </a><br>
 
Sorted,<br><br>Thanks for your assistance Andy, <br>My problem was when using format I did not use the label option to write the changes to disc.<br><br> <p>Ged Jones<br><a href=mailto:gedejones@hotmail.com>gedejones@hotmail.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top