On a recent job posting for a general Unix admin at a datacenter, a listed requirement was to move live files in a data center setting. What does this mean and how can one move live files?
Moving live files...as far as I know, no sane admin would try to do that (not that most admins are entirely sane). Usually the file is locked so you can't move them until the OS or application let them go, and if you do move a live file then you'll have some apps crash and/or corrupt data.
Chances are that either someone screwed up the ad or it was posted by someone who doesn't know what they're talking about (or it's a good hint why a previous job-holder ran away screaming).
Or they're being vague and mean live migration of VM's or failover services, clustering, something like that, but the ad makes that pure speculation.
Only thing you could do if you're interested in the position is apply and when interviewed ask them what exactly they mean, because you don't know of any safe way for a file that is in use to be moved without extra mechanisms for failover or live migration of virtual machines to achieve this. Did they mean possibly installing a new server and decommissioning a currently in-production server?
they could be talking about virtual machines to move live from one running system with a certain platform to another without interrupting these images.
IF the are live files then they are basically talking about an HA solution; if the files don't have to be 100% up to date but you need to prevent corruption then something like fssnap needs to be used.
I agree with other answers that this question is overly vague, and needs to be clarified.
Going on the assumption that moving a "live file" means to move a file which is currently open by a process which is reading or writing to it; This is not generally a problem given some parameters. When a program opens a file, it usually does this by referring to a filename. For our example we use "/var/log/myimportant.log". This filename is really just a pointer to some inode on the disk. Once the process has this file open, it doesn't matter if you remove this directory entry to the inode, or add a new directory entry pointing to this same inode. And moving a file can often be just that: remove one directory entry to an inode and add another. I say often instead of always because this is NOT true if you are trying to move the file from one filesystem to another.
Note that this is how log rotation works. The file which a process is probably writing to is moved. The process continues to write to the file even after it is moved. Then sometime later the process is either restarted or sent a HUP signal, triggering the process to open a new file in the original location.
Moving live files...as far as I know, no sane admin would try to do that (not that most admins are entirely sane). Usually the file is locked so you can't move them until the OS or application let them go, and if you do move a live file then you'll have some apps crash and/or corrupt data.
Chances are that either someone screwed up the ad or it was posted by someone who doesn't know what they're talking about (or it's a good hint why a previous job-holder ran away screaming).
Or they're being vague and mean live migration of VM's or failover services, clustering, something like that, but the ad makes that pure speculation.
Only thing you could do if you're interested in the position is apply and when interviewed ask them what exactly they mean, because you don't know of any safe way for a file that is in use to be moved without extra mechanisms for failover or live migration of virtual machines to achieve this. Did they mean possibly installing a new server and decommissioning a currently in-production server?
is it live files or live images?
they could be talking about virtual machines to move live from one running system with a certain platform to another without interrupting these images.
IF the are live files then they are basically talking about an HA solution; if the files don't have to be 100% up to date but you need to prevent corruption then something like fssnap needs to be used.
I agree with other answers that this question is overly vague, and needs to be clarified.
Going on the assumption that moving a "live file" means to move a file which is currently open by a process which is reading or writing to it; This is not generally a problem given some parameters. When a program opens a file, it usually does this by referring to a filename. For our example we use "/var/log/myimportant.log". This filename is really just a pointer to some inode on the disk. Once the process has this file open, it doesn't matter if you remove this directory entry to the inode, or add a new directory entry pointing to this same inode. And moving a file can often be just that: remove one directory entry to an inode and add another. I say often instead of always because this is NOT true if you are trying to move the file from one filesystem to another.
Note that this is how log rotation works. The file which a process is probably writing to is moved. The process continues to write to the file even after it is moved. Then sometime later the process is either restarted or sent a HUP signal, triggering the process to open a new file in the original location.