HPC/ETC

ubuntu, xcat 디스크 파티션

mirhenge 2020. 12. 8. 23:17

 

root@node01:~# df -Th

Filesystem     Type      Size  Used Avail Use% Mounted on

udev           devtmpfs  4.9G     0  4.9G   0% /dev

tmpfs          tmpfs     999M  8.9M  990M   1% /run

/dev/sda5      ext4       38G  976M   35G   3% /

tmpfs          tmpfs     4.9G     0  4.9G   0% /dev/shm

tmpfs          tmpfs     5.0M     0  5.0M   0% /run/lock

tmpfs          tmpfs     4.9G     0  4.9G   0% /sys/fs/cgroup

/dev/sda1      ext4      232M   51M  165M  24% /boot

tmpfs          tmpfs     999M     0  999M   0% /run/user/0

root@node01:~#

 

# xCAT ubuntu pre install scripts 위치

[root@xcatmgt01 scripts]# pwd

/opt/xcat/share/xcat/install/scripts

[root@xcatmgt01 scripts]#

/opt/xcat/share/xcat/install/ubuntu

 

 

 

# 디스크 파티션 스크립트 위치

문제이슈참고 https://github.com/cobbler/cobbler/issues/2138

자동설치 참고 URL https://kimmj.github.io/ubuntu/unattended-ubuntu/

 

https://xcat-docs.readthedocs.io/en/stable/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/cfg_partition.html

For Ubuntu, when nodeset runs and generates the /install/autoinst file for a node, it will replace the #XCA_PARTMAN_RECIPE_SCRIPT#

directive and add the execution of the contents of this script to the /install/autoinst/<node>.pre,

the /install/autoinst/<node>.pre script will be run in the preseed/early_command.

 

/install/autoinst/nodeXX.pre

 

# 파티션 설명

 

할당할 파티션에 대한 정보를 자세히 살펴봅시다. 먼저 루트 파티션입니다. 숫자 셋은 각각 최소 할당 크기(500), 우선순위(10000), 최대 할당 크기(1000000000)를 의미합니다. 할당할 파티션 크기는 MB 단위로 표현하며 우선순위는 낮은 숫자일수록 순위가 높음을 의미합니다.

새로 생성하는 파티션을 포맷(method{ format } format{ })하고 파티션에 ext4 형식의 파일 시스템을 생성(use_filesystem{ } filesystem{ ext4 })하고 루트 디렉터리로 마운트(mountpoint{ / })합니다.

 

500 10000 1000000000 ext4                       \

       method{ format } format{ }               \

       use_filesystem{ } filesystem{ ext4 }     \

       mountpoint{ / }                          \

 

다음은 스왑 파티션입니다. 최소 1024MB, 최대 2048MB로 할당하며 우선순위는 5000으로 루트 파티션(10000)보다 높습니다. 리눅스 스왑 파티션으로 포맷(method{ swap } format{ })해서 사용합니다. 우선순위가 높기 때문에 스왑 파티션이 먼저 최댓값에 근접하는 약 2GB 정도로 할당되며 루트 파티션이 나머지 용량을 채울 것입니다.

 

1024 5000 2048 linux-swap                       \

        method{ swap } format{ }                \

 

=========================================

 

Disk 파티션 방법 https://www.debian.org/releases/lenny/arm/apbs04.html.ko [중요]

Disk 파티션 방법 https://xcat-docs.readthedocs.io/en/stable/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/cfg_partition.html

 

파티션시 반드시 아래 스크립트를 참고

root@node01:/usr/share/doc/debian-installer/devel# cat partman-auto-recipe.txt

* debian-install web 에서 다운로드 할수 있음

 

 

Both "device{ ... }" and "vg_name{ }" are optional.

   

The device *must* be listed in partman-auto/disk.

SAMPLE

 

------------------------------------

 

 

echo "500 10000 1000000000 ext4" >> /tmp/partitionfile

echo "    $primary{}" >> /tmp/partitionfile

echo "    method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ / }" >> /tmp/partitionfile

echo "    ." >> /tmp/partitionfile

echo "2048 512 300% linux-swap" >> /tmp/partitionfile

echo "    $primary{}" >> /tmp/partitionfile

echo "    method{ swap } format{ }" >> /tmp/partitionfile

echo "    ." >> /tmp/partitionfile

 

echo "10240 512 1000000000 ext4" >> /tmp/partitionfile

echo "    method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /data }" >> /tmp/partitionfile

echo "    ." >> /tmp/partitionfile

---------------------------------------------------------