디스크 마운트 자동화
- sda data01 부터 sdaj data36 까지
- 디스크와 마운트 위치가 매칭되지 않을 경우 수정하여 사용 필요
- 작업 완료 후 df -h 명령어 결과값 자동 출력
#!/bin/bash
mount /dev/sda1 /data01
mount /dev/sdb1 /data02
mount /dev/sdc1 /data03
mount /dev/sdd1 /data04
mount /dev/sde1 /data05
mount /dev/sdf1 /data06
mount /dev/sdg1 /data07
mount /dev/sdh1 /data08
mount /dev/sdi1 /data09
mount /dev/sdj1 /data10
mount /dev/sdk1 /data11
mount /dev/sdl1 /data12
mount /dev/sdm1 /data13
mount /dev/sdn1 /data14
mount /dev/sdo1 /data15
mount /dev/sdp1 /data16
mount /dev/sdq1 /data17
mount /dev/sdr1 /data18
mount /dev/sds1 /data19
mount /dev/sdt1 /data20
mount /dev/sdu1 /data21
mount /dev/sdv1 /data22
mount /dev/sdw1 /data23
mount /dev/sdx1 /data24
mount /dev/sdy1 /data25
mount /dev/sdz1 /data26
mount /dev/sdaa1 /data27
mount /dev/sdab1 /data28
mount /dev/sdac1 /data29
mount /dev/sdad1 /data30
mount /dev/sdae1 /data31
mount /dev/sdaf1 /data32
mount /dev/sdag1 /data33
mount /dev/sdah1 /data34
mount /dev/sdai1 /data35
mount /dev/sdaj1 /data36
echo "`df -h`"
'Development > Shell script' 카테고리의 다른 글
[Shell Script] 유용한 Linux 명령어 활용 예시 : -F와 NR 활용 (0) | 2019.08.08 |
---|---|
[Linux][Shell Script] daemon start & stop script 예시 (25) | 2019.07.23 |
[Linux][Shell script] while / for 예시, 조건문 -f / -d (27) | 2019.07.23 |
[Shell Script] awk 자주쓰는 옵션 - BEGIN, print (0) | 2019.07.22 |
[Shell Script] disk_a24x.sh/disk_a36j.sh (디스크 포맷 및 parted 자동화 쉘 스크립트 예시) (0) | 2019.04.05 |