Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have hdb set to mount at /mnt/hdb. everything works great but I am trying to transfer alot of data from my laptop to backup on hdb on the server. When transfering I leave it going at night and I wake up with seeing io errors and it looks like the drive crashes. when i cd to the drive nothing is present. However when I reboot the machine everything is back to normal. I can't just umount the drive either.
iason@claud:~$ cd /mnt/
iason@claud:/mnt$ ls
hdb
iason@claud:/mnt$ cd hdb
iason@claud:/mnt/hdb$ ls
ls: reading directory .: Input/output error
iason@claud:/mnt/hdb$ mount
/dev/hda1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hdb1 on /mnt/hdb type ext2 (rw)
when I try to umount i get
iason@claud:/mnt/hdb$ sudo umount /dev/hdb1
umount: /mnt/hdb: device is busy
umount: /mnt/hdb: device is busy
iason@claud:/mnt/hdb$
iason@claud:/mnt/hdb$ sudo umount -f /dev/hdb1
umount2: Device or resource busy
umount: /mnt/hdb: device is busy
umount2: Device or resource busy
umount: /mnt/hdb: device is busy
iason@claud:/mnt/hdb$
Im on a laptop transfering to another computer on the network, I'll just call it server. I havn't rebooted the server to see if those files are there or not, but i suspect a majority are; however didn't finish do to whatever it is that is happening.
yea that's the easy part. id like to know why my harddrive is crashing and how to umount and remount without having to reboot the whole computer, allowing access to that harddrive. Id like to prevent this from happening again if possible. I dont really understand why this is happening in the first place, and it happens repeatedly.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
The mount command sometimes does this. You cannot umount if the mount point is the working directory. You need to get out of hdb with cd .. . I suspect power management spinning down the drive, or doing something to disrupt the transfer. Usually a notebook will not stay on all night. It will go to sleep, unless you set it to stay awake for a long time, usually expressed in minutes. I just had this same problem doing a backup, and I can't remember how I fixed it, except that I configured klaptop to prevent hibernation on the laptop for three hours. I was using dd like this:
on the server: >netcat -l -p 1234 | bzip2 > /mnt/sdb/hda_lappy.img
1. >enter
on the lappy: >dd if=/dev/hda bs=16065b conv=notruc,noerror | netcat 192.168.0.5 1234
2. >enter
This is a bitstream method of backup using compression on a mostly empty 100 GB drive, and yields a 6 GB image file, but I don't think you could mount this image, so it needs to be restored in its entirety, or not at all.
To restore, on laptop: >netcat -l -p 1234 | dd of=/dev/hda bs=4k conv=notrunc,noerror
>enter
on server: >bunzip2 /mnt/sdb/hda_lappy.img | netcat 192.168.0.6 1234
>enter
where 192.168.0.5 = server, 192.168.0.5 = lappy, 1234 = tcp port to use.
bzip2 uses an error checking algorithm that is machine, and especially memory intensive. If it bugs out, try turning the AC to a lower temp. in the room where the server is, or get some powerful chassis fans.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.