[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: CIFS and data integrity



On Mon, 30 Jul 2012 01:50:14 +0900
Mark Fletcher <mark27q1@gmail.com> wrote:

> 
> It looks like what got stored on the NAS is not exactly what was
> originally on the host. This is a huge problem for me as it means I
> can't rely on backups dumped on that device. Is there something wrong
> with the way I am mounting the NAS that is leading to this?
> 

Probably. I'd guess it is a matter of permissions. If you create the
archive elsewhere, copy it to the NAS, copy it back again, presumably
there is no difficulty. I also use a Buffalo NAS, but my backups are
created on my server, then copied. It is possible that if the
compression and expansion is done on the NAS, that a temp file involved
may not have the correct permissions to write, or more likely, amend.
But is your backup not running under cron as root?

Out of curiosity, I've just compressed and restored a 200MB folder on
the NAS from Nautilus on my workstation, logged in as a normal user. I
haven't confirmed the accuracy of the copy, but I got no error
messages and I can read individual files. I can't delete either the
archive or the restored directory, as they are owned by root and have
-r-xrwSrwt and dr-xrwSrwt permissions respectively. These will be a
function of the NAS cifs server, quite possibly samba. I have no
problem deleting them while running mc as root. I've also archived a
285MB folder from the workstation to the NAS and restored it to the
workstation, again without problems.

I'm afraid I have rather lazy fstab entries for the NAS shares, which I
probably ought to fix, but they are also shared with Windows machines
and I recall having a rather difficult time getting everything working
at the same time. It is difficult working up the enthusiasm to have
another go with the aim of a more secure result.

//buffalo/Backups	/mnt/buffalo/Backups
cifs	user,guest,noperm,dir_mode=0x777,file_mode=0x777,rw

This should at least provide a starting point.

-- 
Joe





Reply to: