LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   tune2fs says Couldn't find valid filesystem superblock (https://www.linuxquestions.org/questions/linux-newbie-8/tune2fs-says-couldnt-find-valid-filesystem-superblock-807428/)

anon091 05-12-2010 01:26 PM

tune2fs says Couldn't find valid filesystem superblock
 
I'm logged into a server through the CLI and did a df -T and confirmed all my volumes are ext3. but when I do a tune2fs -l /dev/sde it tells me
tune2fs 1.39 (29-May-2006)
tune2fs: Permission denied while trying to open /dev/sde
Couldn't find valid filesystem superblock.

I don't have root access on the server, but is that why it's complaining, or is my syntax incorrect?

MensaWater 05-12-2010 01:46 PM

First error was:
Quote:

tune2fs: Permission denied while trying to open /dev/sde
Typically you should focus on the first error as it may be the source of later errors. In this case it told you it couldn't open the device due to a permission error which suggests that the most likely reason it couldn't find the superblock is is couldn't search for it in the first place.

Does /dev/sde exists?

What permissions are on the file?

Are you running your tune2fs command as root?

Does fdisk -l /dev/sde show you anything?

anon091 05-12-2010 01:51 PM

I dont have root access on the server unfortunately, which was my guess as to why it wasn't working, which I think you've just confirmed by your questioning. Thanks!

chrism01 05-12-2010 06:39 PM

Try

/sbin/tune2fs

should work even as non-root, at least for read-only ops

anon091 05-13-2010 07:17 AM

thanks Chris, much appreciated.

syg00 05-13-2010 07:43 AM

<rant>
Security by obscurity is mind-numbingly inane.
Not quite as stupid as requiring root/sudo as Ubuntu tend to even for something as innocuous as "fdisk -l", but bloody close.
</rant>

MensaWater 05-13-2010 08:07 AM

Quote:

Originally Posted by chrism01 (Post 3966386)
Try

/sbin/tune2fs

should work even as non-root, at least for read-only ops

Didn't work for me on CentOS5. It ran the command but got the permission error. I don't think his issue was finding tune2fs but rather that /dev/sde doesn't have permissions for him to read the device directly.

Typically disk files are owned by root and grouped to disk and no permissions are given to non-root users. There isn't much reason non-root users should be directly accessing disk devices especially if filesystems have been laid out on them. If they're being used for raw devices then one should be using /dev/raw paths rather than the device itself.

Also I missed it in the first reply: /dev/sde would be the entire disk - typically filesystems are laid out on disk partitions rather than the entire disk so it seems you should be looking at something like /dev/sde1 (first partition) rather than /dev/sde even if it were root. (Of course this assumes it isn't on an LVM Logical Volume or Metadisk software raid.) Run "df -h <filesystem_directory_mount>" to see what the device for the filesystem is.

MensaWater 05-13-2010 08:08 AM

Quote:

Originally Posted by syg00 (Post 3966911)
<rant>
Security by obscurity is mind-numbingly inane.
Not quite as stupid as requiring root/sudo as Ubuntu tend to even for something as innocuous as "fdisk -l", but bloody close.
</rant>

I don't see this as a case of obscurity. As noted in my post above I don't believe the issue was lack of full path. The OP's original results show he had tune2fs in his PATH.

syg00 05-13-2010 08:22 AM

Point taken - I was in a particularly cranky mood with distro devs at the time. Not an unusual situation it must be said.


All times are GMT -5. The time now is 10:16 PM.