본문 바로가기

CLOUD/OPENSTACK

kolla-ansible swift 디스크 파티션 설정

Disks with a partition table (recommended)

Swift requires block devices to be available for storage. To prepare a disk for use as a Swift storage device, a special partition name and filesystem label need to be added.

The following should be done on each storage node, the example is shown for three disks:

# <WARNING ALL DATA ON DISK will be LOST!>
index=0
for d in sdc sdd sde; do
    parted /dev/${d} -s -- mklabel gpt mkpart KOLLA_SWIFT_DATA 1 -1
    sudo mkfs.xfs -f -L d${index} /dev/${d}1
    (( index++ ))
done

For evaluation, loopback devices can be used in lieu of real disks:

index=0
for d in sdc sdd sde; do
    free_device=$(losetup -f)
    fallocate -l 1G /tmp/$d
    losetup $free_device /tmp/$d
    parted $free_device -s -- mklabel gpt mkpart KOLLA_SWIFT_DATA 1 -1
    sudo mkfs.xfs -f -L d${index} ${free_device}p1
    (( index++ ))
done
반응형

'CLOUD > OPENSTACK' 카테고리의 다른 글

neutron subnet gateway delete  (0) 2021.01.26