내맘대로긍정이 알려주는
Oracle 23ai 신기능
무료 세미나 발표자료
다운로드
trending_flat
OS환경 : Oracle Linux 4.8 (64bit)
방법 : Oracle Linux 4 새로넣은 디스크 mount 시키기
기존 환경에 20gb 크기의 디스크를 추가한뒤 기동한 상태
fdisk -l 로 디스크 확인
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 535 4192965 82 Linux swap
/dev/sda3 536 5221 37640295 83 Linux
Disk /dev/sdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
|
20GB 디스크를 추가한 상태
/dev/sdb 부분 확인
fdisk 명령으로 파티션 설정
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 2610.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n [n 입력]
Command action
e extended
p primary partition (1-4)
p [p 입력]
Partition number (1-4): 1
First cylinder (1-2610, default 1): [엔터 입력]
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-2610, default 2610): [엔터 입력]
Using default value 2610
Command (m for help): w [w 입력]
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
|
n
p
1
엔터
엔터
w
로 설정
fdisk -l 로 디스크 확인
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 535 4192965 82 Linux swap
/dev/sda3 536 5221 37640295 83 Linux
Disk /dev/sdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 2610 20964793+ 83 Linux
|
/dev/sdb1 이 만들어짐
현재 사용중인 파일시스템 확인
1
2
3
4
5
|
# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda3 ext3 36G 8.6G 26G 26% /
/dev/sda1 ext3 99M 14M 81M 15% /boot
none tmpfs 2.0G 0 2.0G 0% /dev/shm
|
ext3 파일시스템을 사용중임(Linux 4 기본 Filesystem xfs)
ext3 파일시스템으로 포맷
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# mkfs.ext3 /dev/sdb1
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
2621440 inodes, 5241198 blocks
262059 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
160 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 24 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
|
마운트 할 경로 생성
1
|
# mkdir /oradata1
|
마운트 및 확인
1
2
3
4
5
6
7
|
# mount /dev/sdb1 /oradata1
# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda3 ext3 36G 8.6G 26G 26% /
/dev/sda1 ext3 99M 14M 81M 15% /boot
none tmpfs 2.0G 0 2.0G 0% /dev/shm
/dev/sdb1 ext3 20G 76M 19G 1% /oradata1
|
정상적으로 마운트됨
시스템 재시작 후에도 마운트를 유지하기 위해 /etc/fstab 내용을 수정
1
2
3
4
5
6
7
8
9
10
11
|
# vi /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
LABEL=SWAP-sda2 swap swap defaults 0 0
/dev/hdc /media/cdrecorder auto pamconsole,exec,noauto,managed 0 0
/dev/sdb1 /oradata1 ext3 defaults 0 0
|
파란색 표시한 내용 추가 후 저장
참조 :
리눅스6 새로넣은 디스크 mount 시키기 ( https://positivemh.tistory.com/259 )
Oracle Linux 7 새로넣은 디스크 mount 시키기 ( https://positivemh.tistory.com/664 )
'Linux, Unix > Tip' 카테고리의 다른 글
Oracle Linux 7 특정 날짜에 생성(수정)된 파일 개수 확인 (0) | 2023.07.05 |
---|---|
Oracle Linux 7 cpu 나 memory 많이 사용하는 프로세스 찾기 (0) | 2023.02.12 |
Oracle Linux 7 Jumbo Frames(점보 프레임) MTU (0) | 2021.05.18 |
Solaris 11 hostname 변경 방법 (0) | 2021.05.03 |
Solaris 11 ssh 포트 변경 방법 (0) | 2021.05.03 |