LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 09-02-2009, 09:26 PM   #1
HeavyStorm
LQ Newbie
 
Registered: Sep 2009
Posts: 2

Rep: Reputation: 0
mv hanging a Linux Server


Hello ppl,

I've searched the web for an answer over this subject but, so far, it's still very strange: a "simple" mv is hanging my Linux.

The details: I currently using a RedHat Linux (client site), hosted off-site, which I access through SSH. As far as I can tell, SSH is the only way the machine is accessed (i.e., no monitors or keyboards).

I have a certain file on this system that weights in 200GB. Every time I issue a mv for this file, from one partition to another (probably one disc to other), the machine hangs. Right now I'm not sure if this means SSH hangs or system hangs, but from what my client has told me, it's full machine hang.

I don't know any reason for this -- mv's aren't suppose to eat many systems resources and, besides time, I can't think of a relation between its size and consumption -- that is, you don't need more processor, RAM, or whatever to move a 200 GB file than to move a 1GB file.

I not a Linux Administrator -- I'm a programmer -- so I don't know if this has something to do with filesystem handler configuration, but I don't think a stable SO such as Linux would allow any configuration to cause hangs.

Yesterday I was told by one of my clients to use "cp" instead of "mv" to move big files -- again, I don't see much difference since mv over different devices or FS should be threated the same way.

Anyone has ever had this problem or has any insights on the subject? My machine is a AMD 64 (although the system is 32 bits) 64 GB RAM and has 16 cores (4x4). I can request more details on the machine spec or Linux versions if necessary, but my guess is that either something is very wrong or the system should not hang, no matter what spec.

Thanks,
Storm
 
Old 09-03-2009, 12:50 AM   #2
ArfaSmif
Member
 
Registered: Oct 2008
Location: Brisbane Australia
Distribution: Always back to Fedora
Posts: 263

Rep: Reputation: 51
Maybe this is too simple but, did you check to see that there is enough room on the partition you are moving too?

I would always do a copy first and a delete after success just to be on the safe side.
 
Old 09-03-2009, 01:24 AM   #3
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,117
Blog Entries: 2

Rep: Reputation: 113Reputation: 113
I'd agree that something is wrong, a mv across disks is the same as a cp followed by a rm
 
Old 09-03-2009, 12:09 PM   #4
HeavyStorm
LQ Newbie
 
Registered: Sep 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by estabroo View Post
I'd agree that something is wrong, a mv across disks is the same as a cp followed by a rm
Yes, exactly. I've looked at some implementations of mv (although not RedHat's), and found that mv across devices or partitios is implemented as a copy and remove.

Also, I don't do as ArfaSmif said because, as far I can tell, FS operations on Unix are atomic. At least, from my experience, if the "mv" fails, the original file is not removed.

Anyway, I do have enough space on the destination partition. But "just" enough. Maybe it has something to do with file fragmentation? ext fs'es shouldn't fragment very much, but...
 
Old 09-03-2009, 12:31 PM   #5
KingX
LQ Newbie
 
Registered: Aug 2009
Location: San Jose, CA
Distribution: Slackware
Posts: 11

Rep: Reputation: 1
What filesystem are you using on the machine you are trying to move the file over to? You should also check the logs and see what errors (if any) were reported. If logging is turned off then turn it on and try moving the file then, that is the best way to see what the problem is.. rather than making assumptions

Edit: Check logs on both machines

Last edited by KingX; 09-03-2009 at 12:32 PM.
 
Old 09-03-2009, 01:47 PM   #6
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Quote:
I have a certain file on this system that weights in 200GB
That's a big file.

Filesystems have maximum file size limits. ext2 on a 32-bit linux system has a limit of 2GB for a single file. VFS is supposed to have raised this limit to 4TB ( http://e2fsprogs.sourceforge.net/ext2intro.html ), but I know little about it.

KingX is right, you should check the filesystem on the external device. You can do this by plugging it in, waiting 30sec, mounting it (or just "opening" it in your GUI) and then telling us the output of the command mount in a terminal.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A little help troubleshooting Ubuntu Server - hanging / unresponsive dannyboy1121x Linux - Server 6 06-05-2009 11:28 AM
AWK script is hanging our server Hans Zarkoff Programming 10 08-20-2004 02:32 PM
Constant hanging of X server XStorm Slackware 12 01-31-2004 01:47 AM
nfs hanging server on shutdown bdp Linux - General 2 08-24-2003 10:32 PM
SUSe email server hanging at postfix svc cmiwebmaster Linux - Newbie 0 04-14-2003 02:42 PM


All times are GMT -5. The time now is 10:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration