Thursday, 3 January 2019

Multiple partitions shown on FreeBSD when disk is formatted NTFS in Windows

A new 4TB USB disk was prepared for FreeBSD and formatted as NTFS using Windows 10.

The previous disk when connected was shown as /dev/da1s1
However the new device had to be mounted as /dev/da1p2

Trying to mount with
ntfs-3g /dev/da1p2s1 /mnt/usb
threw the error
The device '/dev/da1p2s1' doesn't seem to have a valid NTFS.

Why the difference?

Looking at gpart show /dev/da1 it indicates

=>        34  7814037100  da1  GPT  (3.6T)
          34      262144    1  !e3c9e316-0b5c-4db8-817d-f92df00215ae  (128M)
      262178        2014       - free -  (1.0M)
      264192  7813771264    2  !ebd0a0a2-b9e5-4433-87c0-68b6b72699c7  (3.6T)
  7814035456        1678       - free -  (839K)

The first partition is a 128M Microsoft Reserved Partition.
The usable data exists in partition 2.

To mount the drive for copying data use:
mkdir /mnt/usb
kldload fuse
ntfs-3g /dev/da1p2 /mnt/usb
rsync -av --ignore-errors --exclude .recycle /mnt/Data /mnt/usb

Note if you want to exclude directories, they are relative to the source folder, and the presence or absence of slashes is important.

rsync -av --ignore-errors --exclude 'Andrew/Bulgaria' /mnt/Data /mnt/usb


No comments:

Post a Comment