๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
Computer Science/Linux (Ubuntu)

14 ํ•˜๋“œ๋””์Šคํฌ ์žฅ์ฐฉ (SCSI)

by Dowon Kang 2024. 2. 9.

๊ฐ€์ƒ ์„œ๋ฒ„์— ๋ฌผ๋ฆฌ์ ์ธ ํ•˜๋“œ๋””์Šคํฌ๋ฅผ ์žฅ์ฐฉํ•˜๊ณ  ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ํ™˜๊ฒฝ์„ ์‹ค์Šตํ•ด ๋ด…๋‹ˆ๋‹ค. 

 

๋จผ์ €, ์„œ๋ฒ„์— ์ƒˆ๋กœ์šด ํ•˜๋“œ๋””์Šคํฌ(SCSI) 1GB๋ฅผ ์ถ”๊ฐ€๋กœ ์žฅ์ฐฉํ•œ ๋‹ค์Œ์— ์„œ๋ฒ„๋ฅผ ์‹คํ–‰์‹œํ‚ต๋‹ˆ๋‹ค.

 

 

ํŒŒํ‹ฐ์…˜ ๋งŒ๋“ค๊ธฐ fdisk

ํ„ฐ๋ฏธ๋„์—์„œ fdisk๋กœ ํŒŒํ‹ฐ์…˜ ๋ช…๋ น์–ด ์ž…๋ ฅ 

root@server:~/๋ฐ”ํƒ•ํ™”๋ฉด# fdisk /dev/sdb

Welcome to fdisk (util-linux 2.34).
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 0x2d3dee30.

Command (m for help):

 

m์„ ์ž…๋ ฅ์‹œ ๋‹ค์–‘ํ•œ ๋ช…๋ ์–ด ํ™•์ธ ๊ฐ€๋Šฅ 

 

๋ฌผ๋ฆฌ์ ์ธ ํ•˜๋“œ๋””์Šคํฌ์— ์ƒˆ๋กœ์šด ํŒŒํ‹ฐ์…˜ ์ƒ์„ฑ (ํŒŒํ‹ฐ์…˜์€ ์ด 4๊ฐœ๋กœ ๋ถ„ํ•  ๊ฐ€๋Šฅ)

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
Partition number (1-4, default 1): 1
First sector (2048-2097151, default 2048): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-2097151, default 2097151): 

Created a new partition 1 of type 'Linux' and of size 1023 MiB.

 

๋ถ„ํ• ์„ ์›ํ•  ๊ฒฝ์šฐ Partition number์—์„œ ์›ํ•˜๋Š” ๋งŒํผ์˜ ํŒŒํ‹ฐ์…˜ ๊ฐœ์ˆ˜ ์ž…๋ ฅ, ๊ทธ๋ฆฌ๊ณ  300m ์ด๋Ÿฐ์‹์œผ๋กœ ํŒŒํ‹ฐ์…˜ ์ง€์ •. ์ž์„ธํ•œ ์‚ฌํ•ญ์€ ์ฑ—์ง€ํ”ผํ‹ฐ๋‚˜ ๊ตฌ๊ธ€์„ ํ†ตํ•ด ๊ฒ€์ƒ‰

 

์ ์šฉ์€ w 

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

 

 

ํŒŒ์ผ์‹œ์Šคํ…œ ์ƒ์„ฑ(ํฌ๋งท)

mkfs.ext4 /dev/sdb1

 

 

Mount

mkdir /mydata // ์ž„์˜์˜ ํŒŒ์ผ ์ƒ์„ฑ 
mount /dev/sdb1 /mydata  // mount 
df // ํ™•์ธ ๋ช…๋ น์–ด

 

 

Reboot ํ•ด๋„ ์œ ์ง€ํ•˜๋Š” ๋ฐฉ๋ฒ•

gedit /etc/fstab

-- in the file
/dev/sdb1	/mydata		ext4		defaults	0		0

 

 

'Computer Science > Linux (Ubuntu)' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

16 ์ฟผํ„ฐ(quota)  (1) 2024.02.09
15 RAID, LVM  (0) 2024.02.09
13 SATA & SCSI  (0) 2024.02.08
12 ์—ฌ๋Ÿฌ๊ฐ€์ง€ ํ”„๋กœ๊ทธ๋žจ  (0) 2024.02.08
11 ์‘๊ธ‰๋ณต๊ตฌ (feat, GRUB ๋ถ€ํŠธ๋กœ๋”)  (0) 2024.02.08

๋Œ“๊ธ€