не удается подключить новый USB-накопитель 2T после форматирования в xfs - PullRequest
0 голосов
/ 20 сентября 2018

Получил новый диск и попытался смонтировать его на мою коробку Centos.Он пришел в формате NTFS, поэтому мне нужно переформатировать его.Я сделал:

sudo fdisk /dev/sdb 

Disk /dev/sdb: 2097.2 GB, 2097152000000 bytes, 4096000000 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: dos
Disk identifier: 0x00000000

sudo mkfs.xfs  -f /dev/sdb1

meta-data=/dev/sdb1              isize=512    agcount=4, agsize=127999936 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0, sparse=0
data     =                       bsize=4096   blocks=511999744, imaxpct=5
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=4096   blocks=249999, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

Затем я пытаюсь смонтировать его:

sudo mount -t xfs /dev/sdb1 /mnt/usbdisk/

mount: mount /dev/sdb1 on /mnt/usbdisk failed: Structure needs cleaning

sudo xfs_repair -L -d /dev/sdb1
Phase 1 - find and verify superblock...
couldn't verify primary superblock - not enough secondary superblocks with matching geometry !!!

attempting to find secondary superblock......

После множества часов точек я остановил его.

sudo xfs_db /dev/sdb1
Metadata CRC error detected at xfs_agf block 0x3d08fe01/0x200

xfs_db: cannot init perag data (-74). Continuing anyway.

xfs_db> sb
xfs_db>
xfs_db> p
magicnum = 0x58465342
blocksize = 4096
dblocks = 511999744
rblocks = 0
rextents = 0
uuid = 325afe96-3e18-4ac3-b5d0-34e9a9fa920a
logstart = 268435460
rootino = 64
rbmino = 65
rsumino = 66
rextsize = 1
agblocks = 127999936
agcount = 4
rbmblocks = 0
logblocks = 249999
versionnum = 0xb4a5
sectsize = 512
inodesize = 512
inopblock = 8
fname = "\000\000\000\000\000\000\000\000\000\000\000\000"
blocklog = 12
sectlog = 9
inodelog = 9
inopblog = 3
agblklog = 27
rextslog = 0
inprogress = 0
imax_pct = 5
icount = 64
ifree = 61
fdblocks = 511749721
frextents = 0
uquotino = 0
gquotino = 0
qflags = 0
flags = 0
shared_vn = 0
inoalignmt = 4
unit = 0
width = 0
dirblklog = 0
logsectlog = 0
logsectsize = 0
logsunit = 1
features2 = 0x18a
bad_features2 = 0x18a
features_compat = 0
features_ro_compat = 0
features_incompat = 0x1
features_log_incompat = 0
crc = 0xdc4288e2 (correct)
spino_align = 0
pquotino = 0
lsn = 0
meta_uuid = 00000000-0000-0000-0000-000000000000

Как мне восстановить этот новый дисковод обратно на чистый диск xfs, который я могу смонтировать в свою коробку Centos?

...