Is there any way to unmount an ext4 filesystem without shutting down?
I can do it easily by going to single-user mode or removing the filesystem from /etc/fstab and rebooting but both of these require the system to be shut down.
However it seems to be impossible otherwise because the journalling process makes the filesystem busy. Is this right?
On 10 Jan 2017 14:29, "Chris Green" cl@isbd.net wrote:
Is there any way to unmount an ext4 filesystem without shutting down?
I can do it easily by going to single-user mode or removing the filesystem from /etc/fstab and rebooting but both of these require the system to be shut down.
However it seems to be impossible otherwise because the journalling process makes the filesystem busy. Is this right?
Maybe you can disable journaling. Maybe it was tune2fs or similar that lets you turn it off. Or maybe you can remount with journal disabled?
2nd hit on google "turn off journalling ext4" has lots of info.
Srdj
On Tue, Jan 10, 2017 at 02:28:33PM +0000, Chris Green wrote:
Is there any way to unmount an ext4 filesystem without shutting down?
I can do it easily by going to single-user mode or removing the filesystem from /etc/fstab and rebooting but both of these require the system to be shut down.
However it seems to be impossible otherwise because the journalling process makes the filesystem busy. Is this right?
No. The kernel knows to stop the journal when unmounting. There's probably some process with an open file on the filesystem. Try using lsof to see what that might be; e.g. "lsof /mnt" if it's mounted on /mnt
J.
On Tue, Jan 10, 2017 at 05:25:51PM +0000, Jonathan McDowell wrote:
On Tue, Jan 10, 2017 at 02:28:33PM +0000, Chris Green wrote:
Is there any way to unmount an ext4 filesystem without shutting down?
I can do it easily by going to single-user mode or removing the filesystem from /etc/fstab and rebooting but both of these require the system to be shut down.
However it seems to be impossible otherwise because the journalling process makes the filesystem busy. Is this right?
No. The kernel knows to stop the journal when unmounting. There's probably some process with an open file on the filesystem. Try using lsof to see what that might be; e.g. "lsof /mnt" if it's mounted on /mnt
I tried lsof but the only process accessing the drive in question was the journalling process as far as I could see.
The disk is currently being re-mkfs'ed but when it finishes I'll look into umount again.
Thanks.
On 10/01/17 14:28, Chris Green wrote:
Is there any way to unmount an ext4 filesystem without shutting down?
I can do it easily by going to single-user mode or removing the filesystem from /etc/fstab and rebooting but both of these require the system to be shut down.
However it seems to be impossible otherwise because the journalling process makes the filesystem busy. Is this right?
It should be as simple as sudo umount /mnt/mountpoint for the appropriate mountpoint, or sudo umount /dev/sdb1 for the appropriate device & partition number
A list of mounted drives can be seen by just typing mount
As Jonathon said, something could be using it which could be locking the drive
Good luck Steve
On Tue, 2017-01-10 at 14:28 +0000, Chris Green wrote:
Is there any way to unmount an ext4 filesystem without shutting down?
I can do it easily by going to single-user mode or removing the filesystem from /etc/fstab and rebooting but both of these require the system to be shut down.
However it seems to be impossible otherwise because the journalling process makes the filesystem busy. Is this right?
Not to my knowledge. My exchangeable backups disks are all ext4 and "umount /dev/sdd1" works just fine.