Before You Begin

Ensure the following:

  • You have an extra disk/partition on both servers that can be used for data replication. A target volume’s size must equal to or larger than the size of its source disk/partition.

Partition local storage for use with SIOS DataKeeper for Linux

Primary Server

On your Primary server, perform the following actions:

  1. Identify an existing free, unused disk partition to use as the source of the mirror. Alternatively, create a new partition. Use the “gdisk” utility to partition your disk appropriately. In this example /dev/sdb is an unused disk where we will create a single partition

a. gdisk /dev/sdb

b. Press “n” to create a new partition

c.This example uses a new disk, so we will use all default values (Partition 1, entire disk and Linux filesystem partition type) Hit Enter four times to confirm these parameters.

d. Press “w” to write the partition table

e. Press “Y” to confirm to overwrite existing partitions

Example

[root@LinuxPrimary ~]# gdisk /dev/sdb

GPT fdisk (gdisk) version 0.8.10

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): n
Partition number (1-128, default 1): <enter>
First sector (34-2047, default = 34) or {+-}size{KMGTP}: <enter>
Last sector (34-2047, default = 2047) or {+-}size{KMGTP}: <enter>
Current type is ‘Linux filesystem’
Hex code or GUID (L to show codes, Enter = 8300): <enter>
Changed type of partition to ‘Linux filesystem’

Command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): Y
OK; writing new GUID partition table (GPT) to /dev/sdb.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot.
The operation has completed successfully.

[root@LinuxPrimary ~]#

  1. Format the newly created disk partition

# mkfs.ext3 /dev/sdb1

  1. Mount the partition at the desired location, for example /var/lib/mysql

# mount /dev/sdb1 /var/lib/mysql

  1. Note: there is no need to add an entry to /etc/fstab. Lifekeeper will take care of mounting this automatically.

Result
[root@LinuxPrimary ~]# df /var/lib/mysql
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb1 253855 11083 229666 5% /var/lib/mysql

Secondary Server

  1. On your Secondary server, only perform Step #1 above, where you partition the disk. The size of the Target disk/partition needs to be the same size, or greater, than our Source disk/partition. There is no need to format or mount the filesystem.

フィードバック

フィードバックありがとうございました

このトピックへフィードバック

送信