차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판이전 판
다음 판
이전 판
마지막 판양쪽 다음 판
tech:hdd_mount [2021/09/17 08:50] V_Ltech:hdd_mount [2024/04/15 23:11] – [고정 하드디스크 추가] V_L
줄 4: 줄 4:
 그냥 꼽는다고 저절로 D: 이런식으로 추가되는 것은 아니다. 따로 설정을 해줘야 한다. 그냥 꼽는다고 저절로 D: 이런식으로 추가되는 것은 아니다. 따로 설정을 해줘야 한다.
  
-=====고정 하드디스크 추가 방법=====+=====고정 하드디스크 추가=====
 일단 접속된 하드디스크들을 알아본다. 일단 접속된 하드디스크들을 알아본다.
   sudo fdisk -l   sudo fdisk -l
줄 29: 줄 29:
  
  
 +  UUID=a9e6062b-2fe4-4e33-a28d-46f71dd9b243 /mnt/back ext4 defaults 0 0
 +
 +==== UUID 확인====
 +디스크를 연결한 채로 blkid 를 실행
 +
 +  blkid | grep '/dev/sda'
 +  /dev/sda1: UUID="a9e6062b-2fe4-4e33-a28d-46f71dd9b243" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="primary" PARTUUID="0b8ae78d-3631-401d-a915-88d95fe1ca7f"
  
-   /dev/backup/data  /home/backup ext4 defaults 0 0 
  
 =====임시 연결    (USB HDD 마운트)===== =====임시 연결    (USB HDD 마운트)=====
줄 39: 줄 45:
   sudo mkdir /media/external                         # 연결할 폴더만들기   sudo mkdir /media/external                         # 연결할 폴더만들기
   sudo mount -t vfat /dev/sdb1 /media/external       # FAT 마운트   sudo mount -t vfat /dev/sdb1 /media/external       # FAT 마운트
-  sudo mount -t ntfs-3g /dev/sdb1 /media/external    # NTFS 마운트 +  sudo mount -t ntfs3 /dev/sdb1 /media/external    # NTFS 마운트 
 +  sudo mount -t ntfs3 --rw /dev/sdg1 /media/external    # 자동 마운트, 쓰기 가능 
 +  
   sudo mount -w /dev/sdb1 /mnt/data -o umask=000,iocharset=cp949,utf8   sudo mount -w /dev/sdb1 /mnt/data -o umask=000,iocharset=cp949,utf8
  
줄 50: 줄 57:
 lrwxrwxrwx 1 root root 10 2011-12-12 23:23 7d35a2df-fe23-4618-98f9-495ba6409ad8 -> ../../sda5 lrwxrwxrwx 1 root root 10 2011-12-12 23:23 7d35a2df-fe23-4618-98f9-495ba6409ad8 -> ../../sda5
 )) ))
 +
 +====NTFS====
 +
 +  * ntfs - 왕거지.
 +  * ntfs-3g - 거지. 
 +  * ntfs3 - 평민. 리눅스 커널 5.15 이후부터 지원됨. paragon
 +
  
 =====ISO파일 마운트===== =====ISO파일 마운트=====
줄 69: 줄 83:
  
   -  cat /etc/fstab  마운트 정보 확인    -  cat /etc/fstab  마운트 정보 확인 
-  -  fdisk /dev/hdb + 
 +[[fdisk]]로 파티션 생성 
 +   fdisk /dev/hdb  
     * p로 기존 파티션 확인      * p로 기존 파티션 확인 
     * d로 기존 파티션 삭제      * d로 기존 파티션 삭제 
     * n으로 파티션 추가 (p->1->크기지정 default 1 입력) full로 잡을시, 디폴트가 full      * n으로 파티션 추가 (p->1->크기지정 default 1 입력) full로 잡을시, 디폴트가 full 
     * w로 쓴다      * w로 쓴다 
 +
   - 포맷   - 포맷
     * ext4:    mkfs.ext4 /dev/sda2     * ext4:    mkfs.ext4 /dev/sda2
줄 142: 줄 160:
 ====== 새하드 포맷====== ====== 새하드 포맷======
  
 +[[fdisk]] 는 최대 2Tb 크기의 파티션을 지원한다. 그 이상의 파티션은 [[parted]]를 사용하면 된다.
 +
 +  fdisk /dev/sda
  
 Now to make a new partition. Now to make a new partition.
-Press n <enter> (for new), then p <enter> (for primary), then 1 <enter> and then simply press enter for the next two questions. +
-This will make a new partition that uses the entire disk. If you want more complex partitioning then read the fdisk manual (man fdisk) or use parted or some other app. +
-Here's what we did with n, the values will differ from yours: +
-Code:+
   Command (m for help): n                                                          Command (m for help): n                                                       
   Command action                                                                  Command action                                                               
줄 157: 줄 175:
   Using default value 197                                                         Using default value 197                                                      
   Last cylinder or +size or +sizeM or +sizeK (197-621, default 621): +128M   Last cylinder or +size or +sizeM or +sizeK (197-621, default 621): +128M
 +
 +Press n <enter> (for new), then p <enter> (for primary), then 1 <enter> and then simply press enter for the next two questions.
 +This will make a new partition that uses the entire disk. If you want more complex partitioning then read the fdisk manual (man fdisk) or use parted or some other app.
 +Here's what we did with n, the values will differ from yours:
 + 
 +
  
 Now to write the new partion and exit, press w and enter. Now to write the new partion and exit, press w and enter.