Avoiding data loss after removing NTFS usb without unmounting.
-
I have a Hardware with two USB plugs and pfSense on it. I want to configure one of them for FAT32 and another for NTFS.
fstab should be configured in that way that the USBs been mounted automatically.I added this two lines to the /etc/fstab:
/dev/da1s1 /mnt/usb1 ntfs mountprog=/usr/local/bin/ntfs-3g,rw,noauto,late 0 0 /dev/da2s1 /mnt/usb2 msdosfs rw,noauto,-m=777,-M=777 0 0
Now they will be automatically mounted if I insert proper USB but after removing them there is data loss by NTFS Format USB (FAT32 is ok).
how can i force NTFS usb to be written immidiately.
Can anybody help me to solve this problem? thanks. -
without unmounting chance of corruption is always there. doesn't matter what filesystem or even what type of operating system.
also: why?
-
@heper
yes i know about Chance of corruption, but also want to minimize possibility of data loss if someone forget to unmount the usb.
i searched in the net, there is some options for example "sync", i tried that but same result. All data are lost on NTFS without unmounting. -
@alivdel said in Avoiding data loss after removing NTFS usb without unmounting.:
how can i force NTFS usb to be written immidiately
I believe the sync command should do that. Why do you want both FAT32 and NTFS?
-
Removing a filesystem without unmounting it is always going to be a bad idea.
But more generally, as others have said, why are you doing this on pfSense?Steve
-
@jknott
i tried sync flag, it works on FAT32 but not on NTFS. -
@stephenw10
i want to use usb as DMZ and idea is to download and upload from/on usb.
and as i said i'm aware of problems happen if filesystem is removed without unmounting. it's only to minimize data loss in case that happened. -
@alivdel said in Avoiding data loss after removing NTFS usb without unmounting.:
i want to use usb as DMZ and idea is to download and upload from/on usb.
What? You can put a networking device or VM into a DMZ. You can't use an USB stick as a DMZ.
Also pfSense is a firewall, not a p2p server.
-
@grimson
thanks for your extra Information but do you have any idea about my main question? -
Don't use NTFS maybe?
Not at all clear on what you're doing here though.
Steve