You are not logged in.

#1 2013-10-31 23:58:46

sighter
Member
Registered: 2008-11-23
Posts: 13

ntfs-3g unmounts a disc one second after successfull mount

Hey Guys.

I have an Issue mounting an ntfs filesystem at system startup which is located on a fake-raid. For reference, here is the interesting section from journalctl: (read from buttom to top)

Nov 01 00:14:54 lierserver systemd[1]: Created slice user-0.slice.
Nov 01 00:14:54 lierserver systemd[1]: Starting user-0.slice.
Nov 01 00:14:54 lierserver login[228]: pam_unix(login:session): session opened for user root by LOGIN(uid=0)
Nov 01 00:14:54 lierserver kernel: br0: port 2(tap0) entered disabled state
Nov 01 00:14:54 lierserver kernel: device tap0 left promiscuous mode
Nov 01 00:14:54 lierserver kernel: br0: port 2(tap0) entered disabled state
Nov 01 00:14:54 lierserver ntfs-3g[320]: Unmounting /dev/md1p1 (LichtErlebnisse)
Nov 01 00:14:54 lierserver kernel: br0: port 2(tap0) entered forwarding state
Nov 01 00:14:54 lierserver kernel: br0: port 2(tap0) entered forwarding state
Nov 01 00:14:54 lierserver kernel: device tap0 entered promiscuous mode
Nov 01 00:14:54 lierserver kernel: tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
Nov 01 00:14:54 lierserver kernel: tun: Universal TUN/TAP device driver, 1.6
Nov 01 00:14:53 lierserver my_startup.sh[286]: starting vms
Nov 01 00:14:53 lierserver ntfs-3g[320]: Ownership and permissions disabled, configuration type 7
Nov 01 00:14:53 lierserver ntfs-3g[320]: Mount options: rw,allow_other,nonempty,relatime,fsname=/dev/md1p1,blkdev,blksize=4096
Nov 01 00:14:53 lierserver ntfs-3g[320]: Cmdline options: rw
Nov 01 00:14:53 lierserver ntfs-3g[320]: Mounted /dev/md1p1 (Read-Write, label "LichtErlebnisse", NTFS 3.1)
Nov 01 00:14:53 lierserver ntfs-3g[320]: Version 2013.1.13 external FUSE 29
Nov 01 00:14:52 lierserver systemd[1]: Mounted FUSE Control File System.
Nov 01 00:14:52 lierserver kernel: fuse init (API version 7.22)
Nov 01 00:14:52 lierserver systemd[1]: Mounting FUSE Control File System...
Nov 01 00:14:52 lierserver my_startup.sh[286]: mounting raid
Nov 01 00:14:42 lierserver kernel:  md1: p1
Nov 01 00:14:42 lierserver kernel: md: using 128k window, over a total of 1953514584k.
Nov 01 00:14:42 lierserver kernel: md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for resync.
Nov 01 00:14:42 lierserver kernel: md: minimum _guaranteed_  speed: 1000 KB/sec/disk.

When you investigate the lines containing "ntfs-3g", you can see that the fs is first mounted properly and then unmounted without any error.
The reason for mounting the fs in a custom script is the following. The ntfs volume is on a fake-raid which is for some reason not detectable for dmraid or
mdadm. I managed to get the raid working, with a manual command which builds the raid with all parameters.
Essentialy, everything, reassembling the raid and then mounting the ntfs volume is working, if i do it manually.

I just wrote a script and a systemd unit to achieve task automatically on boot. But with this solution the explained is happening. (Its not a solution then right? smile )

So the question is. Do you have any ideas what the problem could be. Or do you have ways to gather more information about the difference between the manual and systemd approach?

Thx in advance Mates.


In Addition, here is the startscript and the systemd unit wich is calling it:

#!/bin/sh
# mount and assemble raid first. See scripts to see how.
echo "assemble"
/usr/local/bin/assemble_raid.sh
sleep 10

echo "mounting raid"
/usr/local/bin/mount_raid.sh

# after start the vms

echo "starting vms"
/usr/local/bin/start_windows_vm.sh
[Unit]
Description=Startup script launcher. Path : /usr/local/bin/my_startup.sh
Requires=multi-user.target
After=multi-user.target

[Service]
ExecStart=/usr/local/bin/my_startup.sh

[Install]
WantedBy=multi-user.target

Called scripts:

mount_raid.sh

#!/bin/sh
# script to asseble and mount the raid
mount -t ntfs-3g /dev/md1p1 /mnt/file-raid/

assemble_raid.sh

#!/bin/sh
# script to asseble and mount the raid

DEVS=$(blkid | grep 922CD0652CD045BF | grep -o -E "/dev/[^0-9]*" | tr "\n" " ")

echo "Building query with devs $DEVS"

mdadm --build --verbose /dev/md1 --level=1 --raid-devices=2 $DEVS

Offline

#2 2013-11-05 17:09:35

nepda
Member
Registered: 2013-11-05
Posts: 1

Re: ntfs-3g unmounts a disc one second after successfull mount

Similar problem here...

Offline

Board footer

Powered by FluxBB