Bagaimana memformat & me-mount partisi besar dengan ukuran sektor 4k di Freebsd?

9

gpart show -l:

=>        6  146239733  da0  GPT  (558G)
          6         10       - free -  (40K)
         16        128    1  (null)  (512K)
        144     262144    2  efi  (1.0G)
     262288    1048576    3  rootfs  (4.0G)
    1310864    2097152    4  swap  (8.0G)
    3408016    1048576    5  nextroot  (4.0G)
    4456592     102400    6  var  (400M)
    4558992   13107200    7  raw  (50G)
   17666192     524288    8  godspeed  (2.0G)
   18190480  128049248    9  data  (488G)
  146239728         11       - free -  (44K)

df -T :

Filesystem         Type      1K-blocks     Used     Avail Capacity  Mounted on
/dev/gpt/rootfs    ufs         1048412   983276    -18736   102%    /
devfs              devfs             1        1         0   100%    /dev
/dev/gpt/efi       msdosfs     1046516       64   1046452     0%    /efi
/dev/gpt/var       ufs          395896    26712    337520     7%    /var
/dev/gpt/godspeed  ufs         2031132      128   1868516     0%    /var/db/godspeed
/dev/gpt/data      ufs       504159728 30075728 433751232     6%    /data
procfs             procfs            4        4         0   100%    /proc
linprocfs          linprocfs         4        4         0   100%    /compat/linux/proc
linsysfs           linsysfs          4        4         0   100%    /compat/linux/sys

Saya memiliki sistem FreeBSD dengan partisi di atas dan titik mount. Partisi 7 adalah partisi mentah yang saya coba format dengan sistem file baru, tapi saya tidak bisa. Saya mencoba ext2 dan juga format sistem file msdosfs.

 Name: da0p7
   Mediasize: 53687091200 (50G)
   Sectorsize: 4096
   Stripesize: 0
   Stripeoffset: 1493762048
   Mode: r1w1e1
   rawuuid: 2c6e7bfe-1123-11e7-9ad6-cc46d6fc5c66
   rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b
   label: raw
   length: 53687091200
   offset: 18673631232
   type: freebsd-ufs
   index: 7
   end: 17666191
   start: 4558992

pod0201-wsa11:rtestuser 36] ./newfs_msdos -F32 /dev/da0p7
newfs_msdos: trim 50 sectors to adjust to a multiple of 63
/dev/da0p7: 13106688 sectors in 204792 FAT32 clusters (262144 bytes/cluster)
BytesPerSec=4096 SecPerClust=64 ResSectors=4 FATs=2 Media=0xf0 SecPerTrack=63 Heads=255 HiddenSecs=0 HugeSectors=13107150 FATsecs=200 RootCluster=2 FSInfo=1 Backup=2
pod0201-wsa11:rtestuser 37] 
pod0201-wsa11:rtestuser 47] ./mount_msdosfs /dev/da0p7 /data/raw
mount_msdosfs: /dev/da0p7: Invalid argument
pod0201-wsa11:rtestuser 48] ./mount_msdosfs -o large /dev/da0p7 /data/raw
mount_msdosfs: /dev/da0p7: Invalid argument

pod0201-wsa11:rtestuser 58] fdisk /dev/da0p7
fdisk: could not detect sector size
pod0201-wsa11:rtestuser 59] 

Pembaruan 1: Saya mendapatkan kesalahan di bawah ini saat memformat dengan ext2:

pod0201-wsa11:rtestuser 102] mke2fs /dev/da0p7
mke2fs 1.42.10 (18-May-2014)
Warning: could not erase sector 2: Attempt to write block to filesystem resulted in short write
Creating filesystem with 13107200 4k blocks and 3276800 inodes
Filesystem UUID: a8714ba0-7554-430a-a484-3e56e5a088ee
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424

Allocating group tables: done                            
Warning: could not read block 0: Attempt to read block from filesystem resulted in short read
Warning: could not erase sector 0: Attempt to write block to filesystem resulted in short write
Writing inode tables: done                            
Writing superblocks and filesystem accounting information:   0/400
Warning, had trouble writing out superblocks.pod0201-wsa11:rtestuser 103] ?
?: No match.

Apakah saya perlu menangani hard disk ukuran sektor 4k secara berbeda?

Hari ini saya dapat memformat drive dengan msdosfs:

pod0201-wsa02:rtestuser 17] ./newfs_msdos   -F 32 -S 4096 -c 1 -m 0xf8 /dev/da0p7 
newfs_msdos: trim 48 sectors to adjust to a multiple of 63
/dev/da0p7: 78489846 sectors in 78489846 FAT32 clusters (4096 bytes/cluster)
BytesPerSec=4096 SecPerClust=1 ResSectors=4 FATs=2 Media=0xf8 SecPerTrack=63 Heads=255 HiddenSecs=0 HugeSectors=78643152 FATsecs=76651 RootCluster=2 FSInfo=1 Backup=2

pod0201-wsa02:rtestuser 19] mkdir raw
pod0201-wsa02:rtestuser 20] cd /

pod0201-wsa02:rtestuser 22] mount -t msdosfs -o large /dev/da0p7 /data/raw
pod0201-wsa02:rtestuser 23]
Satpal Parmar
sumber
Apa yang terjadi ketika Anda mencoba ext2? Dan apakah Anda mencoba UFS?
JdeBP
@JdeBP Silakan lihat pembaruan. BSD OS yang sama berfungsi dengan baik pada HDD dengan ukuran 512 bagian. BSD versi kernel 10.1 jadi saya tidak mengharapkan masalah dukungan sistem file yang hilang.
Satpal Parmar
Tampaknya tipe partisi untuk da0p7diatur ke freebsd-ufsdan berisi sistem file msdosfs. Saya tidak yakin, apakah ini mungkin menjadi masalah.
Martin Sugioarto

Jawaban:

0

silakan lihat man gpart&& man newfs. ;)

Untuk menutupi tata letak disk Anda yang terdaftar. Berikut ini sudah cukup

gpart delete -i 7 da0

Dengan asumsi Anda menginginkan partisi MSDOS FAT32 dengan fat32 sebagai labelnya

gpart add -t fat32 -l fat32 -i 7 da0

Sekarang mari kita format irisan / partisi itu, dan beri label FAT32 :)

newfs_msdos -F32 -L FAT32 /dev/gpt/fat32

Selesai Oh, mau memasangnya?

mount -t msdos /dev/gpt/fat32 /mnt/

Lihat juga:

gpart

newfs

newfs_msdos

HTH

seseorang
sumber