ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to develop a application with C for Red Hat Linux Enterprise AS2.1 platform...
The function is as follows:
- freeze the file system(ext2 or ext3)
- take the backup
- thaw the file system.
But I don't know that how to freeze the file system with ioctl or other system calls?
So I want to get some help.
Please tell me for detail usage and notice items.
I think that other processes still can access mountpoint with read-only. but also the processes which is writing data to mountpoint terminate for failing to write.
If some are trying to write into it while you remount it, your remounting fails.
If you really don't want anyone to even try to open the disk for writing, then you should drop into single user mode for that time. Though I don't see much harm in processes trying to open files.
Sorry, Please teach that how to drop into single user mode?
In addition, before taking the backup, if I want to hang
the processes which is writing data to disks and which try to open the disk for reading or writing, Please teach how to do?
Before taking the backup, as follows require can be got:
1. don't unmount the disks
2. block(or hang) the processes which have opened the disks for reading or writing, but don't make the processes terminate.
3. block(or hang) the processes which try to open disks,
but don't make the processes terminate.
4. take the backup.
5. recovery, make the processes which have opened the disks for reading or writing continue to do.
Why can't you just tar to take a running copy of the system?
If this, for some reason, unacceptable, you might want to familiarize yourself with raid mirroring (they make an exact copy of the partition while it is actively in use). Alternatively you can try to do some tricks with lvm; they do process holding and some other tricks when moving data around in physical layers.
กกกก
At present, lvm have realized above functions(freeze function) on the file system reiserfs, Veritas File System also have realized on the file system vxfs.
Now I also want to realize above functions on the file system ext3 not to use lvm or Veritas File System. But I don't know how to do.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.