Hello everybody,
I would like your opinion on the following question, why this happens in
centos and how to fix this (or a possible work around).
I have a drive with no partitions and formatted with xfs filesystem. I give
the drive a custom label "mydrive" and I mount it under
/dev/mountpnts/mydrive.
Then, I add a corresponding entry to fstab.
These, are the steps I followed,
mkfs.xfs -L mydrive -f /dev/sdf
mkdir /dev/mountpnts/mydrive
mount -L mydrive /dev/mountpnts/mydrive/
cat /etc/fstab,
LABEL=mydrive /dev/mountpnts/mydrive xfs
noatime,nodiratime,nobarrier,logbufs=8 0 0
These steps mount the drive under the mount point specified.
If I remove the drive and insert it back in after a while, the drive
doesn't mount, even though I have the required entry in fstab.
`mount -a` doesn't seem to work and provides me the following output,
mount: wrong fs type, bad option, bad superblock on /dev/sdj,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
If I restart my server, the drive gets mounted in the correct mount point
and works fine.
Can someone please shed some light on why a restart is required to re-mount
a drive and if there is way to mount the drive without a restart.
Thanks,
Raghuv Adhepalli.
Raghuv Adhepalli wrote:> Hello everybody, > > I would like your opinion on the following question, why this happens in > centos and how to fix this (or a possible work around). > > I have a drive with no partitions and formatted with xfs filesystem. I > give the drive a custom label "mydrive" and I mount it under > /dev/mountpnts/mydrive. > Then, I add a corresponding entry to fstab. > > These, are the steps I followed, > > mkfs.xfs -L mydrive -f /dev/sdf > mkdir /dev/mountpnts/mydrive > mount -L mydrive /dev/mountpnts/mydrive/ > > cat /etc/fstab, > LABEL=mydrive /dev/mountpnts/mydrive xfs > noatime,nodiratime,nobarrier,logbufs=8 0 0 > > These steps mount the drive under the mount point specified. > > If I remove the drive and insert it back in after a while, the drive > doesn't mount, even though I have the required entry in fstab.Clarify, please: you *did* umount it before removing, correct?> > `mount -a` doesn't seem to work and provides me the following output, > > mount: wrong fs type, bad option, bad superblock on /dev/sdj, > missing codepage or helper program, or other error > In some cases useful info is found in syslog - try > dmesg | tail or so ><snip> Was there anything significant in dmesg? mark
On 05/16/2014 01:29 PM, Raghuv Adhepalli wrote:> Hello everybody, > > I would like your opinion on the following question, why this happens in > centos and how to fix this (or a possible work around). > > I have a drive with no partitions and formatted with xfs filesystem. I give > the drive a custom label "mydrive" and I mount it under > /dev/mountpnts/mydrive. > Then, I add a corresponding entry to fstab. > > These, are the steps I followed, > > mkfs.xfs -L mydrive -f /dev/sdf > mkdir /dev/mountpnts/mydrive > mount -L mydrive /dev/mountpnts/mydrive/do you not partition your drive first? even if you're using the entire device? I'd expect to see this as /dev/sdf1 (or 2 or 3 or whatever). I'm not certain you -HAVE- to do such a thing.. and if I were a better person I'd experiment with a VM... (which I may still do, but it's friday, I'm still at work and I'm ready to go home)