서버 13

심볼릭 링크(Symbolic Link, Soft Link) 와 하드링크(hard Link)

심볼릭 링크란 : 실제 파일(원본데이터)의 바로가기 형식의 파일로 원본데이터가 손상되면 해당 파일도 엑세스 할수 없음. 다른 inode를 생성함.하드 링크란 : 실제 파일(원본데이터)와 동일한 inode 번호를 부여하여 엑세스 함, 원본 데이터가 손상되더라도 엑세스 가능함.심볼릭 링크(=소프트 링크) 설정 명령어 ln -s 원본파일이름 소프트링크 파일명ln -s original_file.txt softlink_file.txt하드링크 설정 명령어 ln original_file.txt hardlink_file.txt실제 하드링크에서 add World 라는 글을 추가 한 후 다른 파일에서 읽을경우 아래와 같이 동일하게 표시가 됨.원본데이터 삭제 시 (original_file.txt)원본데이터 손상으로 심볼릭..

서버/리눅스 2025.06.02

[리눅스] scsi 볼륨 용량 늘리는 작업

*스토리지에서 볼륨 Resize 후 서버에서 리스캔 및 확장된 볼륨을 다시 파티션을 진행해야 합니다.아래 절차로 진행[root@rhel1 ~]# iscsiadm -m session --rescan[root@rhel1 ~]# for host in /sys/class/scsi_host/host*; do echo "- - -" > $host/scan; done[root@rhel1 ~]# multipath -ll[root@rhel1 ~]# df -h[root@rhel1 ~]# resize2fs /dev/mapper/netappdisk1* 해당 명령어는 포멧방식이 ext4 일경우 'resize2fs' 의 명령어며, 다른 포멧형식은 별도의 명령어 확인이 필요.[root@rhel1 ~]# df -h테스트 환경에서는 ..

서버/리눅스 2024.09.10

[리눅스] lvm 생성

lvm 패키지 설치[root@rhel1 ~]# yum install lvm2pv 생성할 mapper 파티션 확인[root@rhel1 ~]# ls /dev/mapper/# 물리적 볼륨(Physical Volume, PV) 생성[root@rhel1 ~]# pvcreate /dev/mapper/mpath0[root@rhel1 ~]# pvcreate /dev/mapper/mpath1 # 볼륨 그룹(Volume Group, VG) 생성[root@rhel1 ~]# vgcreate vg-data /dev/mapper/mpath0 /dev/mapper/mpath1만일 추가로 붙일 파티션이 있다면 다른 명령어로 연결 할 수 있습니다.[root@rhel1 ~]# vgextend vg-data /dev/mapper/mpat..

서버/리눅스 2024.09.05

[리눅스] multipath alias 설정

[root@rhel1 ~]# systemctl enable multipathd [root@rhel1 ~]# systemctl start multipathd [root@rhel1 ~]# multipath -ll* 3600a0980774f6a34663f58354f2f5355 숫자를 별도로 메모장 같은곳에서 기입[root@rhel1 ~]# vi /etc/multipath.confmultipaths {     multipath {         wwid    3600a0980774f6a34663f58354f2f5355         alias   mpath0     }}해당 문구를 입력해준다. 만일 multipath 볼륨이 많다면 아래와 같이 설정해주면 됩니다.[root@rhel1 ~]# multipath -l..

서버/리눅스 2024.09.05

리눅스 멀티패스 (multipath.conf)

1) multipath 설치 # yum install *mapper* # multipath -ll //multipath.conf 파일이 없으므로 위와 같은 메시지가 발생 2-1) multipath.conf copy 및 restart # cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf /etc/ # systemctl start multipathd.service # multipath -ll 2-2) multipath.conf 파일 생성 # mpathconf --enable # systemctl start multipathd.service //2가지 방법중에 하나를 선택하면 됨.​

서버/리눅스 2024.02.20