Re: zfs, autofs dependencies
On 03.04.2015 23:21, David Wright wrote: Those scripts have logging lines. Have you read their output? Yes, there are logging, But there is no any suspection lines in that log files. Only error is given when it's trying to mount devices so there are: /backup/network - error mounting /backup/op - error mounting /backup - success Despite that in /etc/fstab the /backup mount is specified first, it is mounting third at order. Its strange. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/551fb230.9030...@gmail.com
Re: zfs, autofs dependencies
On 03.04.2015 23:21, David Wright wrote: I'm as yet unconvinced. I can't see in your original posting where you've told ZFS how to manage mounting your volumes. In my original post I've wrote: zfs create -V 4T zfspool/backup zfs create -V 1T zfspool/network zfs create -V 1T zfspool/op mount /dev/zvol/zfspool/backup /backup mount /dev/zvol/zfspool/network /backup/network mount /dev/zvol/zfspool/op /backup/op Lats three commands can be put in /etc/fstab -- Mimiko desu. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/551fb24d.6080...@gmail.com
Re: zfs, autofs dependencies
Quoting Mimiko (vbv...@gmail.com): On 03.04.2015 23:21, David Wright wrote: I'm as yet unconvinced. I can't see in your original posting where you've told ZFS how to manage mounting your volumes. In my original post I've wrote: zfs create -V 4T zfspool/backup zfs create -V 1T zfspool/network zfs create -V 1T zfspool/op mount /dev/zvol/zfspool/backup /backup mount /dev/zvol/zfspool/network /backup/network mount /dev/zvol/zfspool/op /backup/op Lats three commands can be put in /etc/fstab You can't put commands in /etc/fstab; it's not executable. And there's not much context for those reposted lines... I see you originally did # zpool create -f -m none -o ashift=12 zfspool raidz2 disk1 What does that -m none mean? So you have a pool; then 3 zfs create commands make 3 filesystems? Then, with a directory in your / called /backup, # mount /dev/zvol/zfspool/backup /backup mounted the first created filesystem there. Did you then have to mkdir the mountpoints /backup/network and /backup/op for the following two commands to work? # mount /dev/zvol/zfspool/network /backup/network # mount /dev/zvol/zfspool/op /backup/op Having got everything to mount ok, you then rebooted? Is that right? Sorry to single-step through this, but that's the only way for me to know what you actually did. Cheers, David. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20150405053549.ga21...@alum.home
Re: zfs, autofs dependencies
On 01.04.2015 17:55, Reco wrote: No, the problem is related to the Debian indeed. As ZFS is used as an LVM here, so you might as well replace those fancy/dev/zvol/* with something conventional, and the problem will still remain. Consider the following /etc/fstab. /dev/sda1 /backup ext4 noauto,nofail,user_xattr 0 2 /dev/sda2 /backup/network ext4 noauto,nofail,user_xattr 0 2 /dev/sda3 /backup/op ext4 noauto,nofail,user_xattr 0 2 How do you can use /etc/fstab to specify a mount order? Without resorting to the shell scripts, of course. You are right. ZFS here acts only as an LVM to create those devices. But zfs-mount reads the content of /etc/fstab and if find's any device within /dev/zvol/ it does for it a simple mount command. The zfs-mount contains this script to mount: read_fstab() { for fs in ${!FSTAB[@]} ; do unset FSTAB[$fs] ; done while read -r fs mntpnt fstype opts blah ; do fs=`printf '%b\n' $fs` FSTAB[$fs]=$mntpnt done (grep -E $1 /etc/fstab) } do_mount() { if [ -n $POOL_IMPORTED ]; then [ $VERBOSE_MOUNT == 'yes' ] verbose=v [ $DO_OVERLAY_MOUNTS == 'yes' ] overlay=O $log_begin_msg Mounting ZFS filesystems not yet mounted $ZFS mount -a$verbose$overlay $MOUNT_EXTRA_OPTIONS RET=$? if [ $RET != 0 ] ; then $log_end_msg $RET exit $RET fi $log_end_msg 0 read_mtab ^/dev/(zd|zvol) read_fstab ^/dev/(zd|zvol) $log_begin_msg Mounting volumes registered in fstab: for volume in ${!FSTAB[@]} ; do if in_mtab $volume ; then continue ; fi $log_progress_msg $volume mount $volume done $log_end_msg 0 fi } start() { checksystem { case $ZFS_MOUNT in ([Oo][Ff][Ff]|[Nn][Oo]|'') exit 3 ;; esac do_import do_mount do_mount touch $LOCKDIR/$servicename } } As it can be seen, mount of devices are done in the order which they are described in /etc/fstab. Maybe the next mount command is started before previous mount command finished and fully mounted /backup? -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/551e3f4c.2050...@gmail.com
Re: zfs, autofs dependencies
Quoting Mimiko (vbv...@gmail.com): On 01.04.2015 17:55, Reco wrote: No, the problem is related to the Debian indeed. As ZFS is used as an LVM here, so you might as well replace those fancy/dev/zvol/* with something conventional, and the problem will still remain. I'm as yet unconvinced. I can't see in your original posting where you've told ZFS how to manage mounting your volumes. BTW I know nothing about zfs. I feel rather like The Ruler of the Universe/man in a shack (HHG), except I'm asking the questions. [...] As it can be seen, mount of devices are done in the order which they are described in /etc/fstab. Maybe the next mount command is started before previous mount command finished and fully mounted /backup? Those scripts have logging lines. Have you read their output? Cheers, David. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20150403202135.ga13...@alum.home
Re: zfs, autofs dependencies
On Wed, Apr 01, 2015 at 02:15:32PM +0300, Mimiko wrote: Hello. I've setup a file server on Debian Wheezy x86_64. I've used 2 ssd for system folders which are partitioned and used in software raid with mdadm. It's working ok. Also there are a bunch of disks which are combined in a big disk raid-z2 with zfs: zpool create -f -m none -o ashift=12 zfspool raidz2 disk1 On this poll I've created three volumes: zfs create -V 4T zfspool/backup zfs create -V 1T zfspool/network zfs create -V 1T zfspool/op mount /dev/zvol/zfspool/backup /backup mount /dev/zvol/zfspool/network /backup/network mount /dev/zvol/zfspool/op /backup/op As you can see, network and op a mount into /backup folder. No, the problem is where to describe mount parameters so it will follow the order? I've used in /etc/fstab: /dev/zvol/zfspool/backup /backup ext4 defaults,noauto,nofail,user_xattr,acl,barrier=1 0 2 /dev/zvol/zfspool/network /backup/network ext4 defaults,noauto,nofail,user_xattr,acl,barrier=1 0 2 /dev/zvol/zfspool/op /backup/op ext4 defaults,noauto,nofail,user_xattr,acl,barrier=1 0 2 I've put noauto and nofail parameters so on boot system will not stop with error, because at boot zfs volumes are not ready and imported yet. Although, that I've used this in fstab, /backup/network and /backup/op are not mounted because they are mounted by zfs-mount in incorrect order, before /backup is mounted. So in /etc/init.d/zfs-mount script I've found do_mount() command and duplicated it. First time do_mount() mounts only /backup, second time do_mount() can mount other disks. The question is, is there are method better to overcome this problem? How to specify mount order? How to enable zfs import early? Second problem arises for autofs. I've setup it, so in /backup are some iso files. But when autofs starts it does not find /backup, because it is not mounted yet. So the mounted by autofs folders are empty. I need to restart autofs for files to appear. How to specify that autofs should start after zfs mounted those partition? I suspect you will need to talk to the zfsonlinux mailing list. http://list.zfsonlinux.org/mailman/listinfo/zfs-discuss -dsr- -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20150401143329.gk26...@randomstring.org
Re: zfs, autofs dependencies
Hi. On Wed, 1 Apr 2015 10:33:29 -0400 Dan Ritter d...@randomstring.org wrote: On Wed, Apr 01, 2015 at 02:15:32PM +0300, Mimiko wrote: The question is, is there are method better to overcome this problem? How to specify mount order? How to enable zfs import early? I suspect you will need to talk to the zfsonlinux mailing list. http://list.zfsonlinux.org/mailman/listinfo/zfs-discuss No, the problem is related to the Debian indeed. As ZFS is used as an LVM here, so you might as well replace those fancy /dev/zvol/* with something conventional, and the problem will still remain. Consider the following /etc/fstab. /dev/sda1 /backup ext4 noauto,nofail,user_xattr 0 2 /dev/sda2 /backup/network ext4 noauto,nofail,user_xattr 0 2 /dev/sda3 /backup/op ext4 noauto,nofail,user_xattr 0 2 How do you can use /etc/fstab to specify a mount order? Without resorting to the shell scripts, of course. Reco -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20150401175539.343f9e126e5fcfbc773e2...@gmail.com