① 현재 파일시스템 정보 확인
hanadb:~# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 12G 0 12G 0% /dev
tmpfs 12G 0 12G 0% /dev/shm
tmpfs 12G 18M 12G 1% /run
tmpfs 12G 0 12G 0% /sys/fs/cgroup
/dev/sda2 19G 5.6G 12G 33% /
/dev/sda2 19G 5.6G 12G 33% /root
/dev/sda2 19G 5.6G 12G 33% /usr/local
/dev/sda2 19G 5.6G 12G 33% /tmp
/dev/sda2 19G 5.6G 12G 33% /home
/dev/sda2 19G 5.6G 12G 33% /boot/grub2/x86_64-efi
/dev/sda2 19G 5.6G 12G 33% /.snapshots
/dev/sda2 19G 5.6G 12G 33% /srv
/dev/sda2 19G 5.6G 12G 33% /var
/dev/sda2 19G 5.6G 12G 33% /boot/grub2/i386-pc
/dev/sda2 19G 5.6G 12G 33% /opt
tmpfs 2.4G 24K 2.4G 1% /run/user/462
tmpfs 2.4G 3.5M 2.4G 1% /run/user/0
/dev/sr0 3.8G 3.8G 0 100% /run/media/root/openSUSE-Leap-15.1-DVD-x86_64470
② 현재 블록 디바이스(디스크) 구성 정보 확인
hanadb:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 20G 0 disk
├─sda1 8:1 0 8M 0 part
├─sda2 8:2 0 18.6G 0 part /
└─sda3 8:3 0 1.4G 0 part [SWAP]
sdb 8:16 0 100G 0 disk
sdc 8:32 0 50G 0 disk
sdd 8:48 0 200G 0 disk
sde 8:64 0 80G 0 disk
sdf 8:80 0 150G 0 disk
sr0 11:0 1 3.8G 0 rom /run/media/root/openSUSE-Leap-15.1-DVD-x86_64470
③ 디스크에 파티션 생성
hanadb:~# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xed0ff200.
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): p (default 값 입력 시 별도 입력 없이 엔터만 쳐도 됨)
Partition number (1-4, default 1): 1 (default 값 입력 시 별도 입력 없이 엔터만 쳐도 됨)
First sector (2048-209715199, default 2048): 2048 (default 값 입력 시 별도 입력 없이 엔터만 쳐도 됨)
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-209715199, default 209715199): 209715199 (default 값 입력 시 별도 입력 없이 엔터만 쳐도 됨)
Created a new partition 1 of type 'Linux' and of size 100 GiB.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
④ 변경된 디스크 구성 확인
hanadb:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 20G 0 disk
├─sda1 8:1 0 8M 0 part
├─sda2 8:2 0 18.6G 0 part /
└─sda3 8:3 0 1.4G 0 part [SWAP]
sdb 8:16 0 100G 0 disk
└─sdb1 8:17 0 100G 0 part
sdc 8:32 0 50G 0 disk
sdd 8:48 0 200G 0 disk
sde 8:64 0 80G 0 disk
sdf 8:80 0 150G 0 disk
sr0 11:0 1 3.8G 0 rom /run/media/root/openSUSE-Leap-15.1-DVD-x86_64470
⑤ 위에서 생성한 파티션에 파일시스템 생성 (ext4 파일시스템)
hanadb:~# mkfs.ext4 /dev/sdb1
mke2fs 1.43.8 (1-Jan-2018)
Creating filesystem with 26214144 4k blocks and 6553600 inodes
Filesystem UUID: 6de3139f-a067-4ebf-9f35-9350e7b6856b
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
Allocating group tables: done
Writing inode tables: done
Creating journal (131072 blocks): done
Writing superblocks and filesystem accounting information: done
⑥ 마운트 할 디렉터리 생성 (Optional -> 기존 디렉터리 활용 가능)
hanadb:~# mkdir /hana
hanadb:~# mkdir /hana/shared
⑦ 디렉터리에 파일시스템 마운트
hanadb:~# mount /dev/sdb1 /hana/shared
⑧ 변경된 파일시스템 정보 확인
hanadb:~# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 12G 0 12G 0% /dev
tmpfs 12G 0 12G 0% /dev/shm
tmpfs 12G 18M 12G 1% /run
tmpfs 12G 0 12G 0% /sys/fs/cgroup
/dev/sda2 19G 5.6G 12G 33% /
/dev/sda2 19G 5.6G 12G 33% /root
/dev/sda2 19G 5.6G 12G 33% /usr/local
/dev/sda2 19G 5.6G 12G 33% /tmp
/dev/sda2 19G 5.6G 12G 33% /home
/dev/sda2 19G 5.6G 12G 33% /boot/grub2/x86_64-efi
/dev/sda2 19G 5.6G 12G 33% /.snapshots
/dev/sda2 19G 5.6G 12G 33% /srv
/dev/sda2 19G 5.6G 12G 33% /var
/dev/sda2 19G 5.6G 12G 33% /boot/grub2/i386-pc
/dev/sda2 19G 5.6G 12G 33% /opt
tmpfs 2.4G 24K 2.4G 1% /run/user/462
tmpfs 2.4G 3.5M 2.4G 1% /run/user/0
/dev/sr0 3.8G 3.8G 0 100% /run/media/root/openSUSE-Leap-15.1-DVD-x86_64470
/dev/sdb1 98G 61M 93G 1% /hana/shared
⑨ 재부팅 후에도 마운트 지속되도록 fstab에 추가
hanadb:~# vi /etc/fstab
/dev/sdb1 /hana/shared/ ext4 defaults 0 0
'Linux' 카테고리의 다른 글
netstat: command not found 해결 방법 (arp, route, iptunnel, ipmaddr, ifconfig 동일) (0) | 2020.01.19 |
---|---|
openSUSE의 릴리즈 정보를 SLES로 바꾸기(속이기) (0) | 2020.01.17 |
Xming(X Window) 설치 및 Putty 연동 (Step by Step) (1) | 2020.01.15 |
SuSE 네트워크 설정 (NetworkManager vs Wicked) (0) | 2020.01.13 |
openSuSE 리눅스 Hostname 설정 (Step by Step) (0) | 2020.01.12 |