1

The memory of my Ubuntu desktop is pretty full, and I could not turn it on. So, I got in Ubuntu from a bootable Ubuntu USB stick, and tried to access files which I saved in the hard drive.

I basically followed the instructions in

https://www.svennd.be/mount-unknown-filesystem-type-zfs_member/

I did:

ubuntu@ubuntu:~$ sudo zfs get all rpool |grep mountpoint
rpool  mountpoint            /mnt/mydisk            local
ubuntu@ubuntu:~$ sudo zfs mount rpool    
ubuntu@ubuntu:~$ cd /mnt/my*
ubuntu@ubuntu:/mnt/mydisk$ ll
total 1
drwxr-xr-x 2 root root  2 Sep 25 19:14 ./
drwxr-xr-x 1 root root 80 Feb 12 10:17 ../

Where could I find my files in the hard drive?

I have:

ubuntu@ubuntu:~$ zpool list
NAME         SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
rpool        944G   915G  29.5G        -         -    45%    96%  1.00x    ONLINE  -
temp_rpool  1.88G   872M  1.02G        -         -     2%    45%  1.00x    ONLINE  -

So, rpool should be the hard drive.

According to:

ubuntu@ubuntu:~$ df -h
Filesystem                   Size  Used Avail Use% Mounted on
udev                          16G     0   16G   0% /dev
tmpfs                        3.2G  323M  2.9G  11% /run
/dev/sda1                    2.6G  2.6G     0 100% /cdrom
/dev/loop0                   2.0G  2.0G     0 100% /rofs
/cow                          16G  453M   16G   3% /
/dev/disk/by-label/writable   54G   70M   51G   1% /var/log
tmpfs                         16G   29M   16G   1% /dev/shm
tmpfs                        5.0M  4.0K  5.0M   1% /run/lock
tmpfs                         16G     0   16G   0% /sys/fs/cgroup
tmpfs                         16G  568K   16G   1% /tmp
tmpfs                        3.2G  128K  3.2G   1% /run/user/999
/dev/loop1                    30M   30M     0 100% /snap/snapd/8542
/dev/loop2                    55M   55M     0 100% /snap/core18/1880
/dev/loop3                   256M  256M     0 100% /snap/gnome-3-34-1804/36
/dev/loop4                    63M   63M     0 100% /snap/gtk-common-themes/1506
/dev/loop5                    50M   50M     0 100% /snap/snap-store/467
/dev/sdb1                    2.6G  2.6G     0 100% /media/ubuntu/Ubuntu 20.04.1 LTS amd64
/dev/sdb3                     54G   78M   51G   1% /media/ubuntu/writable
temp_rpool                   920M  128K  920M   1% /mnt/datadisk
temp_rpool/vm_guests         920M  128K  920M   1% /mnt/datadisk/vm_guests
rpool                        128K  128K     0 100% /mnt/mydisk

the hard drive, rpool, should be seen in /mnt/mydisk​.

Any ideas regarding how I could access files in the hard drive, so that I could delete some of the files?

Thank you!!

1 Answer 1

0

They are under the pool(s) created in my install I show here I created a pool named WD4.

root@zeus-H370M:~# zpool list
NAME   SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
WD4   3.62T  1.20T  2.42T        -         -     0%    33%  1.00x    ONLINE  -
root@zeus-H370M:~# df  -h | grep WD4
WD4             2.4T  128K  2.4T   1% /WD4
WD4/Files       3.0T  663G  2.4T  22% /Volumes/Files
WD4/Music       2.9T  570G  2.4T  20% /Volumes/Music

And can access any file for it via their mount points.

root@zeus-H370M:~# ls -l /Volumes/
total 1
drwxr-xr-x 4 zeus zeus 4 Jan 27 08:47 Files
drwxr-xr-x 3 zeus zeus 3 Jan 27 01:21 Music

You have not created any significant storage area under the rpool to have any files on. Whatever command you used to import that pool was not correct forget the way they tell you and export the both pools and only import the rpool as it is the only thing with a size that can contain many files on it then you should have chance of finding the data on it, if they were ever there. The temp_rpool is only 1.8G in size with 872M of files on it all contained in the path /mnt/datadisk/vm_guests/.

zpool export rpool
zpool export temp_rpool
zpool import rpool

Then create your storage area(s) on the rpool where you can set the mount point of them to what you wish it to be. Proceeding to copy whatever files you want into those mount points you create or using the default path the zfs creates for them. When the rpool is simply imported like this the data contained on that should be available at the mount point for it, there is no need for any extras to the command to import to get access.

4
  • Thank @HappyTux for the coments! I have tried export and import commands. Unfortunately, they could not be recognized. For example: <pre>ubuntu@ubuntu:~$ zfs import rpool unrecognized command 'import' </pre>
    – ML6634
    Feb 15, 2021 at 6:32
  • Sorry brain fade, I used the wrong one of the commands it should be zpool not the one that manipulates the attributes/creation/deletion of the pool the zfs. I have updated the answer to reflect this.
    – user1179897
    Feb 15, 2021 at 7:05
  • Now I have: $ sudo zpool export rpool $ sudo zpool import rpool cannot mount '/': directory is not empty $ sudo zfs get all rpool |grep mountpoint rpool mountpoint /mnt/mydisk local $ zpool list NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT rpool 944G 915G 29.5G - - 45% 96% 1.00x ONLINE - $ df -h | grep rpool //No output. Any further comments? Thank you!
    – ML6634
    Feb 16, 2021 at 14:17
  • sudo zfs set mountpoint=/what/you/want/it/to/be rpool. Then mkdir /what/you/want/it/to/be and import then pool using that as the mount point. That should work for what you want to do, you need to have used zfs create zpool/data_storage_area to have created a storage pool under the rpool to be able to access one. Then use in with the mount point creation to it used where you want a rpool/data_storage_area used in the first command to set the mount point for it. If wanting normal user able to access the pool without sudo used sudo chown user_name:user_name /what/you/want/it/to/be
    – user1179897
    Feb 16, 2021 at 14:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.