LMLPHP后院

磁盘分区的坑技术

maybe yes 发表于 2022-05-27 13:52

记录下分区的坑,总之,千万别用Windows自带的功能分,浪费不说,不兼容啊!

弄好了之后如下,umount /Volumes/下面的设备,重新挂载指定 rw,完美搞定。网上的一些消息说是希捷硬盘的问题,一下子颠覆了我的认知,为什么其他硬盘的 ntfs 在 mac 下可以读写,唯独希捷不行。

$ sudo diskutil list
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         500.3 GB   disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:                 Apple_APFS Container disk1         500.0 GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +500.0 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            98.1 GB    disk1s1
   2:                APFS Volume Preboot                 22.8 MB    disk1s2
   3:                APFS Volume Recovery                519.0 MB   disk1s3
   4:                APFS Volume VM                      1.1 GB     disk1s4

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *4.0 TB     disk2
   1:       Microsoft Basic Data seagate                 4.0 TB     disk2s1


$ df -h
Filesystem      Size   Used  Avail Capacity iused               ifree %iused  Mounted on
/dev/disk1s1   466Gi   91Gi  373Gi    20% 1083846 9223372036853691961    0%   /
devfs          194Ki  194Ki    0Bi   100%     673                   0  100%   /dev
/dev/disk1s4   466Gi  1.0Gi  373Gi     1%       1 9223372036854775806    0%   /private/var/vm
map -hosts       0Bi    0Bi    0Bi   100%       0                   0  100%   /net
map auto_home    0Bi    0Bi    0Bi   100%       0                   0  100%   /home
/dev/disk2s1   3.6Ti  181Mi  3.6Ti     1%      22          3906831475    0%   /Users/l/Work/seagate

最后发现,锅是 windows 背的,因为我使用 win10 和 win7 自带的磁盘管理工具初始化硬盘,然后格式化分区,这样不仅仅搞出来一个保留分区(给 MBR),浪费了尾部的几兆空间,最大的痛点是:在 MacOS 下开启了写入保护,无法写入硬盘,不排除有些软件可能可以做到,原生是不行的,我感觉这样特别的不好,所以建议大家千万千万不要使用 Win 自带的磁盘工具搞。我是开启了 ArchLinux 下的 Gnome 桌面的工具搞定的,这个工具不浪费空间。

$ sudo diskutil list
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         500.3 GB   disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:                 Apple_APFS Container disk1         500.0 GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +500.0 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            98.1 GB    disk1s1
   2:                APFS Volume Preboot                 22.8 MB    disk1s2
   3:                APFS Volume Recovery                519.0 MB   disk1s3
   4:                APFS Volume VM                      1.1 GB     disk1s4

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *4.0 TB     disk2
   1:         Microsoft Reserved                         16.8 MB    disk2s1
   2:       Microsoft Basic Data seagate                 4.0 TB     disk2s2


$ df -h
Filesystem      Size   Used  Avail Capacity iused               ifree %iused  Mounted on
/dev/disk1s1   466Gi   91Gi  373Gi    20% 1083278 9223372036853692529    0%   /
devfs          194Ki  194Ki    0Bi   100%     671                   0  100%   /dev
/dev/disk1s4   466Gi  1.0Gi  373Gi     1%       1 9223372036854775806    0%   /private/var/vm
map -hosts       0Bi    0Bi    0Bi   100%       0                   0  100%   /net
map auto_home    0Bi    0Bi    0Bi   100%       0                   0  100%   /home
/dev/disk2s2   3.6Ti  292Mi  3.6Ti     1%      34          3906701294    0%   /Volumes/seagate
2024-11-22 06:04:19 1732226659 0.019235