how to mount a zfs drive from promox?

chalan

Member
Mar 16, 2015
119
4
16
my hw crashed... i have to pull out one hdd and put to usb docking station conected to my desktop pc for saving data from zfs pool... but

Code:
chalan@chalan-Desktop:~$ sudo zpool status
  pool: rpool
 state: DEGRADED
status: One or more devices could not be used because the label is missing or
    invalid.  Sufficient replicas exist for the pool to continue
    functioning in a degraded state.
action: Replace the device using 'zpool replace'.
   see: http://zfsonlinux.org/msg/ZFS-8000-4J
  scan: resilvered 2,21M in 0h0m with 0 errors on Sat Jul 16 20:32:11 2016
config:

    NAME                                                STATE     READ WRITE CKSUM
    rpool                                               DEGRADED     0     0     0
      mirror-0                                          DEGRADED     0     0     0
        17551691794009115926                            UNAVAIL      0     0     0  was /dev/disk/by-id/ata-WDC_WD10EFRX-68JCSN0_WD-WMC1U6546808-part2
        ata-WDC_WD10EFRX-68PJCN0_WD-WCC4J2021886-part2  ONLINE       0     0     0

errors: No known data errors

Code:
chalan@chalan-Desktop:~$ sudo mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=4018176k,nr_inodes=1004544,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=808088k,mode=755)
/dev/sda2 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=32,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=13817)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
rpool on /rpool type zfs (rw,noatime,xattr,noacl)
rpool/ROOT on /rpool/ROOT type zfs (rw,noatime,xattr,noacl)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=808088k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

but

Code:
chalan@chalan-Desktop:~$ ls -lh /rpool/ROOT/pve-1/
total 0
where are my data from pve? please help...
 
Last edited:
  • Like
Reactions: darkshand
To see ZFS volumes
#zfs list

To mount zvol as filesystem
#mount -t fs_type /dev/zvol/pool_name/zvol_name /mount/point

edit

from your mount list I dont see mounted /rpool/ROOT/pve-1/
 
rpool/ROOT/pve-1 is not mounted because it wants to mount to / and this point already used.

#zfs set mountpint=/pve-1 rpool/ROOT/pve-1

and

#zfs mount rpool/ROOT/pve-1

can help you
 
i did something wrong :( at the beginnig a have done

sudo zpool import rpool -f

and now its look like
Code:
chalan@chalan-Desktop:~$ sudo zfs list
NAME               USED  AVAIL  REFER  MOUNTPOINT
rpool              893G  6,31G    96K  /rpool
rpool/ROOT         885G  6,31G    96K  /rpool/ROOT
rpool/ROOT/pve-1   885G  6,31G   885G  /
rpool/swap        7,44G  13,8G    88K  -
but
/dev/sda2 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
(my desktop drive)
 
thank you very much now i have done

sudo zfs set mountpoint=/media/chalan/proxmox/pve-1 rpool/ROOT/pve-1

and my data from pve are there...

after i make backup, how can i remove the zfs pool from my desktop?
 
  • Like
Reactions: lkProx
I can't find my previous conf files in /pve-1/etc/pve/qemu-server, the qemu-server folder doesn't exists. Is this normal?
 
Okay, make sure you copy that file. The intention would be to install it on a new proxmox installation so that when it boots, it mounts /etc/pve.
Then, you'll have all the access to the configuration files you need. [So, make a backup of the file. Copy it into the same position on a new proxmox installation. reboot that installation. hopefully profit.]

Note: You could do this on a separate machine, for safety, with a fresh install of proxmox . On the fresh proxmox, you replace its config.db with the backup, and reboot; it'll probably complain about missing things, but you're after the contents of /etc/pve.

Really, though, you'd do a fresh proxmox installation[on a different disk], restore the backup files and that db, reboot, and cross your fingers everything magically comes to life.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!