[SOLVED] Errors mounting Linux filesystems


#1

I have installed the Linux compatibility meta and some Linux-related fuse drivers, and have run the below,

sudo mount -t ext2fs /dev/ada0p23 /data

And that partition is surely ext3 or ext2 from Linux, but I only get ‘‘operation not permitted’’ and isnt returned to any error code, having read all the FreeBSD mount and ext2 plus related manuals dsnt help to troubleshoot what are the actual issues I’m facing.


#2

Is the drive dirty or clean. That error sounds like it might be flagged dirty


#3

Having fsck’ed ‘‘cannot find file system superblock’’ is returned to me, does this stand for a dirty partition? That’s a partition I’ve been using as non-system in Linux.


#4

yes. if you still have access to a linux machine, run fsck there


#5

did you run fsck from TrueOS or from Linux? If it was from TrueOS it means “TrueOS is not supposed to fsck Linux partitions”, so fsck it under Linux. There may be a tool in TrueOS Linux packages to do it, I just don’t know what it is.

Is there anything mounted on /data already? the command “mount” will tell you.


#6
hd_scania@hd-scania:~/
$ ls -la /data
total 48
drwxr-xr-x 12 hd_scania root     4096 Jan 18 15:22 .
drwxr-xr-x 18 root      root     4096 Jan 20 17:54 ..
drwxrwxr-x  2 hd_scania adbusers 4096 Jan 17 20:24 amd64
drwxr-xr-x  2 hd_scania root     4096 Sep 14 11:45 exe
drwxr-xr-x  4 hd_scania root     4096 Dec  4 16:06 git
drwxr-xr-x 13 hd_scania root     4096 Jan 13 16:48 lib
drwxr-xr-x  2 hd_scania root     4096 Sep 14 11:41 obs
drwxr-xr-x 11 hd_scania root     4096 Jan  2 19:37 terminal
drwxr-xr-x  3 hd_scania root     4096 Jan  9 14:41 tg
drwxr-xr-x  2 hd_scania root     4096 Sep 14 11:44 three.com
drwx------  5 hd_scania adbusers 4096 Jan 17 14:36 .Trash-1000
drwxr-xr-x  2 hd_scania root     4096 Jan 17 20:26 vm
hd_scania@hd-scania:~/
$ sudo fsck /dev/sda23
fsck from util-linux 2.31
e2fsck 1.43.8 (1-Jan-2018)
/dev/sda23 is mounted.
e2fsck: Cannot continue, aborting.
hd_scania@hd-scania:~/
$ sudo umount -fl /data && sudo fsck /dev/sda23 && sudo mount /dev/sda23 /data && ls -la /data
fsck from util-linux 2.31
e2fsck 1.43.8 (1-Jan-2018)
data was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
/lost+found not found.  Create<y>? no
Pass 4: Checking reference counts
Pass 5: Checking group summary information
data: ********** WARNING: Filesystem still has errors **********
data: 1313/8380416 files (55.8% non-contiguous), 11140590/33491712 blocks
hd_scania@hd-scania:~/
$ sudo mount /dev/sda23 /data && ls -la /data
total 48
drwxr-xr-x 12 hd_scania root     4096 Jan 18 15:22 .
drwxr-xr-x 18 root      root     4096 Jan 20 17:54 ..
drwxrwxr-x  2 hd_scania adbusers 4096 Jan 17 20:24 amd64
drwxr-xr-x  2 hd_scania root     4096 Sep 14 11:45 exe
drwxr-xr-x  4 hd_scania root     4096 Dec  4 16:06 git
drwxr-xr-x 13 hd_scania root     4096 Jan 13 16:48 lib
drwxr-xr-x  2 hd_scania root     4096 Sep 14 11:41 obs
drwxr-xr-x 11 hd_scania root     4096 Jan  2 19:37 terminal
drwxr-xr-x  3 hd_scania root     4096 Jan  9 14:41 tg
drwxr-xr-x  2 hd_scania root     4096 Sep 14 11:44 three.com
drwx------  5 hd_scania adbusers 4096 Jan 17 14:36 .Trash-1000
drwxr-xr-x  2 hd_scania root     4096 Jan 17 20:26 vm
hd_scania@hd-scania:~/
$

Above is my fsck log in Linux and my prev one is in TrueOS, and every time I shut down Linux systems this partition is never ‘‘clean’’ unmounted before this shutdown, but mounting it in every Linux systems at boot is not such problematic.


#7

Ok, so that is from running fsck on linux and it still shows errors. That may prevent it from mounting on TrueOS; I don’t have a configuration to test against.
Typically you run fsck until it no longer reports errors, Linux may be more forgiving about it.
On TrueOS side, maybe try mounting as read-only? That sometimes lets you mount things with errors.


#8

Now having mounted it as ro in TrueOS side but I don’t see any errors seen on the Linux side.


#9

So it mounted fine as ro in TrueOS? That’s a good data point.

Based on the log from running fsck in Linux, there are still errors on the partition/disk and those are why you can’t mount it rw in TrueOS.

Looking at the man page for Linux e2fs, maybe in linux try as root (or sudo)
umount -fl /dev/sda23 (the -fl for force and lazy should be ok)
e2fsck -pv /dev/sda23

repeat the e2fsck until it says no errors found. I don’t like the -f to force unless it’s a NFS mounted filesystem, but with the -l it should wait until it’s not being used.
the -v on e2fsck is “verbose” so we may get more info on the errors, the -p is “automatically fix things that don’t need human intervention”

Then try mounting rw in TrueOS.

I don’t have anything else to try


#10

I can run e2fsck under TrueOS in means of a Linux compatible environment (i.e. not needed to be run in a Linux distro :smiley:) and below is my log,

[hd_scania@trueos] ~% sudo umount -f /data && sudo e2fsck -pv /dev/ada0p23
data was not cleanly unmounted, check forced.
data: /lost+found not found.  CREATED.

        1315 inodes used (0.02%, out of 8380416)
         733 non-contiguous files (55.7%)
           0 non-contiguous directories (0.0%)
             # of inodes with ind/dind/tind blocks: 771/97/0
    11140592 blocks used (33.26%, out of 33491712)
           0 bad blocks
          10 large files

        1161 regular files
         144 directories
           0 character device files
           0 block device files
           0 fifos
           0 links
           0 symbolic links (0 fast symbolic links)
           0 sockets
------------
        1305 files                                                                                                                                                                              
[hd_scania@trueos] ~% sudo mount -t ext2fs -w /dev/ada0p23 /data && ls -la /data
total 57                                                                                                                                                                                        
drwxr-xr-x  13 hd_scania  wheel  4096 18 Jan 15:22 .                                                                                                                                            
drwxr-xr-x  22 root       wheel    44 25 Jan 18:57 ..                                                                                                                                           
drwx------   5 hd_scania  1000   4096 17 Jan 14:36 .Trash-1000                                                                                                                                  
drwxrwxr-x   2 hd_scania  1000   4096 17 Jan 20:24 amd64                                                                                                                                        
drwxr-xr-x   2 hd_scania  wheel  4096 14 Sep 11:45 exe                                                                                                                                          
drwxr-xr-x   4 hd_scania  wheel  4096  4 Dec 16:06 git                                                                                                                                          
drwxr-xr-x  13 hd_scania  wheel  4096 13 Jan 16:48 lib                                                                                                                                          
drwx------   2 root       wheel  4096 25 Jan 19:26 lost+found                                                                                                                                   
drwxr-xr-x   2 hd_scania  wheel  4096 14 Sep 11:41 obs                                                                                                                                          
drwxr-xr-x  11 hd_scania  wheel  4096  2 Jan 19:37 terminal                                                                                                                                     
drwxr-xr-x   3 hd_scania  wheel  4096  9 Jan 14:41 tg                                                                                                                                           
drwxr-xr-x   2 hd_scania  wheel  4096 14 Sep 11:44 three.com                                                                                                                                    
drwxr-xr-x   2 hd_scania  wheel  4096 17 Jan 20:26 vm                                                                                                                                           
[hd_scania@trueos] ~% cd /data && rm -rf .Trash* && ls -la
total 53                                                                                                                                                                                        
drwxr-xr-x  12 hd_scania  wheel  4096 25 Jan 19:31 .                                                                                                                                            
drwxr-xr-x  22 root       wheel    44 25 Jan 18:57 ..                                                                                                                                           
drwxrwxr-x   2 hd_scania  1000   4096 17 Jan 20:24 amd64                                                                                                                                        
drwxr-xr-x   2 hd_scania  wheel  4096 14 Sep 11:45 exe                                                                                                                                          
drwxr-xr-x   4 hd_scania  wheel  4096  4 Dec 16:06 git
drwxr-xr-x  13 hd_scania  wheel  4096 13 Jan 16:48 lib
drwx------   2 root       wheel  4096 25 Jan 19:26 lost+found
drwxr-xr-x   2 hd_scania  wheel  4096 14 Sep 11:41 obs
drwxr-xr-x  11 hd_scania  wheel  4096  2 Jan 19:37 terminal
drwxr-xr-x   3 hd_scania  wheel  4096  9 Jan 14:41 tg
drwxr-xr-x   2 hd_scania  wheel  4096 14 Sep 11:44 three.com
drwxr-xr-x   2 hd_scania  wheel  4096 17 Jan 20:26 vm
[hd_scania@trueos] /data% cd /data && rm -rf .Trash* && ls -la
total 53                                                                                                                                                                                        
drwxr-xr-x  12 hd_scania  wheel  4096 25 Jan 19:31 .                                                                                                                                            
drwxr-xr-x  22 root       wheel    44 25 Jan 18:57 ..                                                                                                                                           
drwxrwxr-x   2 hd_scania  1000   4096 17 Jan 20:24 amd64                                                                                                                                        
drwxr-xr-x   2 hd_scania  wheel  4096 14 Sep 11:45 exe                                                                                                                                          
drwxr-xr-x   4 hd_scania  wheel  4096  4 Dec 16:06 git
drwxr-xr-x  13 hd_scania  wheel  4096 13 Jan 16:48 lib
drwx------   2 root       wheel  4096 25 Jan 19:26 lost+found
drwxr-xr-x   2 hd_scania  wheel  4096 14 Sep 11:41 obs
drwxr-xr-x  11 hd_scania  wheel  4096  2 Jan 19:37 terminal
drwxr-xr-x   3 hd_scania  wheel  4096  9 Jan 14:41 tg
drwxr-xr-x   2 hd_scania  wheel  4096 14 Sep 11:44 three.com
drwxr-xr-x   2 hd_scania  wheel  4096 17 Jan 20:26 vm
[hd_scania@trueos] /data%

Finally that issue was over and all settled.:sun_with_face:


#11

Fantastic! You now have /data mounted rw under TrueOS? Good. Could you write a quick summary up under the TrueOS Tips, Tricks, and FAQ topic? Just something simple like “if you have trouble mounting ext partitions as rw, try these commands”. Putting something up there helps the “next guy” that has the same issue.


#12

A spinoff should need your attention, that TrueOS shares the same Telegram bin with Linux, if you need to download a backup from Telegram you need to set the download dir under /compat/linux, i.e. to download sth to /tdl you need /compat/linux/tdl to let Telegram know.