- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: mount error
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2003 09:11 AM
08-01-2003 09:11 AM
I have a problem unmounting a drive when running it in a script:
#!/bin/sh
mount /dev/hda1 /x
umount /dev/hda1
In some point umount does not run. If I check the mounting after the script run the drive (dev/hda1) is still mounted.
Hope you could help.
Regards,
LAT
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2003 09:22 AM
08-01-2003 09:22 AM
Re: mount error
This
If there are process running, it is not possible to umount the drive.
Verify the processes with a
ps ax | grep mount_point
or
ps ax | grep /dev/hda1, to see what process are running.
Frank.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2003 09:27 AM
08-01-2003 09:27 AM
Re: mount error
By-the-way thanks for the additional infor regarding proc.. it's helpful.
The "other scripts" is just copying a file in the other drive.
Is it possible to set a delay to unmount the drive?
Thanks!
Regards,
LAT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2003 09:42 AM
08-01-2003 09:42 AM
SolutionInside the scripts you can execute a command if the previous one has finished succesfully or not, this is made by the && and || operators.
For example:
echo "Hi" > /tmp/dump && echo "Correct"
This outputs the word "Correct" in the standard output and create a new file in /tmp directory with the word Hi.
On the other hand, suppose the following:
chmod 000 /tmp/dump # no write permission in file
echo "Hi" > /tmp/dump || echo "Correct"
this outputs the following:
bash: /tmp/dump: Permision denied
Correct
The "Correct word is output because the first echo fails.
Well, this means that you can make the
This is only a idea.
About the delay, you can do a delay with the command sleep.
sleep 5 # sets a 5 seconds delay before continue.
Regards.
Frank.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2003 09:45 AM
08-01-2003 09:45 AM
Re: mount error
I don't even know if this command is in Linux but you need the equivalent.
fuser -cu fsname
lists processes.
fuser -cuk fsname kills the suckers.
Then you can umount.
There is a Linux equivalent.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2003 10:51 AM
08-02-2003 10:51 AM
Re: mount error
What you need is fuser -uc
You will get the PIDs that use the mount point
then run ps aux | grep PID
and you will see who use the mount point.
Caesar