NTFS volume sometimes not mounted at boot

I have a few NTFS volumes in my machine. The fstab looks like this:


/dev/disk/by-id/scsi-SATA_SAMSUNG_HD322GJS2BJJ9EB609339-part3 swap                 swap       defaults              0 0
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD322GJS2BJJ9EB609339-part4 /                    ext4       acl,user_xattr        1 1
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
/dev/disk/by-id/raid-pdc_ceigdifdad-part1 /ntfs-D ntfs-3g uid=1000,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD322GJS2BJJ9EB609339-part1 /ntfs-C ntfs-3g uid=1000,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD322GJS2BJJ9EB609339-part2 /ntfs-H ntfs-3g uid=1000,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0

/dev/disk/by-id/raid-pdc_ceigdifdad-part1 is a raid array on a Promise TX2300 card.

Sometimes when I boot the machine, /ntfs-D gets mounted, sometimes it does not get mounted. It’s random.

In cases when it doesn’t get mounted, I type


sudo mount -a

it gets mounted and all is well thereafter. However, I’d like to the bottom of this. I have the impressions that it might be a timing problem. If at the time of processing the fstab, the RAID device is ready, the volume is mounted. If for some reason it is not ready, it silently does not get mounted.

So I have the following questions:

  1. How can I “observe” what’s going on at boot time? If the volume is not mounted there is no message or error in
    /var/log/messages or /var/log/boot.msg.
  2. If it is a timing issue, how can I delay the mounting of the volume?

For completeness, here my boot options:


kernel /boot/vmlinuz-2.6.37.6-0.7-default root=/dev/disk/by-id/scsi-SATA_SAMSUNG_HD322GJS2BJJ9EB609339-part4
   resume=/dev/disk/by-id/scsi-SATA_SAMSUNG_HD322GJS2BJJ9EB609339-part3
   splash=silent quiet showopts edd=off vga=0x31a
initrd /boot/initrd-2.6.37.6-0.7-default

Thanking you in advance for your advice.

A common approach is to issue the mount command later in the boot sequence. The advice in this thread should be enough to assist here.

Thank you for the advice.

I modified /etc/init.d/after.local as indicated in the other thread (adding a ‘mount -a’).

So my volumes should now always get mounted sooner or later.

On 09/03/2011 12:06 PM, jorgk3 wrote:
>
> Thank you for the advice.
>
> I modified /etc/init.d/after.local as indicated in the other thread
> (adding a ‘mount -a’).
>
> So my volumes should now always get mounted sooner or later.

You might want to add " &" at the end of the mount line, to run it in the
background as mount is blocking. In addition, one usually needs the full path
(i.e. /bin/mount) in all such control files. The context of the process in which
these run is usually pretty sparse.

Thank you for the input. I’ll make it a little more sophisticated.


if  -e /ntfs-D/.NTFS-3G/UserMapping ]
then
echo "/ntfs-D already mounted"
else
/bin/mount -a
echo "mounted /ntfs-D"
fi