mute
Dabbler
- Joined
- Dec 8, 2013
- Messages
- 19
Has anyone ever seen this?
A little background: I have a cronjob that runs, mounts an external USB drive that is formatted ext2, backs up some files and then unmounts the drive. The issue is that the files on the drive seem to change every time the drive is either mounted or unmounted, and for the life of me I can't figure out why.
I've tried adding sleeps, syncs, etc to the script to ensure that it's completely written to disk prior to unmounting the drive to no avail..
I realize this is a little off topic but I'm totally stumped.
Code:
[root@system] /mnt# cat f.sh #!/bin/bash for i in `seq 1 10` do mount -t ext2fs /dev/da78s1 /mnt/usb cd /mnt/usb md5 somefile-2014-03-27-1102.tar.gz.enc cd /mnt umount /dev/da78s1 done [root@system] /mnt# sh f.sh MD5 (somefile-2014-03-27-1102.tar.gz.enc) = 4183d779c3c727aa3d0c8e224b9ab76f MD5 (somefile-2014-03-27-1102.tar.gz.enc) = f39b43c45bfe010d8a0ca254888238b1 MD5 (somefile-2014-03-27-1102.tar.gz.enc) = 401347bda2d1944d6d1e506f66ed5747 ^C
A little background: I have a cronjob that runs, mounts an external USB drive that is formatted ext2, backs up some files and then unmounts the drive. The issue is that the files on the drive seem to change every time the drive is either mounted or unmounted, and for the life of me I can't figure out why.
I've tried adding sleeps, syncs, etc to the script to ensure that it's completely written to disk prior to unmounting the drive to no avail..
I realize this is a little off topic but I'm totally stumped.