LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Is it necessary to unmount other partitions (like Windows ntfs ones) before shutdown? (http://www.linuxquestions.org/questions/linux-hardware-18/is-it-necessary-to-unmount-other-partitions-like-windows-ntfs-ones-before-shutdown-4175450676/)

Vexe 02-18-2013 11:01 AM

Is it necessary to unmount other partitions (like Windows ntfs ones) before shutdown?
 
Hi, I have 4 partitions, 1: ext4 for Linux, 2: ntfs for windows, 3: ntfs for data, 4: ntfs extra. On boot, I mount both the 2nd and 3rd partition (via the fstab file).

Is it really important to unmount them before shutdown? OR is it that Linux does this autumatically for me?

I'm asking cuz I had an accident once, with this mounting/unmounting thing, lost everything in a partition.

This is how I mount a partition: mount /dev/sdxx /mnt/dir
And this is how I unmount them: umount /mnt/dir

If it's important to unmount them before shutdown, one might forget, so is there a way to unmount them automatically on shutdown, just like how we did on mounting them on booting via fstab? just like a destructor in programming.

Thanks!

ukiuki 02-18-2013 11:25 AM

You can shutdown the machine via software w/o any problem, the system will unmount everything before turn off the machine.
You should post this under software, just a thought.

Regards

nonamedotc 02-18-2013 11:27 AM

As far as I know, you do not have to manually unmount the partitions. The entries in fstab should be unmounted automatically during shutdown.

Also, in my experience, I have never had to manually unmount *any* partition during shutdown. I have also lost data when I accidentally unplugged a hard disk when data writing was in progress.

business_kid 02-20-2013 12:58 PM

Most distros unmount everything in /etc/mtab i.e. everything mounted with a umount -a or similar and remount / read only before closing.

selfprogrammed 02-22-2013 11:07 PM

To lose a partition like that, something else had to have happened that has not been mentioned. Not waiting for the shutdown to complete before yanking a power cord, or a power failure during a storm sometimes will do it or even introduce a logical defect that later evolves into failure. But most often, some damaging command was done 2 hours earlier during a flurry of maintenance activity.


All times are GMT -5. The time now is 03:51 AM.