You must add and partition a hard disk of 150 GB if you want to provision an operating system on servers on a upgraded UCP Advisor setup.
- Add the hard disk to the UCP Advisor VM.
- Using SSH log on to the UCP Advisor VM as a root user.
- Identify the newly added hard disk. Enter:
lsblk
Example:
[root@UCP-LP ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 800G 0 disk ├─sda1 8:1 0 953M 0 part /boot/efi ├─sda2 8:2 0 2G 0 part /boot └─sda3 8:3 0 797.1G 0 part ├─ol-root 253:0 0 756.1G 0 lvm / ├─ol-swap 253:1 0 1G 0 lvm └─ol-home 253:2 0 40G 0 lvm sdb 8:16 0 200G 0 disk sdc 8:32 0 150G 0 disk
In the above example, sdc is the newly added hard disk. - Partition the hard disk. Enter:
fdisk /dev/sdc
Enter the following values when prompted:- Enter n to create a new partition.
- Select p for primary disk.
- Press Enter to accept the default partition number and the start and the end sectors.
- Enter w to save the changes and exit.
- Verify the partition. Enter:
lsblk
Example:
[root@UCP-LP dev]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 800G 0 disk ├─sda1 8:1 0 953M 0 part /boot/efi ├─sda2 8:2 0 2G 0 part /boot └─sda3 8:3 0 797.1G 0 part ├─ol-root 253:0 0 756.1G 0 lvm / ├─ol-swap 253:1 0 1G 0 lvm └─ol-home 253:2 0 40G 0 lvm sdb 8:16 0 200G 0 disk sdc 8:32 0 150G 0 disk └─sdc1 8:33 0 150G 0 part
- Format the new partition with XFS. Enter:
mkfs.xfs /dev/sdc1
Example:
[root@UCP-LP dev]# mkfs.xfs /dev/sdc1 meta-data=/dev/sdc1 isize=512 agcount=4, agsize=2621376 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=1, sparse=1, rmapbt=0 = reflink=1 bigtime=0 inobtcount=0 data = bsize=4096 blocks=10485504, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0, ftype=1 log =internal log bsize=4096 blocks=25600, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 - Create the folder for mounting the hard disk. Enter:
[root@UCP-LP dev]# mkdir -p /var/ucpadvisor/canonical-maas
- Mount the hard disk to the new folder. Enter:
[root@UCP-LP dev]# mount /dev/sdc1 /var/ucpadvisor/canonical-maas
- Preserve the mount. Enter:
echo "/dev/sdc1 /var/ucpadvisor/canonical-maas xfs defaults 0 0" | sudo tee -a /etc/fstab
- Reboot the server.
- Verify if the mount was successful. Enter:
df -h |grep maas
Example:
/dev/sdc1 150G 2.5G 148G 2% /var/ucpadvisor/canonical-maas