FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 07-11-2012, 06:09 AM
John Magolske
 
Default "drive already mounted or busy" ... dmsetup routine

I've been having issues with a particular hard drive, where after
a suspend-resume cycle with s2ram, it won't mount:

# mount /dev/sdb1 /media
mount: /dev/sdb1 already mounted or /media busy
# umount /media
umount: /media: not mounted

So I end up doing the following routine:

# dmsetup ls

(observe the device uuid's and input those to the remove below)

# dmsetup remove ************************************************** *******-part1
# dmsetup remove ************************************************** *******

After this I can mount/umount multiple times no problem. But after
every suspend-resume cycle I have to do that dmsetup routine again.

Could this be a hard-drive hardware issue? Or maybe something is
mis-configured? Seems to have started after a dist-upgrade a while
back. I'm able to mount other flash-drives fine without the dmsetup
routine.

TIA for any help,

John

--
John Magolske
http://B79.net/contact


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120711060959.GA22531@s70206.gridserver.com">http ://lists.debian.org/20120711060959.GA22531@s70206.gridserver.com
 
Old 07-11-2012, 02:40 PM
Camaleón
 
Default "drive already mounted or busy" ... dmsetup routine

On Tue, 10 Jul 2012 23:09:59 -0700, John Magolske wrote:

> I've been having issues with a particular hard drive, where after a
> suspend-resume cycle with s2ram, it won't mount:
>
> # mount /dev/sdb1 /media
> mount: /dev/sdb1 already mounted or /media busy
> # umount /media
> umount: /media: not mounted

I wouldn't use "/media" as mount point but an isolate mount point and
better yet "static" if the hard drive is to be used every day.

> So I end up doing the following routine:
>
> # dmsetup ls
>
> (observe the device uuid's and input those to the remove below)
>
> # dmsetup remove
> ************************************************** *******-part1 #
> dmsetup remove
> ************************************************** *******
>
> After this I can mount/umount multiple times no problem. But after every
> suspend-resume cycle I have to do that dmsetup routine again.

Is the hard drive partition being used/recognized as as device mapper
volume? :-?

> Could this be a hard-drive hardware issue? Or maybe something is
> mis-configured? Seems to have started after a dist-upgrade a while back.
> I'm able to mount other flash-drives fine without the dmsetup routine.

These errors are commom when resuming from suspension or even
hibernation. What you can do is unmounting the USB devices before
entering into suspension mode and mount them again after system comes to
life.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/jtk38n$4fh$8@dough.gmane.org
 
Old 07-17-2012, 08:30 PM
John Magolske
 
Default "drive already mounted or busy" ... dmsetup routine

Thanks for the reply.

* Camaleón <noelamac@gmail.com> [120711 16:09]:
> On Tue, 10 Jul 2012 23:09:59 -0700, John Magolske wrote:
>
> > I've been having issues with a particular hard drive, where after a
> > suspend-resume cycle with s2ram, it won't mount:
> >
> > # mount /dev/sdb1 /media
> > mount: /dev/sdb1 already mounted or /media busy
> > # umount /media
> > umount: /media: not mounted
>
> I wouldn't use "/media" as mount point but an isolate mount point and
> better yet "static" if the hard drive is to be used every day.

Just did a bit of searching, not sure what isolate(d) or static mount
points might be... Reading the Filesystem Hierarchy Standard I see
that /media should be a mount point for removeable media, containing
"subdirectories used as mount points for removeable media such as
floppy disks, cdroms and zip disks". I just grabbed /media here as an
example, simplifying what I typically use, which involves entries in
/etc/fstab like this:

/dev/disk/by-id/*hd1-id**-part1 /hd/e1 auto defaults,user,noauto 0 0
/dev/disk/by-id/*hd2-id**-part1 /hd/e2 auto defaults,user,noauto 0 0

an alias:

mnt () {
mount /$1/$2 && cd /$1/$2 && ls -ohF --color=auto
}

and directory structures like so:

% tree /hd
/hd
|-- e1
|-- e2
|-- e3
`-- h1

% tree /fd
/fd
|-- e1
|-- e2
`-- e3

Then, `mnt hd e1` will mount one hard drive, `mnt hd e2` will mount
another hard drive, `mnt fd e2` will mount a particular flash drive,
etc. Maybe there's a simpler/smarter way to handle mounting drives,
but I set this up a while back in the interest of being able to
tell by glancing at a short absolute file path exactly what drive
is mounted, and it seems to be working well enough. In any case, my
"already mounted or ..." & "dmsetup remove ..." routine is the same
whether I use `mnt hd e1` or just do a `mount /dev/sdb1 /mountpoint`.

> > So I end up doing the following routine:
> >
> > # dmsetup ls
> >
> > (observe the device uuid's and input those to the remove below)
> >
> > # dmsetup remove
> > ************************************************** *******-part1 #
> > dmsetup remove
> > ************************************************** *******
> >
> > After this I can mount/umount multiple times no problem. But after every
> > suspend-resume cycle I have to do that dmsetup routine again.
>
> Is the hard drive partition being used/recognized as as device mapper
> volume? :-?

I did not set up such a thing with this drive. I do have another script
that uses cryptsetup like:

cryptsetup create cryptodrive /dev/disk/by-id/usb-***-0:0-part1

but that explicitly calls out a different disk by id, so I don't see
how that would be contributing to this behaviour.

> > Could this be a hard-drive hardware issue? Or maybe something is
> > mis-configured? Seems to have started after a dist-upgrade a while back.
> > I'm able to mount other flash-drives fine without the dmsetup routine.
>
> These errors are commom when resuming from suspension or even
> hibernation. What you can do is unmounting the USB devices before
> entering into suspension mode and mount them again after system comes to
> life.

I try to always unmount external drives & USB devices prior to a
suspend/resume. It's possible I accidentally forgot to do so once
with this drive (though I don't recall doing so). And I keep getting
the described behaviour *every* time I try to mount that drive after
a suspend/resume. It's also possible this drive was mounted during a
dist-upgrade...not sure if that could've scrambled things up a bit.

John

--
John Magolske
http://B79.net/contact


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120717203033.GA14298@s70206.gridserver.com">http ://lists.debian.org/20120717203033.GA14298@s70206.gridserver.com
 
Old 07-18-2012, 07:51 AM
Keith McKenzie
 
Default "drive already mounted or busy" ... dmsetup routine

On 17 July 2012 21:30, John Magolske <listmail@b79.net> wrote:
> Thanks for the reply.
>
> * Camaleón <noelamac@gmail.com> [120711 16:09]:
>> On Tue, 10 Jul 2012 23:09:59 -0700, John Magolske wrote:
>>
>> > I've been having issues with a particular hard drive, where after a
>> > suspend-resume cycle with s2ram, it won't mount:
>> >
>> > # mount /dev/sdb1 /media
>> > mount: /dev/sdb1 already mounted or /media busy
>> > # umount /media
>> > umount: /media: not mounted
>>
>> I wouldn't use "/media" as mount point but an isolate mount point and
>> better yet "static" if the hard drive is to be used every day.
>
> Just did a bit of searching, not sure what isolate(d) or static mount
> points might be... Reading the Filesystem Hierarchy Standard I see
> that /media should be a mount point for removeable media, containing
> "subdirectories used as mount points for removeable media such as
> floppy disks, cdroms and zip disks". I just grabbed /media here as an
> example, simplifying what I typically use, which involves entries in
> /etc/fstab like this:
>
> /dev/disk/by-id/*hd1-id**-part1 /hd/e1 auto defaults,user,noauto 0 0
> /dev/disk/by-id/*hd2-id**-part1 /hd/e2 auto defaults,user,noauto 0 0
>
> an alias:
>
> mnt () {
> mount /$1/$2 && cd /$1/$2 && ls -ohF --color=auto
> }
>
> and directory structures like so:
>
> % tree /hd
> /hd
> |-- e1
> |-- e2
> |-- e3
> `-- h1
>
> % tree /fd
> /fd
> |-- e1
> |-- e2
> `-- e3
>
> Then, `mnt hd e1` will mount one hard drive, `mnt hd e2` will mount
> another hard drive, `mnt fd e2` will mount a particular flash drive,
> etc. Maybe there's a simpler/smarter way to handle mounting drives,
> but I set this up a while back in the interest of being able to
> tell by glancing at a short absolute file path exactly what drive
> is mounted, and it seems to be working well enough. In any case, my
> "already mounted or ..." & "dmsetup remove ..." routine is the same
> whether I use `mnt hd e1` or just do a `mount /dev/sdb1 /mountpoint`.
>
>> > So I end up doing the following routine:
>> >
>> > # dmsetup ls
>> >
>> > (observe the device uuid's and input those to the remove below)
>> >
>> > # dmsetup remove
>> > ************************************************** *******-part1 #
>> > dmsetup remove
>> > ************************************************** *******
>> >
>> > After this I can mount/umount multiple times no problem. But after every
>> > suspend-resume cycle I have to do that dmsetup routine again.
>>
>> Is the hard drive partition being used/recognized as as device mapper
>> volume? :-?
>
> I did not set up such a thing with this drive. I do have another script
> that uses cryptsetup like:
>
> cryptsetup create cryptodrive /dev/disk/by-id/usb-***-0:0-part1
>
> but that explicitly calls out a different disk by id, so I don't see
> how that would be contributing to this behaviour.
>
>> > Could this be a hard-drive hardware issue? Or maybe something is
>> > mis-configured? Seems to have started after a dist-upgrade a while back.
>> > I'm able to mount other flash-drives fine without the dmsetup routine.
>>
>> These errors are commom when resuming from suspension or even
>> hibernation. What you can do is unmounting the USB devices before
>> entering into suspension mode and mount them again after system comes to
>> life.
>
> I try to always unmount external drives & USB devices prior to a
> suspend/resume. It's possible I accidentally forgot to do so once
> with this drive (though I don't recall doing so). And I keep getting
> the described behaviour *every* time I try to mount that drive after
> a suspend/resume. It's also possible this drive was mounted during a
> dist-upgrade...not sure if that could've scrambled things up a bit.
>
> John
>
> --
> John Magolske
> http://B79.net/contact

Check that nothing else has been mounted over/on top of your mount point.


--
Sent from FOSS (Free Open Source Software)
Debian GNU/Linux


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/CAL36VG=CMS6OaodYmD-6BQVZGRXeEoBT3MRO53zAu57P-4OAFQ@mail.gmail.com
 
Old 07-19-2012, 05:51 AM
John Magolske
 
Default "drive already mounted or busy" ... dmsetup routine

* Keith McKenzie <km3952@gmail.com> [120718 07:17]:
> Check that nothing else has been mounted over/on top of your mount
> point.

Nothing is mounted on that mount point. And this behaviour only
happens with one particular hard drive:

Connect problematic external hard drive into USB port and...

# mount /dev/sdb1 /media
mount: /dev/sdb1 already mounted or /media busy
# umount /media
umount: /media: not mounted

Well, nothing wants to happen there.
Ok, now insert a USB thumbdrive into that USB port...

# mount /dev/sdc1 /media
# umount /media
#

no problem mounting & unmounting the thumbdrive on that mount point.
But with that other hard drive, I have to first do the aforementioned
"dmsetup remove ..." routine, then it will mount & unmount no problem.
Until the next suspend/resume cycle, then it's "dmsetup remove ..."
all over again.

John

--
John Magolske
http://B79.net/contact


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120719055145.GA28943@s70206.gridserver.com">http ://lists.debian.org/20120719055145.GA28943@s70206.gridserver.com
 

Thread Tools




All times are GMT. The time now is 01:04 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org