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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

increase slice size

Status
Not open for further replies.

CAF786

MIS
Aug 1, 2005
29
0
0
US
partition> p
Current partition table (original):
Total disk cylinders available: 18412 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 273 128.44MB (274/0/0) 263040
1 swap wu 274 - 547 128.44MB (274/0/0) 263040
2 backup wu 0 - 18411 8.43GB (18412/0/0) 17675520
3 unassigned wm 548 - 4917 2.00GB (4370/0/0) 4195200
4 unassigned wm 4918 - 13656 4.00GB (8739/0/0) 8389440
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0

How can I increase slice 4 to 6.00gb, I have files on the slice 4....
 
Do you mean you want to combine slices 3 and 4? This would give you 6GB.

If so, first back up everything on slices 3 and 4 that you want to keep. How you do this depends on how the slices are mounted, how big the files are, and what you have available to back them up to.

Second, go back into [tt]format[/tt] and make slice 3 be size 0. Make slice 4 start from cylinder 548 and go to cylinder 13636. This will make it the 6GB you want. Write the partition table and exit.

Run [tt]newfs[/tt] on slice 4 to create a filesystem on it.

Edit [tt]/etc/vfstab[/tt] to remove references to slice 3 since it no longer exists. Make sure slice 4 is being mounted where you want it.

Issue a [tt]mount[/tt] command to mount slice 4.

Restore your files.

That's it.
 
Slice 3 could be in use too, just like slice 4 even though they are both listed as unassigned.
 
Looks like he has free space on the disk after slice 4, so probably doesn't want to combine them.

Back up the contents of slice 4 like Sam said, just in case. Use format to modify slice 4 and change the finishing cylinder. You may as well use the last cylinder on the disk, 18412, because 6GB would almost go to the end of the disk anyway.

Display the new partition table in format and take note of the new number of blocks allocated to slice 4 in the right hand column.

Use the following command (presuming this is UFS!) to resize the filesystem. You don't need to unmount it.

[tt]/usr/lib/fs/ufs/mkfs -M <mountpoint> <raw_device> <new_no_of_blocks>[/tt]

For example:

[tt]# df -k /mnt
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c2t51d57s3 95983 81613 4772 95% /mnt
# /usr/lib/fs/ufs/mkfs -M /mnt /dev/rdsk/c2t51d57s3 410880
Warning: 256 sector(s) in last cylinder unallocated
/dev/rdsk/c2t51d57s3: 410880 sectors in 803 cylinders of 16 tracks, 32 sectors
200.6MB in 51 cyl groups (16 c/g, 4.00MB/g, 1920 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 8256, 16480, 24704, 32928, 41152, 49376, 57600, 65824, 74048,
336192, 344416, 352640, 360864, 369088, 377312, 385536, 393248, 401472,
409696,
# df -k /mnt
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c2t51d57s3 192367 81613 101156 45% /mnt
#[/tt]



Annihilannic.
 
Oh, good catch Anni. I didn't notice he wasn't using the whole disk.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top