Previous page

Next page

Locate page in Contents

Print this page

Preparing Disks for Virtuozzo Storage

Each chunk server is a service that handles a single physical disk in the cluster. Although the disk should be used solely by the CS service, technically, you can use it for multiple purposes. E.g., create a small partition for the operating system and leave the rest of disk space for Virtuozzo Storage. If the disk is already partitioned, skip this section and proceed to creating a chunk server. Otherwise follow the instructions in this section to prepare the disk for use in Virtuozzo Storage.

New disks attached to and recognized by the Hardware Node need to be prepared for use in the Virtuozzo Storage cluster by means of the /usr/libexec/pstorage/prepare_pstorage_drive tool. The tool does the following:

  1. Removes existing partitions from the disk.
  2. Creates and formats the required partition(s).

After that, manually add the new partition to /etc/fstab and mount it.

Notes:

1. If you do not need the disk to be bootable, run the tool with the --noboot option to skip GRUB bootloader installation.

2. For SSD drives, use the --ssd option.

3. To have the tool proceed without confirmation prompts, use the -y option.

Preparing Disks for Use as Chunk Servers

  1. To prepare an HDD or SSD for use as a chunk server, run the tool with the drive name as the option. For example:

    # /usr/libexec/pstorage/prepare_pstorage_drive /dev/sdb

    ALL data on /dev/sdb will be completely destroyed. Are you sure to continue? [y]

    y

    Zeroing out beginning and end of /dev/sdb...
    Partitioning /dev/sdb...
    Waiting for kernel...
    Formatting /dev/sdb1 partition...
    Done!

  2. Find out partition UUID:

    # ls -al /dev/disk/by-uuid/ | grep sdb1

    lrwxrwxrwx 1 root root 10 Jun 19 02:41 f3fbcbb8-4224-4a6a-89ed-3c55bbc073e0 -> ../../sdb1

  3. Add the new partition to /etc/fstab by UUID.
    • For vzkernel version 2.6.32-042stab108.8 or newer, the lazytime mount option is recommended. For example:

      UUID=f3fbcbb8-4224-4a6a-89ed-3c55bbc073e0 /pstorage/stor1-cs1 ext4 defaults,lazytime 1 2

    • For older vzkernel versions, use the defaults mount option. For example:

      UUID=f3fbcbb8-4224-4a6a-89ed-3c55bbc073e0 /pstorage/stor1-cs1 ext4 defaults 1 2

  4. Mount the partition to /pstorage/<cluster>-cs<N>, where <cluster> is cluster name and <N> is the first unused CS index number.

Note: If /pstorage/<cluster>-cs<N> does not exist, create it.

Preparing SSDs for Write Journaling or Caching

  1. To prepare an SSD for write journaling or caching, run the tool with two options: --ssd and drive name. For example:

    # /usr/libexec/pstorage/prepare_pstorage_drive /dev/sdb --ssd

    ALL data on /dev/sdb will be completely destroyed. Are you sure to continue? [y]

    y

    Zeroing out beginning and end of /dev/sdb...
    Partitioning /dev/sdb...
    Waiting for kernel...
    Formatting /dev/sdb1 partition...
    Done!

  2. Find out partition UUID:

    # ls -al /dev/disk/by-uuid/ | grep sdb1

    lrwxrwxrwx 1 root root 10 Jun 19 02:41 f3fbcbb8-4224-4a6a-89ed-3c55bbc073e0 -> ../../sdb1

  3. Add the new partition to /etc/fstab by UUID.
    • For vzkernel version 2.6.32-042stab108.8 or newer, the lazytime mount option is recommended. For example:

      UUID=f3fbcbb8-4224-4a6a-89ed-3c55bbc073e0 /pstorage/stor1-ssd1 ext4 defaults,lazytime 1 2

    • For older vzkernel versions, use the defaults mount option. For example:

      UUID=f3fbcbb8-4224-4a6a-89ed-3c55bbc073e0 /pstorage/stor1-ssd1 ext4 defaults 1 2

  4. Mount the partition to /pstorage/<cluster>-ssd<N>, where <cluster> is cluster name and <N> is the first unused SSD index number.

Note: If /pstorage/<cluster>-ssd<N> does not exist, create it.