Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I think mounting something in a place where another device was mounted already will kick the first device off. So you won' have two devices mounted in the same place at the same time.
Are you trying to get some kind of RAID funcionality without a RAID controller? I think you best just set up some kind of automated mirroring in that case. rsync in a cron job for example.
Just to make sure I understand your question, you wish to mount two different partitions on /home? If you do so, the second partition will just "cover up" the first one such that the first partition may as well not be mounted at all. But it won't give errors.
If you wish to mirror a partition, I suggest you run rsync as a cron job maybe something like every 15 minutes:
Adjust the partition and time interval to your needs and tastes, and modify /etc/fstab so that the mirroring partition gets mounted each time. Also, check rsync's man page for the meaning of options and make sure this is what you want.
...it seems to me that u expect the behaviour of the so called 'union'-Filesystem.
That is, u mount a Partition (that with the union-fs driver between kernel and partition's Filesystem - check union-fs documentation how to do so), and mount one ore many more partitions (not needing equal size) about the first, second,...
With the unionfs-utils u can make some partitions writeable, some just readable. What u get is maybe that (suppose 0/1 is atom file):
(example)
1 0 1 0 1 first part readonly
0 1 0 1 second part writeable (u see this partition is REALLY different )
1 1 1 1 1 u get if accessed by sytem (all files of all partitions). Modifying these ones (file 1 & 3)
1 0 1 u will have
1 1 1 1 on the second
1 0 1 0 1 on the first partition (file 1 & 3 still being the old version), killing three files
1-1-1- u get for the system having
0 0 0 1 1 which means
0 0 0 1 on the second one and
1 0 1 0 1 on the first partition
...changes only happened to the writeable partitions.
But u can have all writeable, and the changes will happen to all.
you can add a third, making the first & second readonly applying changes to the third. Make all writeable and changes will happen to all, but only CHANGES - that means, you mount two writeable they will not be synced.
How that behaviour applies to an error on one of the partitions (as your disk crashed)? - that is out of information to me.
i was intending to have a /home mount point mirrored using software raid1 during setup. i didn't find the right documentation during the install, so i set up one hd as /home, and then wondered what would happen if i added another as home? when i booted up, kdisk free showed equal usage for each hard drive labeled /home! i'm getting some corruption on a third hdd set up for all the other mount points, that showed fsck activity at initial bootup (reboot), and errors, which i believe is the hdd (it's sqwealed previously during large data transfers- [ahh, my cache is full]- what it is?).
i saw a refernce to not raiding swap space, and just setting up multiple swap partitions, and the kernel would span/ mirror them. so i got the idea that it might work.
how to confirm data is mirrored/ identical across 2 drives?
current status looks good. zerofilled, and reformatted the 30gig drive, and 2 identical larger hdd's. partitioned, and did a slow format that checks for bad blocks (status 0x51, and error 0x84 from what i've read pointed to bad blocks) for the 30gig hdd partitions. reinstalled slack 11, and did notice that when the file size would go over a certain megabyte size, it would still put out a kind of squeal sound, though reboot didn't show any errors. the 2 larger drive with /home mount points take the larger data transfer loads, so i might be ok for awhile. tranferred about 12gigs of data to it, and the comp was silent (comforting/ most excellent ).
so, according to kdisk free, the volumes for both /home hard drives showed an identical increase in data held after ftp'g 12+ gig's to "/home". how can i confirm if the drives are mirrored identically, as opposed to non uniform distribution? would checksumming the devices work? would there be a better approach?
checksumming should work. It could take some time though.
You could also remount one of the drives on a different mountpoint (say, /mnt/temp) and then check with ls, df, du, whatever if you get the same output.
something like this:
Code:
ls -halR /home > /tmp/homels1
ls -halR /mnt/temp > /tmp/homels2
diff /tmp/homels1 /tmp/homels2
rm /tmp/homels*
or equivalent for other commands that get some info about your mounts
besides the rsync approach, you can also try setting up software RAID, which provides some advantages over rsync (synchronized updates, ~2x reading speed, and fault tolerance)
btw, the rsync approach does not really provide hardware fault-tolerance (if a file on the first harddrive is corrupted due to a hardware failure (bad sectors), the corrupted file will be automatically copied to the second hd, replacing the good file.
I personally like the software RAID approach and has been using it for years
i didn't find the right documentation during the install, so i set up one hd as /home, and then wondered what would happen if i added another as home? when i booted up, kdisk free showed equal usage for each hard drive labeled /home!
I think you just discovered an interesting peculiarity of the disk size monitoring tools. In other words, I think kdisk lied to you.
I just tried a similar experiment on Ubuntu 6.10, except I used df instead of kdisk. I mounted two partitions to a single mount point and then copied a bunch of files to that mount point. Using df, both partitions reported the same usage. However when I unmounted the second partition, both df and ls told a different story. None of the files I had copied were on the first partition. Just the lost+found directory.
BTW, you can use multiple swap partitions at one time. But there is no mirroring going on. If the swap partitions all have the same priority, the kernel will distribute the swapped out material among the partitions, roughly equally. Otherwise, they will be used sequentially in order of their priority.
i'll experiment with your generous advice guys. currently running md5sum, and i'll check it in the morning. i need to find 3 or 4 hours of free time to go over the system with commands, shut down system, disconnect 1 drive, boot the other, etc.......
i just ran df command for each /home device and they both report the same statistics- which leads me to believe that the drives are mirrored, and have the same data.
i tried to run md5sum for each /home device, but that returned input/ output errors. i would guess that md5 is for files, as opposed to devices?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.