Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Operating System - Tru64 Unix
cancel
Showing results for 
Search instead for 
Did you mean: 

How to partition a disk using disklabel? (no diskconfig GUI available) please help!

SOLVED
Go to solution

How to partition a disk using disklabel? (no diskconfig GUI available) please help!

Hi all,

I have a new DS10 system with 2 (67.8 GB) internal SCSI disks. No video card, keyboard and mouse are not plugged. Just a serial port to make the installation.
I want to partition my disks to customize each partition size. I saw that diskconfig utility is a graphical interface to partition the disk but on my case I need to use disklabel text-based utility.

These are the desired partitions for disk0:

* root file system on the "a" partition (500MB)
* swapping area on the "b" partition (2.0GB)
* LSM private region on the "d" partition (2.0MB)
* /usr file system on the "g" partition (1.0GB)
* /var in the /usr file system
* /usr/i18n in the /usr file system
* user_data1 on the e partition (10.0GB)
* user_data2 on the h partition (50.0GB)

I really don't understand how to define each partition using disklabel... can anybody help me and give me some help?
This is the actual partition table on disk0:

# disklabel dsk0
# /dev/rdisk/dsk0c:
type: SCSI
disk: BD072863B2
label:
flags: dynamic_geometry
flags: dynamic_geometry
sectors/track: 731
tracks/cylinder: 4
sectors/cylinder: 2924
cylinders: 49070
sectors/unit: 142264000
rpm: 10016
interleave: 1
trackskew: 40
cylinderskew: 40
headswitch: 0 # milliseconds
track-to-track seek: 0 # milliseconds
drivedata: 0

8 partitions:
# size offset fstype fsize bsize cpg # ~Cyl values
a: 786432 0 AdvFS # 0 - 268*
b: 786432 786432 LSMnoprv # 268*- 537*
c: 142264000 0 unused 0 0 # 0 - 48653*
d: 4096 1572864 LSMsimp # 537*- 539*
e: 70343520 1576960 unused 0 0 # 539*- 24596*
f: 70343520 71920480 unused 0 0 # 24596*- 48653*
g: 4300800 1576960 LSMnoprv # 539*- 2010*
h: 136386240 5877760 unused 0 0 # 2010*- 48653*
#

Thanks in advance!!!
Jorge
4 REPLIES
Venkatesh BL
Honored Contributor

Re: How to partition a disk using disklabel? (no diskconfig GUI available) please help!

1) disklabel -e dsk0 ; will open up the partition table of dsk0 in the 'vi' editor. You can set the 'size' (in no. of 512 blocks) for each partition as per the requirement. When you use ":wq" to save it, it will ask if you want to apply the new label to the disk.

2) Having said that, it is not advisable to change the sizes of partitions that are already in use. If you are sure that no one is using this disk, then go ahead with step (1).

Re: How to partition a disk using disklabel? (no diskconfig GUI available) please help!

Thank you for your answer! Editing the image file is where the questions begins (vi is not a problem).
Do I need to change only the size column? What about the columns offset and #~Cyl values ???
Can you give me and example for the 2 first partitions, because I'm lost with the no. of 512 blocks.

Thank you
Rob Leadbeater
Honored Contributor
Solution

Re: How to partition a disk using disklabel? (no diskconfig GUI available) please help!

OK. Here goes for the first two partitions.
You only need to chance the size and offset values:

Size Offset
a: 1024000 0
b: 4194304 1024000

There are 2 x 512B blocks per KB.
Therefore:
500MB = 500 x 2 x 1024
2GB = 2048 x 2 x 1024

Hope this helps,

Regards,

Rob

Re: How to partition a disk using disklabel? (no diskconfig GUI available) please help!

Thank you for your answer Rob,

OK, It took me a while to understand disklabel configuration but it worked!
On my case, disk size is 67.8GB then my disklabel image file was like this.

partition Size (512K blocks) offset
a 1024000 0 # 500 MB
b 4194304 1024000 # 2 GB
c 142264000 0 # 67.8 GB
d 4096 5218304 # 2 MB
e 20971520 5222400 # 10 GB
f 9115328 26193920 # 4.3 GB
g 2097152 35309248 # 1 GB
h 104857600 37406400 # 50 GB

Thank you both of you 4 your help!