Sponsored Content
Full Discussion: Power failure: file damage?
Top Forums UNIX for Dummies Questions & Answers Power failure: file damage? Post 302895103 by vbe on Friday 28th of March 2014 01:16:13 PM
Old 03-28-2014
All filsystems have a lost+found directory! If not you are looking for trouble...
So i suggest you correct that fact ASAP: as root type:
Code:
mklost+found

at the mount point of that file system!
then go and look in the man pages why...
Best regards
 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Xstartup file failure - HELP !!

Hi, dear Experts ! I need some help, again. Earlier in my work I experienced that one script included in '/etc/dt/config/Xstartup' file caused some serious troubles. But this is another story. The point here is: I changed the script so that it worked again. But... After restart of... (3 Replies)
Discussion started by: DGoubine
3 Replies

2. UNIX for Dummies Questions & Answers

Restart on power failure

How do I configure my workstation (Solaris 9) to restart and perform any check disk automatically if there is a power failure? Thanks. (1 Reply)
Discussion started by: here2learn
1 Replies

3. Solaris

Automatic reboot does not work after power failure

Hi all, I have a server SUN FUJITSU in solaris 10 ; result of uname -a is : SunOS MOBD1 5.10 Generic_118833-03 sun4us sparc FJSV,GPUZC-M I have configured the eeprom to auto-boot as usual and this automatic reboot does not work in case of power failure. I must type "boot" on the prompt "ok"... (5 Replies)
Discussion started by: aribault
5 Replies

4. Shell Programming and Scripting

writting a shell script to delete damage files

hi, I have 100 files say File1.mp3, File2.mp3 .......file100.mp3 i found that File1.mp3 to File50.mp3 are damaged. I want to delete the damaged files from the directory using sed with regex how can i do this. thanks (5 Replies)
Discussion started by: pchangba
5 Replies

5. SCO

file system not getting mounted in read write mode after system power failure

After System power get failed File system is not getting mounted in read- write mode (1 Reply)
Discussion started by: gtkpmbpl
1 Replies

6. UNIX for Dummies Questions & Answers

boot up failure unix sco after power failure

hi power went out. next day unix sco wont boot up error code 303. any help appreciated as we are clueless. (11 Replies)
Discussion started by: fredthayer
11 Replies

7. Solaris

After power failure, SunFireV240 with SOLARIS 5.9 cannot start

SUNW, Sun Fire V240 Spare Sun OS Release 5.9 After a power failure we try to start the server We have the following messages: Thanks for your assistance (7 Replies)
Discussion started by: doudou2012
7 Replies

8. Shell Programming and Scripting

Failure of sftp send to log file

I want to transfer all details of sftp connection into a log file and spawn sftp $PCMSu@$FTP_LOC >> log_file is not working for me. Please suggest how to send the data to a log file that has all information if sftp connection is successful or not? Script that I am using: #!/usr/bin/expect... (7 Replies)
Discussion started by: Geeta Yadav
7 Replies
PIVOT_ROOT(2)						     Linux Programmer's Manual						     PIVOT_ROOT(2)

NAME
pivot_root - change the root file system SYNOPSIS
int pivot_root(const char *new_root, const char *put_old); DESCRIPTION
pivot_root() moves the root file system of the calling process to the directory put_old and makes new_root the new root file system of the calling process. The typical use of pivot_root() is during system startup, when the system mounts a temporary root file system (e.g., an initrd), then mounts the real root file system, and eventually turns the latter into the current root of all relevant processes or threads. pivot_root() may or may not change the current root and the current working directory of any processes or threads which use the old root directory. The caller of pivot_root() must ensure that processes with root or current working directory at the old root operate correctly in either case. An easy way to ensure this is to change their root and current working directory to new_root before invoking pivot_root(). The paragraph above is intentionally vague because the implementation of pivot_root() may change in the future. At the time of writing, pivot_root() changes root and current working directory of each process or thread to new_root if they point to the old root directory. This is necessary in order to prevent kernel threads from keeping the old root directory busy with their root and current working direc- tory, even if they never access the file system in any way. In the future, there may be a mechanism for kernel threads to explicitly relinquish any access to the file system, such that this fairly intrusive mechanism can be removed from pivot_root(). Note that this also applies to the calling process: pivot_root() may or may not affect its current working directory. It is therefore rec- ommended to call chdir("/") immediately after pivot_root(). The following restrictions apply to new_root and put_old: - They must be directories. - new_root and put_old must not be on the same file system as the current root. - put_old must be underneath new_root, that is, adding a nonzero number of /.. to the string pointed to by put_old must yield the same directory as new_root. - No other file system may be mounted on put_old. See also pivot_root(8) for additional usage examples. If the current root is not a mount point (e.g., after chroot(2) or pivot_root(), see also below), not the old root directory, but the mount point of that file system is mounted on put_old. new_root does not have to be a mount point. In this case, /proc/mounts will show the mount point of the file system containing new_root as root (/). RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately. ERRORS
pivot_root() may return (in errno) any of the errors returned by stat(2). Additionally, it may return: EBUSY new_root or put_old are on the current root file system, or a file system is already mounted on put_old. EINVAL put_old is not underneath new_root. ENOTDIR new_root or put_old is not a directory. EPERM The calling process does not have the CAP_SYS_ADMIN capability. VERSIONS
pivot_root() was introduced in Linux 2.3.41. CONFORMING TO
pivot_root() is Linux-specific and hence is not portable. NOTES
Glibc does not provide a wrapper for this system call; call it using syscall(2). BUGS
pivot_root() should not have to change root and current working directory of all other processes in the system. Some of the more obscure uses of pivot_root() may quickly lead to insanity. SEE ALSO
chdir(2), chroot(2), stat(2), initrd(4), pivot_root(8) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2007-06-01 PIVOT_ROOT(2)
All times are GMT -4. The time now is 10:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy