- Owner's Guide
- Appendixes
- Manual Disk Configuration Steps
- Configuring an Operating System Disk
- Partitioning the Operating System Disk
- Partitioning for Oracle Linux 6
G.3.1.1 Partitioning for Oracle Linux 6
- Complete the steps in "Replacing a Disk Drive".
- Confirm that the new disk does not have a partition table:
# parted /dev/disk/by-hba-slot/sn -s print
You should see a message about a missing partition table.
- If the
parted
command displays a partition table, then clear it:# dd if=/dev/zero of=/dev/disk/by-hba-slot/sn bs=1M count=100
Tip:
You can use this command to restart an operating system disk configuration, if you make a mistake.
- Create the partition table:
# parted /dev/disk/by-hba-slot/sn -s mklabel gpt print
- List the Cylinder, Head, Sector (CHS) partition information of the surviving disk. Thus, if you are partitioning
/dev/disk/by-hba-slot/s0
, then enter/dev/disk/by-hba-slot/s1
for/dev/disk/by-hba-slot/s
m
in the following command:# parted /dev/disk/by-hba-slot/sm -s unit chs print Model: LSI MR9261-8i (scsi) Disk /dev/sda: 243031,30,6 Sector size (logical/physical): 512B/512B BIOS cylinder,head,sector geometry: 243031,255,63. Each cylinder is 8225kB. Partition Table: gpt Number Start End File system Name Flags 1 0,0,34 25,127,7 ext4 primary boot 2 25,127,8 21697,116,20 primary raid 3 21697,116,21 23227,61,35 linux-swap(v1) primary 4 23227,61,36 243031,29,36 ext4 primary
- Create partitions 1 to 3 on the new drive by duplicating the partitions of the surviving disk. Issue three commands in this format:
# parted /dev/disk/by-hba-slot/sn -s mkpart primary file_system start end
Use the start and end addresses that you obtained in Step 5 instead of the addresses shown in the following example:
# parted /dev/disk/by-hba-slot/sn -s mkpart primary ext4 0,0,34 25,127,7 # parted /dev/disk/by-hba-slot/sn -s mkpart primary ext4 25,127,8 21697,116,20 # parted /dev/disk/by-hba-slot/sn -s mkpart primary linux-swap 21697,116,21 23227,61,35
- Create primary partition 4 using the start address obtained in Step 5 and an end address of 100%:
# parted /dev/disk/by-hba-slot/sn -s mkpart primary ext4 23227,61,36 100%
Partition 4 stores HDFS data, and this syntax makes the partition as large as possible.
- Set the RAID flags:
# parted -s /dev/disk/by-hba-slot/sn set 1 raid # parted -s /dev/disk/by-hba-slot/sn set 2 raid
- Set the boot flag:
# parted -s /dev/disk/by-hba-slot/sn set 1 boot
- Verify that the boot flag is set:
# parted /dev/disk/by-hba-slot/sn -s unit chs print
An example of the output is as follows:Model: LSI MR9261-8i (scsi) Disk /dev/sda: 243031,30,6 Sector size (logical/physical): 512B/512B BIOS cylinder,head,sector geometry: 243031,255,63. Each cylinder is 8225kB. Partition Table: gpt Number Start End File system Name Flags 1 0,32,32 24,89,0 ext4 primary boot 2 24,89,1 60812,135,58 primary raid 3 60812,135,59 65618,90,7 linux-swap(v1) primary 4 65618,90,8 243030,252,37 ext4 primary
- Complete the steps in "Repairing the RAID Arrays".