원래 사용하던 서버-centos5 하드 용량 4테라 를 parted 사용해서 xfs 파일 시스템으로 사용중이었거든요
바로 이 하드에 데이터들을 백업 했었습니다.
근데 이번에 centos 7 로 업을 하고나서 백업했던 4테라를 마운트 하려고 보니까..
fdisk -l
Disk /dev/sdb: 4000.2 GB, ****41*52*630 bytes, 7812939776 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt
요렇게 나오구요...
마운트 명령 내리면
mount /dev/sdb /backup
mount: /dev/sdb is write-protected, mounting read-only
mount: unknown filesystem type '(null)'
이렇게 나요네요.....(마운트가 안됩니다.)
parted 로 실행 해서 print 해보면
parted /dev/sdb
GNU Parted 3.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: DELL PERC H710 (scsi)
Disk /dev/sdb: 4000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 17.4kB 4000GB 4000GB xfs
(parted)
이렇게 나오거든요...
이 하드를 안에 내용을 그대로 살린 채로 마운트를 해야 하는데요...
어떻게 해야 하는거죠?
parted 는 빈.. 새하드 포맷 해서 마운트 하는건 해봤는데
이렇게 내용이 들은 하드를 다른 리눅스에서 마운트 하는건
어떻게 하는지를 모르겠네요....
실전에서 쓰기 위해서는 파티션을 나눠서 장치이름의 끝에 숫자가 붙어야죠.
그래야 파티션 이름이 되니까요.
/dev/sdb1
/dev/sdb2
/dev/sdb3
.......
이런식으로
그상태 그대로 os 하드에 cent os 7을 설치 하고 마운트 하려고 보니 저상태 입니다.
데이터가 안전한 다른 장치에 모두 백업이 되어 있다면 파티션을 수동으로 복구해 보세요.
요즘은 parted 를 쓰지 않아도 fdisk에서 용량 2테라바이트가 넘는 디스크도 모두 잘 인식됩니다.
물론 포맷하면 안되구요.
fdisk 프로그램 써서 파티션만 수동으로 복구하는겁니다.
root@source: /root # fdisk /dev/sdb
Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sdb: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 9C85A413-6CE5-2B45-AFF3-69A5485228E9
Device Start End Sectors Size Type
/dev/sdb1 2048 7814037134 7814035087 3.7T Linux filesystem
Command (m for help):
Disk /dev/sdb: 4000.2 GB, 4000225165312 bytes, 7812939776 sectors
이렇게 fdisk 에 나와 있더라도
그냥
mount /dev/sdb1 /bkup 이렇게 하면 그냥 마운트 되네요...
답변 달아주신분들 감사합니다.
이렇게 해야 하지 않을까요
요즘 버전에서도 되는지는 모르겠네요