윈도우 파일 백업용으로 사용하던 삼성 T7 SSD를 우분투 서버에서 쓰기 위해,
ext4 file system 으로 포맷 후 마운트 하기 까지의 내용을 담아본다.
서버에 USB로 연결 후 확인
# fdisk -l
Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: PSSD T7
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33553920 bytes
Disklabel type: dos
Disk identifier: 0x2b01b7a3
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 1953522112 1953520065 931.5G 7 HPFS/NTFS/exFAT
파티셔닝
# parted /dev/sda
GNU Parted 3.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt
Warning: The existing disk label on /dev/sda will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? yes
(parted) print
Model: Samsung PSSD T7 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
(parted) unit TB
(parted) mkpart data1 0 100%
(parted) print
Model: Samsung PSSD T7 (scsi)
Disk /dev/sda: 1.00TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 0.00TB 1.00TB 1.00TB data1
(parted) quit
Information: You may need to update /etc/fstab.
포맷
# mkfs.ext4 /dev/sda1
mke2fs 1.45.5 (07-Jan-2020)
Creating filesystem with 244175218 4k blocks and 61046784 inodes
Filesystem UUID: 1f0130ae-ce70-4511-b484-fd01d0851dec
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848
Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done
UUID 확인
# blkid | grep sda1
/dev/sda1: UUID="1f0130ae-ce70-4511-b484-fd01d0851dec" TYPE="ext4" PARTLABEL="data1" PARTUUID="811d6854-ddb4-4539-806d-3107ed105c2e"
마운트
# mount /dev/sda1 /data
부팅 시 자동 마운트 되도록 설정
UUID 복사 후 /etc/fstab 수정
# vi /etc/fstab
아래 내용 추가
UUID=1f0130ae-ce70-4511-b484-fd01d0851dec /data ext4 defaults 0 0
[VS Code] Remote SSH 접속 시 패스워드 계속 입력하라고 할 때 (0) | 2022.08.12 |
---|---|
Ubuntu 16.04 LTS 에서 20.04 LTS 로 업그레이드 하기 (0) | 2021.12.15 |
[unzip] Error while unzipping: need PK compat. v5.1 (can do v4.6) (0) | 2021.08.12 |
[Ubuntu] GIT 서버 설치 및 기본 설정 (0) | 2021.07.19 |
[Ubuntu] SVN Server 설치 및 설정 (0) | 2021.07.15 |