Error : "image file is loked" when writing to NFS

Messages about how to use partimage across a network (with the partimaged server, samba, nfs, ...)

Moderator: feffer

Post Reply
Posts: 2
Joined: Wed Jul 12, 2006 10:29 am

Error : "image file is loked" when writing to NFS

Post by Lior » Wed Jul 12, 2006 9:34 pm

I'm trying to write image over the network to my file server.
File server is AIX 5.3 box. The file system is exported properly and
can be reached from any unix station ( Linux/Aix ).
I managed to reach it over NFS from my Linux box after I started it
from systemrescuecd.
The problem is that I'm getting this annoying messages about
"Loked image file" when trying to write or read to / from the mount point.

So what I have done is ..

1. boot the system from systemrescuecd-x86-0.2.19 cd
2. ifconfig eth0 netmask
3. edited /etc/host to include the new ip address and the computer name
3. /etc/init.d/portmap start

( 2 & 3 are necessary for NFS mount )

4. cd / ; mkdir netdrive
5. mount /netdrive ( successful )
6. cd /netdrive ; touch test_file ( successful )
7. rm -rf test_file ( successful, meaning.. permission are fine )
8. activated partimage
9. when trying to write the image file to the mount point i'm getting this message :
The image file is locked .. wait \ retry \ change

Got really fidgety :evil: .. so I decided to relax while
configuring Samba3 on the AIX file server.
I tried smbfs mount and it works fine ( I managed to image read / write )

So... what seems to be the problem with imaging over NFS ? :?:

Thanks in advance


Posts: 2
Joined: Wed Jul 26, 2006 9:13 pm

Post by me » Wed Jul 26, 2006 9:18 pm

Same issue using a SLAX CD and an NFS share on a windows box (SFU) - can create and delete files fine myself, and the server properties says no files are locked, but partimage tells me that files (whether overwriting or creating new ones) are locked - any fixes on the way?

Posts: 3
Joined: Mon Oct 02, 2006 9:12 pm

Post by Kermit » Mon Oct 02, 2006 9:17 pm

same Problem with partimage 0.6.4 and nfs-mount (vers=3)

but samba and smbfs-mount works!

Posts: 1
Joined: Thu Oct 19, 2006 2:21 am

try starting the local nfs service

Post by m6d4 » Thu Oct 19, 2006 2:27 am

HI Guys,

I was having the similiar problem of file locked with nfs mount. Everytime I try to run the restore from nfs partition I got this problem. Then I tried starting local nfs service from gentoo live CD and there we go...... the problem resolved.
Hope this would help someone out there.


Posts: 1
Joined: Tue Dec 05, 2006 3:57 pm

*** SOLVED ***

Post by khermans » Tue Dec 05, 2006 4:06 pm

The suggested tip above worked for me. Here are the commands explicitly, in case any one else runs into this problem in the future:

# /etc/init.d/portmap start
# /etc/init.d/nfs start
Kristian Hermansen

Posts: 2
Joined: Tue Dec 12, 2006 12:31 pm

re: nfs image file is locked

Post by rst » Tue Dec 12, 2006 12:40 pm

the problem on suse linux (kernel 2.4) is easily solved by explicitly mounting with the nolock option:

mount -o rw,nolock server:/share /mnt

after that everything runs fins ...


Post Reply