Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
04-17-2022, 05:32 AM
|
#1
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,515
|
Disk Question for hardware heads.
I've recently found a load of orphaned inodes on a partition. Rather than rely on the repair, I restored a backup.
Is there a way to relate those inodes to files or directories which can cut down the amount of rewriting and allow me to be a bit more diagnostic about the files?
Last edited by business_kid; 04-17-2022 at 05:37 AM.
|
|
|
04-17-2022, 06:49 AM
|
#2
|
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 8,253
|
There's a libc function called readdir which will read out directory entries. It returns structures that have an inode number as the first field and a filename as the last. You could write a little program that runs this function on each directory in turn and picks up the filenames corresponding to the inodes. Maybe write them into a file on another partition.
|
|
|
04-17-2022, 08:23 AM
|
#3
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,190
|
1. how do you know you have orphaned inodes?
2. did you try to run fsck -N on that filesystem?
3. you can use testdisk or photorec or similar to recover lost files.
|
|
|
04-18-2022, 04:52 AM
|
#4
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,515
Original Poster
|
Thanks, hazel, but a libc function isn't a lot of use unless I can use it!
What you're effectively telling me is that no program uses it?
@pan64: I don't see a path to an answer in your questions, but as you ask: - e2fsck told me.
- Yes, it doesn't do much.
- I don't need to, e2fsck fixed them.
|
|
|
04-18-2022, 05:10 AM
|
#5
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,378
|
By definition, orphans aren't related to any current non-deleted entity. Recovering them is moot.
Quote:
Originally Posted by business_kid
I don't need to, e2fsck fixed them.
|
So why do you care ?.
|
|
|
04-18-2022, 03:11 PM
|
#6
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,515
Original Poster
|
Quote:
Originally Posted by syg00
By definition, orphans aren't related to any current non-deleted entity. Recovering them is moot.So why do you care ?.
|
Because I lost sound in my RazPi 4 overnight. I fsck'ed the disk, found orphaned inodes, but still no sound. I restored a backup, but still no sound. But if I use an sdcard instead of disk drive, I have sound 
|
|
|
04-18-2022, 03:42 PM
|
#7
|
Senior Member
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250
Rep: 
|
You peaked my interest here, so I did a little bit of reading. In particular, https://unix.stackexchange.com/quest...orphaned-inode
I don't know if this does anything for you, but ...
Quote:
An orphaned inode is a file that is “semi-deleted”: it has no more directory entry, but it's still open in some process, so the data is still present on the disk. When the last process that has this file open closes it, the file will be fully deleted and the orphaned inode will disappear.
|
|
|
|
04-19-2022, 12:23 AM
|
#8
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,190
|
Quote:
Originally Posted by business_kid
Because I lost sound in my RazPi 4 overnight. I fsck'ed the disk, found orphaned inodes, but still no sound. I restored a backup, but still no sound. But if I use an sdcard instead of disk drive, I have sound 
|
Looks like your installation is corrupted. Probably would be better to save important data (including configs) and reinstall. Recovering is not that simple [sometimes].
Or just compare the content on the sdcard and disk drive.
|
|
|
04-19-2022, 06:21 AM
|
#9
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,515
Original Poster
|
The cause of this was (100%) a rough power down.
I deleted the filesystems (/boot & / but not /home). I remade the filesystems, and restored a backup again.
I have a little progress, but no sound.
In pavucontrol, there's a sort of 'VU Meter' on the "Playback" & "Output Devices" tabs. Now I have sound on the "Playback" tab, but not the "Output Devices." Is that in the least way diagnostic? Is it a firmware issue?
BTW, I'm recovering from Covid and am back running with full sound on the sdcard.
Last edited by business_kid; 04-19-2022 at 06:23 AM.
|
|
|
04-24-2022, 01:57 PM
|
#10
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,515
Original Poster
|
Ok, I FINALLY got this.
I've done disk restores, etc. and still ended up exactly where I was - no sound.
I had vu displays in pavucontrol/playback, but none in output devices. I was trawling through that, and discovered a 3rd icon to the left of the lock symbol. I clicked on it, and sound was restored. It was some sort of mute thing.
I'm mentally exhausted, but it's sorted.
EDIT: As soon asw I clicked on this unlabelled icon, it vanished. I'm sure I passed it many times without noticing it.
Last edited by business_kid; 04-25-2022 at 07:55 AM.
|
|
|
All times are GMT -5. The time now is 08:29 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|