차이

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

차이 보기로 링크

양쪽 이전 판이전 판
다음 판
이전 판
tech:hdd_mount [2022/12/03 11:48] – [기타] 141.101.86.5tech:hdd_mount [2024/04/29 16:57] (현재) – [fstab 설명] 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 마운트)=====
줄 107: 줄 113:
  
    
-=====fstab 설명===== +[[fstab]] 설명 참조
-한줄에 하나의 장치를 넣는다. +
-여섯개의 칸이 있다.  +
- +
-  /dev/sdb1       /data           ext4    defaults           2 +
- +
-  - 연결할 디바이스 명을 입력한다. +
-  - 연결될 폴더 +
-  - 파일시스템의 종류를 나타낸다  +
-     * dos +
-     * ext2 +
-     * ext3 +
-     * ext4 +
-     * nfs +
-     * swap +
-     * vfat  +
-  - 옵션 +
-    *  default : 기본 +
-    *  noquota : 쿼타 사용안함 +
-    *  nosuid : SUID접근 불가능 +
-    *  quota : 쿼터 사용 +
-    *  ro : 읽기 가능 +
-    *  rw : 읽기 쓰기 가능 +
-    *  suid: SUID접근 가능 +
-    * uid=1000,gid=1000 : 소유자 및 그룹 +
-    * umask=007 :퍼미션 마스크 +
-  - 파일시스템이 덤프될 필요가 있는지를 설정한다. +
-    * 0 : 덤프될 필요없음 +
-    * 1 : 덤프 필요합 +
-  - fsck에 의해 수행되는 무결성 검사를 위한 파일시스템 우선순위를 결정한다. +
-    * 0 : 체크 안함. 이동식드라이브  +
-    * 1 : 우선적으로 체크. 부트 드라이브. +
-    * 2 : 1번이 끝난 후 체크. 기타 다른 모든 장비들.+
  
 =====NTFS vs NTFS-3G===== =====NTFS vs NTFS-3G=====
줄 154: 줄 128:
 ====== 새하드 포맷====== ====== 새하드 포맷======
  
 +[[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                                                               
줄 169: 줄 143:
   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.