/bin/find: stat() error <File> : No such file or directory


 
Thread Tools Search this Thread
Operating Systems Solaris /bin/find: stat() error <File> : No such file or directory
# 22  
Old 06-10-2013
Can i directly run fsck on the /var mirrored partition as below?

Code:
fsck -y /var

instead of

Code:
fsck -y /dev/md/dsk/d140

Please assist as this is production environment.

Btw when i do metastat i dont see any warning messages.

Code:
>metastat d140
d140: Mirror
    Submirror 0: d141
      State: Okay         
    Submirror 1: d142
      State: Needs maintenance 
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 16780224 blocks (8.0 GB)

d141: Submirror of d140
    State: Okay         
    Size: 16780224 blocks (8.0 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c0t0d0s5          0     No            Okay   Yes 


d142: Submirror of d140
    State: Needs maintenance 
    Invoke: metareplace d140 c0t1d0s5 <new device>
    Size: 16780224 blocks (8.0 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c0t1d0s5          0     No     Maintenance   Yes 


Device Relocation Information:
Device   Reloc  Device ID
c0t0d0   Yes    id1,sd@SSEAGATE_ST973401LSUN72G_41107NMY____________3LB07NMY
c0t1d0   Yes    id1,sd@SSEAGATE_ST973401LSUN72G_2510P90D____________3LB0P90D

---------- Post updated at 12:06 PM ---------- Previous update was at 12:04 PM ----------

Sorry the above output of metastat is from the different machine, sp posting the output from the machine we are having issue with

Code:
metastat d140
d140: Mirror
    Submirror 0: d141
      State: Okay         
    Submirror 1: d142
      State: Okay         
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 16780224 blocks (8.0 GB)

d141: Submirror of d140
    State: Okay         
    Size: 16780224 blocks (8.0 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c0t0d0s5          0     No            Okay   Yes 


d142: Submirror of d140
    State: Okay         
    Size: 16780224 blocks (8.0 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c0t1d0s5          0     No            Okay   Yes 


Device Relocation Information:
Device   Reloc  Device ID
c0t0d0   Yes    id1,sd@SSEAGATE_ST973401LSUN72G_42114ZW2____________3LB14ZW2
c0t1d0   Yes    id1,sd@SSEAGATE_ST973401LSUN72G_42114QLS____________3LB14QLS


Last edited by Scott; 06-12-2013 at 03:43 PM.. Reason: CODE TAGS NOT QUOTE TAGS
# 23  
Old 06-10-2013
Code:
fsck -y /var

is correct.
It will pick the raw device from /etc/vfstab and that will be /dev/md/rdsk/d140
(BTW your other system has a broken disk.)
# 24  
Old 06-10-2013
Thank you for your information, Btw the machine with a broken disk, can i directly run the same command by booting with the single user mode?

Code:
boot -s
fsck -y /var


Last edited by Scott; 06-12-2013 at 03:44 PM.. Reason: Code tags not quote tags
# 25  
Old 06-10-2013
No, fsck repairs *logical* errors in the file system - not *physical* errors.
A broken disk needs to be replaced then re-mirrored. With the Solaris LVM it is a bit complex because the new disk needs to be partitioned and metadb needs to be recreated, before it can be re-mirrored. But all this can be done on the running system.
# 26  
Old 06-10-2013
Thanks for the information.

Can i run the below commands to fix the logical errors.

Firstly unmount the file system /var

Code:
umount /var

Then run fsck

Code:
fsck -y -F ufs /var

mount the file system back to online.

Code:
mount /var

or do i directly need to boot from the OK prompt using boot -s and then do umount on /var then run fsck and bring the /var online by using mount and then reboot the machine?
Please assist.

Last edited by Scott; 06-12-2013 at 03:44 PM.. Reason: Code tags NOT Quote tags
# 27  
Old 06-10-2013
Yes, you can try
Code:
umount /var

If this works you can directly proceed with fsck and mount, as you suggested.
But it will likely fail with "device busy" unless it is in single-user mode.
--
In single-user mode and OK prompt you'll loose remote connection e.g. ssh connection. So make sure you access the system through a console (ILO/ALOM board, serial console, grahical console, etc.).
You can shutdown -y -i 0 -g 0 to the OK prompt and then type boot -s.
# 28  
Old 06-10-2013
I'am not sure if u can run fsck /var with the OS running and i believe you would have to boot from cd and then mount /var, or change the /etc/hosts so it doesn't use /var, then reboot and then fsck var

Can you please assist?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Getting error: /usr/bin/env: ruby: No such file or directory

Hi, I installed ruby using rvm with root user on Linux. Now i m trying the below command as a non root user with sudo privileges. sudo /usr/local/rvm/rubies/ruby-2.2.5/bin/gem install passenger I get the below error: I had even reset the path for both gem as well as ruby as you... (8 Replies)
Discussion started by: mohtashims
8 Replies

2. UNIX for Dummies Questions & Answers

Cp: cannot stat ‘src/last??’: No such file or directory

Good day. I am trying to install the latest version of LAST program (last.cbrc.jp) on my Windows64bit using Cygwin64. I successfully downloaded it and followed the instructions on how to install it. However, when I tried to run the command "make install prefix=~", I got this error, as shown... (0 Replies)
Discussion started by: nicole_john_
0 Replies

3. UNIX for Dummies Questions & Answers

Cannot stat ‘/albiero’: No such file or directory

So on my external hard drive, I am trying to copy one folder into another folder sudo cp /albiero /home and get the error message cannot stat ‘/albiero': No such file or directory Though both folders exist drwxr-xr-x 44 root root 4096 Oct 31 15:15 albiero drwxr-xr-x 2 root ... (2 Replies)
Discussion started by: albiero
2 Replies

4. Shell Programming and Scripting

Cp: cannot stat No such file or directory

Hi Please review this script and let me know what i need to do. This is my script #!/bin/bash #SCRIPT: forms.sh #PURPOSE: Process a file line by line with redirected while-read loop. #PURPOSE: and copy the forms to the follder foldername=sample_dir mkdir -p $foldername while read... (5 Replies)
Discussion started by: Rami Reddy
5 Replies

5. UNIX for Dummies Questions & Answers

Cp: cannot stat...: no such file or directory

Please review the issue below and tell me what I need to do. I cannot copy the zip file. $ ls -l total 10 drwxrwx--- 1 root vboxsf 0 Feb 1 16:10 sf_Temp drwxrwx--- 2 root vboxsf 4096 Jan 31 17:59 sf_VBoxShared dr-xr-xr-x 6 oracle root 2048 Dec 19 09:20 VBOXADDITIONS_4.2.6_82870 $ cp -r... (2 Replies)
Discussion started by: lutus
2 Replies

6. Shell Programming and Scripting

Mv : cannot stat :no such file or directory

this is my script x=1 o=0 while do fi ];then (this check is a certain extension with a number exist) let x++ else mv /var/log/mrnet.log.1.gz /var/log/mrnet.log.$x.gz o=1 fi done mrnet.log.1.gz exist already... (1 Reply)
Discussion started by: Froob
1 Replies

7. Shell Programming and Scripting

#!/bin/bash cannot find file or directory

Hello, When i run a bash script on ubuntu i get this message.. #!/bin/bash cannot find file or directory... Can anibody help me with this, because the file actually exists.... Is there any extra configuration to be made? (5 Replies)
Discussion started by: oliveiraum
5 Replies

8. SuSE

cp: cannot stat no such file or directory

#!/bin/ksh cp /etc/apache2/vhosts.d/orginal/test-yast2_vhost.conf-bk /etc/apache2/vhosts.d/test-yast2_vhost.conf /usr/sbin/rcapache2 graceful when i ran this script I'm getting following error. cp: cannot stat /etc/apache2/vhosts.d/orginal/test-yast2_vhost.conf-bk no such file or directory... (1 Reply)
Discussion started by: s_linux
1 Replies

9. Shell Programming and Scripting

cp: cannot stat: No such file or directory

Hi there, I need some help with cp files from one directory into several others. The code is as follows: SUB=`ls src_directory | wc -l` OUT_LOOP=$(($SUB / $MK_NUMS)) IN_LOOP=$(($SUB % $MK_NUMS)) COUNT=$MK_NUMS while ] do mkdir dst_directory$COUNT ls -1 src_directory |... (4 Replies)
Discussion started by: Krush187
4 Replies

10. UNIX for Dummies Questions & Answers

/bin/sh: /usr/bin/vi: No such file or directory when doing crontab

I just set up an ftp server with Red Hat 5.2. I am doing the work, I'm baby stepping, but it seems like every step I get stuck. Currently, I'm trying to set up a crontab job, but I'm getting the following message: /bin/sh: /usr/bin/vi: No such file or directory. I see that vi exists in /bin/vi,... (3 Replies)
Discussion started by: kwalter
3 Replies
Login or Register to Ask a Question