[Gandi] [IaaS] Attach data disk

[Gandi] [IaaS] Attach data disk.

1/ Attach the new data disk on the server.

2/ Check if the data disk is correctly recognize.


root@server01test:/home/admin# fdisk -l
Disk /dev/xvdb: 5 GiB, 5368709120 bytes, 10485760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 32768 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes

3/ Find the id number of the data disk.

root@server01test:/srv# blkid
/dev/xvdb: LABEL="datadisk" UUID="9e7efc5e-6665-45c5-957d-1a029b51501b" SEC_TYPE="ext2" TYPE="ext3"

4/ Open ‘/etc/default/gandi‘ file.

Replace :




5/ Open ‘/etc/fstab‘ file.
Add at the end:

UUID=9e7efc5e-6665-45c5-957d-1a029b51501b /srv/datadisk ext4 rw,noatime,errors=remount-ro 0 2

6/ Open ‘/etc/udev/rules.d/86-gandi.rules‘ file.

Uncomment :

#SUBSYSTEMS=="xen", DRIVERS=="vbd", SUBSYSTEM=="block", RUN+="fake_blkid -o udev -p $tempnode", RUN+="/etc/gandi/manage_data_disk.sh"

7/ Reboot the server.

8/ Test.

admin@server01test:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvdb       4.9G   11M  4.6G   1% /srv/datadisk

Comments are closed, but trackbacks and pingbacks are open.