Re: zpool asize problem on 11.0
On 12/01/2017 22:57, Stefan Bethke wrote: Am 12.01.2017 um 23:29 schrieb Stefan Bethke : I’ve just created two pools on a freshly partitioned disk, using 11.0 amd64, and the shift appears to be 9: # zpool status -v host pool: host state: ONLINE status: One or more devices are configured to use a non-native block size. Expect reduced performance. action: Replace affected devices with devices that support the configured block size, or migrate data to a properly configured pool. scan: none requested config: NAME STATE READ WRITE CKSUM host ONLINE 0 0 0 gpt/host0 ONLINE 0 0 0 block size: 512B configured, 4096B native errors: No known data errors # zdb host | grep ashift ashift: 9 ashift: 9 But: # sysctl vfs.zfs.min_auto_ashift vfs.zfs.min_auto_ashift: 12 Of course, I’ve noticed this only after restoring all the backups, and getting ready to put the box back into production. Is this expected behaviour? I guess there’s no simple fix, and I have to start over from scratch? I had falsely assumed that vfs.zfs.min_auto_ashift would be 12 in all circumstances. It appears when running FreeBSD 11.0p2 in VirtualBox, it can be 9. And my target disk was attached to the host and mapped into the VM as a „native disk image“, but the 4k native sector size apparently got lost in that abstraction. The output above is with the disk installed in the target system with a native AHCI connection, and the system booted from that disk. I’ve certainly learned to double check the ashift property on creating pools. The default value for vfs.zfs.min_auto_ashift is 9, so unless you specifically set it to 12 you will get the behaviour you described. Regards Steve ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: zpool asize problem on 11.0
> Am 12.01.2017 um 23:29 schrieb Stefan Bethke : > > I’ve just created two pools on a freshly partitioned disk, using 11.0 amd64, > and the shift appears to be 9: > > # zpool status -v host > pool: host > state: ONLINE > status: One or more devices are configured to use a non-native block size. > Expect reduced performance. > action: Replace affected devices with devices that support the > configured block size, or migrate data to a properly configured > pool. > scan: none requested > config: > > NAME STATE READ WRITE CKSUM > host ONLINE 0 0 0 > gpt/host0 ONLINE 0 0 0 block size: 512B configured, > 4096B native > > errors: No known data errors > > # zdb host | grep ashift >ashift: 9 >ashift: 9 > > But: > # sysctl vfs.zfs.min_auto_ashift > vfs.zfs.min_auto_ashift: 12 > > Of course, I’ve noticed this only after restoring all the backups, and > getting ready to put the box back into production. > > Is this expected behaviour? I guess there’s no simple fix, and I have to > start over from scratch? I had falsely assumed that vfs.zfs.min_auto_ashift would be 12 in all circumstances. It appears when running FreeBSD 11.0p2 in VirtualBox, it can be 9. And my target disk was attached to the host and mapped into the VM as a „native disk image“, but the 4k native sector size apparently got lost in that abstraction. The output above is with the disk installed in the target system with a native AHCI connection, and the system booted from that disk. I’ve certainly learned to double check the ashift property on creating pools. Stefan -- Stefan BethkeFon +49 151 14070811 ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
zpool asize problem on 11.0
I’ve just created two pools on a freshly partitioned disk, using 11.0 amd64, and the shift appears to be 9: # zpool status -v host pool: host state: ONLINE status: One or more devices are configured to use a non-native block size. Expect reduced performance. action: Replace affected devices with devices that support the configured block size, or migrate data to a properly configured pool. scan: none requested config: NAME STATE READ WRITE CKSUM host ONLINE 0 0 0 gpt/host0 ONLINE 0 0 0 block size: 512B configured, 4096B native errors: No known data errors # zdb host | grep ashift ashift: 9 ashift: 9 But: # sysctl vfs.zfs.min_auto_ashift vfs.zfs.min_auto_ashift: 12 Of course, I’ve noticed this only after restoring all the backups, and getting ready to put the box back into production. Is this expected behaviour? I guess there’s no simple fix, and I have to start over from scratch? Stefan -- Stefan BethkeFon +49 151 14070811 ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: Can't boot on ZFS -- /boot/zfsloader not found
On 12/01/2017 21:12, Jeremie Le Hen wrote: Hey Steven, (Please cc: me on reply) On Thu, Jan 12, 2017 at 1:32 AM, Steven Hartlan The reason I'd recommend 512k for boot is to provide room for expansion moving forward, as repartitioning to upgrade is a scary / hard thing to do. Remember it wasn't long ago when it was well under 64k and that's what was recommend, its not like with disk sizes these days you'll miss the extra 384k ;-) Yeah, that's wise you're right. Boot to a live cd, I'd recommend mfsbsd, and make sure the boot loader was written to ALL boot disks correctly e.g. if you have a mirrored pool with ada0 and ada1: gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0 gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0 If this doesn't help the output from gpart show, uname -a and zpool status would also be helpful. This is all assuming standard BIOS mode and not UEFI which is done differently. I just use the installation media on an USB key and then drop to the shell. This is a full FreeBSD running, so that's fine. % # gpart show ada0 % => 40 312581728 ada0 GPT (149G) % 40 1024 1 freebsd-boot (512K) % 10648387840 2 freebsd-swap (4.0G) %8388904 304192864 3 freebsd-zfs (145G) % % # uname -a % FreeBSD 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 01:43:23 UTC 2016 % % r...@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 % % # zpool status % pool: zroot % state: ONLINE % scan: none requested % config: % %NAME STATE READ WRITE CKSUM %zroot ONLINE 0 0 0 % gptid/1c387d3b-d892-11e6-944b-f44d30620eeb ONLINE 0 0 0 % % errors: No known data errors Here are the steps to write the bootloader: % # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0 % partcode written to ada0p1 % bootcode written to ada0 % # zpool get bootfs zroot % NAME PROPERTY VALUE SOURCE % zroot bootfszroot local Two things spring to mind Idea 1: Is your root fs actually your direct pool or is it actually /root off your pool. If so you want to run: zpool set bootfs=zroot/root zroot Idea 2: You mentioned in your original post and you used zfs send / recv to restore the pool, so I wonder if your cache file is out of date. Try the following: |zpool export zroot zpool import -R /mnt -o cachefile=/boot/zfs/zpool.cache zroot cp /boot/zfs/zpool.cache /mnt/boot/zfs/zpool.cache zpool set bootfs=zroot/root zroot Regards Steve | ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: Can't boot on ZFS -- /boot/zfsloader not found
Hey Steven, (Please cc: me on reply) On Thu, Jan 12, 2017 at 1:32 AM, Steven Hartlan > The reason I'd recommend 512k for boot is to provide room for expansion > moving forward, as repartitioning to upgrade is a scary / hard thing to do. > Remember it wasn't long ago when it was well under 64k and that's what was > recommend, its not like with disk sizes these days you'll miss the extra > 384k ;-) Yeah, that's wise you're right. > Boot to a live cd, I'd recommend mfsbsd, and make sure the boot loader was > written to ALL boot disks correctly e.g. > if you have a mirrored pool with ada0 and ada1: > gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0 > gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0 > > If this doesn't help the output from gpart show, uname -a and zpool status > would also be helpful. > > This is all assuming standard BIOS mode and not UEFI which is done > differently. I just use the installation media on an USB key and then drop to the shell. This is a full FreeBSD running, so that's fine. % # gpart show ada0 % => 40 312581728 ada0 GPT (149G) % 40 1024 1 freebsd-boot (512K) % 10648387840 2 freebsd-swap (4.0G) %8388904 304192864 3 freebsd-zfs (145G) % % # uname -a % FreeBSD 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 01:43:23 UTC 2016 % % r...@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 % % # zpool status % pool: zroot % state: ONLINE % scan: none requested % config: % %NAME STATE READ WRITE CKSUM %zroot ONLINE 0 0 0 % gptid/1c387d3b-d892-11e6-944b-f44d30620eeb ONLINE 0 0 0 % % errors: No known data errors Here are the steps to write the bootloader: % # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0 % partcode written to ada0p1 % bootcode written to ada0 % # zpool get bootfs zroot % NAME PROPERTY VALUE SOURCE % zroot bootfszroot local -- Jeremie Le Hen j...@freebsd.org ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: NFS and amd on older FreeBSD
Dear Karl, > On 12 Jan 2017, at 20:29, Karl Young wrote: > > Daniel Braniss(da...@cs.huji.ac.il)@2017.01.12 10:25:03 +0200: >> >>> On 12 Jan 2017, at 9:49 AM, Daniel Braniss wrote: >>> >>> On 12 Jan 2017, at 1:47 AM, Karl Young wrote: I inherited a lab that has a few hundred hosts running FreeBSD 7.2. These hosts run test scripts that access files that are stored on FreeBSD 6.3 host. The 6.3 host exports a /data directory with NFS On the 7.2 hosts, I can see the exported directory: $ showmount -e 6.3-host Exports list on 6.3-host /data Everyone And access it with amd $ ls -l /net/6-3.host/data drwxr-xr-x 5 root wheel 512 Jun 4 2009 git drwxr-xr-x 4586 root wheel83968 Nov 2 04:50 home I'm trying to retire the 6.3 host and replace it with 9.3 (I know it's old, but it's the best I can do for now). I export the /data directory on the 9.3 system, and I can see it on my 7.2 hosts. $ showmount -e 9.3-host Exports list on 9.3-host: /data Everyone But I can't automount it: $ ls -l /net/9.3-host/data ls: /net/9.3-host/data: No such file or directory If I manually mount the exported directory, it works: $ sudo mount -t nfs 9.3-host:/data /mnt/data/ $ mount | grep nfs 9.3-host:/data on /mnt/data (nfs) $ ls -l /mnt/data total 4 drwxr-xr-x 9 root wheel 512 Dec 20 17:41 iaf2 I've spent some time on Google, but haven't found a solution. I realize these are very old versions, but I'm not in a position to upgrade them right now. My last resort will be to use /etc/fstab to do the NFS mount, but I'd rather avoid that if I can. Thanks for any pointers on how to resolve this. -karl >>> >>> if you changed the export file on the server after you tried to mount in on >>> the client, >>> and will not realise this, if that’s the case, usually rebooting the client >>> helps. >>> >> s/and/amd/ ^%$# hate spell checkers >> > > Thanks Danny > > I did try rebooting the client (and server) multiple times to no avail. > > -karl I'm not sure if this is related, but afaik FreeBSD up to 8.x used oldNFS by default. Are you using option -o for nfsd on your 9.3 nfs Server to force using old NFS? It is just a guess of mine, I'm usually not working much with nfs. Best regards, Holger ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: NFS and amd on older FreeBSD
Daniel Braniss(da...@cs.huji.ac.il)@2017.01.12 10:25:03 +0200: > > > On 12 Jan 2017, at 9:49 AM, Daniel Braniss wrote: > > > > > >> On 12 Jan 2017, at 1:47 AM, Karl Young wrote: > >> > >> I inherited a lab that has a few hundred hosts running FreeBSD 7.2. > >> These hosts run test scripts that access files that are stored on > >> FreeBSD 6.3 host. The 6.3 host exports a /data directory with NFS > >> > >> > >> On the 7.2 hosts, I can see the exported directory: > >> > >> $ showmount -e 6.3-host > >> Exports list on 6.3-host > >> /data Everyone > >> > >> And access it with amd > >> > >> $ ls -l /net/6-3.host/data > >> > >> drwxr-xr-x 5 root wheel 512 Jun 4 2009 git > >> drwxr-xr-x 4586 root wheel83968 Nov 2 04:50 home > >> > >> I'm trying to retire the 6.3 host and replace it with 9.3 (I know it's > >> old, but it's the best I can do for now). > >> > >> I export the /data directory on the 9.3 system, and I can see it on my > >> 7.2 hosts. > >> > >> $ showmount -e 9.3-host > >> Exports list on 9.3-host: > >> /data Everyone > >> > >> But I can't automount it: > >> > >> $ ls -l /net/9.3-host/data > >> ls: /net/9.3-host/data: No such file or directory > >> > >> If I manually mount the exported directory, it works: > >> > >> $ sudo mount -t nfs 9.3-host:/data /mnt/data/ > >> $ mount | grep nfs > >> 9.3-host:/data on /mnt/data (nfs) > >> > >> $ ls -l /mnt/data > >> total 4 > >> drwxr-xr-x 9 root wheel 512 Dec 20 17:41 iaf2 > >> > >> I've spent some time on Google, but haven't found a solution. I realize > >> these are very old versions, but I'm not in a position to upgrade them > >> right now. My last resort will be to use /etc/fstab to do the NFS > >> mount, but I'd rather avoid that if I can. > >> > >> Thanks for any pointers on how to resolve this. > >> > >> -karl > >> > >> > > > > if you changed the export file on the server after you tried to mount in on > > the client, > > and will not realise this, if that’s the case, usually rebooting the client > > helps. > > > s/and/amd/ ^%$# hate spell checkers > Thanks Danny I did try rebooting the client (and server) multiple times to no avail. -karl > > my .5 cents > > > > danny > > > >> > >> ___ > >> freebsd-stable@freebsd.org mailing list > >> https://lists.freebsd.org/mailman/listinfo/freebsd-stable > >> To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org" > > > > ___ > > freebsd-stable@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-stable > > To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org" > ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: NFS and amd on older FreeBSD
Thanks Greg One correction. The new server is FreeBSD 9.2, not 9.3. Replies below Greg Byshenk(free...@byshenk.net)@2017.01.12 08:58:16 +0100: > On Wed, Jan 11, 2017 at 03:47:37PM -0800, Karl Young wrote: > > I inherited a lab that has a few hundred hosts running FreeBSD 7.2. > > These hosts run test scripts that access files that are stored on > > FreeBSD 6.3 host. The 6.3 host exports a /data directory with NFS > > > > [...] > > > > $ showmount -e 9.3-host > > Exports list on 9.3-host: > > /data Everyone > > > > But I can't automount it: > > > > $ ls -l /net/9.3-host/data > > ls: /net/9.3-host/data: No such file or directory > > > > If I manually mount the exported directory, it works: > > > > $ sudo mount -t nfs 9.3-host:/data /mnt/data/ > > $ mount | grep nfs > > 9.3-host:/data on /mnt/data (nfs) > > > > $ ls -l /mnt/data > > total 4 > > drwxr-xr-x 9 root wheel 512 Dec 20 17:41 iaf2 > > > > I've spent some time on Google, but haven't found a solution. I realize > > these are very old versions, but I'm not in a position to upgrade them > > right now. My last resort will be to use /etc/fstab to do the NFS > > mount, but I'd rather avoid that if I can. > > If you can mount the share manually, there is almost > certainly nothing wrong with the server. Based on the > error ("No such file or directory"), I would recommend > checking your amd config on the client. > Yes, that makes sense, but I'm using the same client in both cases. In rc.conf on client, I have: nfs_reserved_port_only="YES" nfs_client_enable="YES" amd_enable="YES" And ps shows the amd process started with these flags: /usr/sbin/amd -p -a /.amd_mnt -l syslog /host /etc/amd.map /net /etc/amd.map amd.map is the default $ cat /etc/amd.map # $FreeBSD: src/etc/amd.map,v 1.10.8.1 2009/04/15 03:14:26 kensmith Exp # $ # /defaults type:=host;fs:=${autodir}/${rhost}/host;rhost:=${key} * opts:=rw,grpid,resvport,vers=3,proto=tcp,nosuid,nodev This is the same default amd.map as 9.2. Another data point: I see the same behavior with a 9.2 client: I can automount a share from my 6.3 server, but not from the 9.2 server. Thanks -karl > > -- > greg byshenk - gbysh...@byshenk.net - Leiden, NL > ___ > freebsd-stable@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org" ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: NFS and amd on older FreeBSD
> On 12 Jan 2017, at 9:49 AM, Daniel Braniss wrote: > > >> On 12 Jan 2017, at 1:47 AM, Karl Young wrote: >> >> I inherited a lab that has a few hundred hosts running FreeBSD 7.2. >> These hosts run test scripts that access files that are stored on >> FreeBSD 6.3 host. The 6.3 host exports a /data directory with NFS >> >> >> On the 7.2 hosts, I can see the exported directory: >> >> $ showmount -e 6.3-host >> Exports list on 6.3-host >> /data Everyone >> >> And access it with amd >> >> $ ls -l /net/6-3.host/data >> >> drwxr-xr-x 5 root wheel 512 Jun 4 2009 git >> drwxr-xr-x 4586 root wheel83968 Nov 2 04:50 home >> >> I'm trying to retire the 6.3 host and replace it with 9.3 (I know it's >> old, but it's the best I can do for now). >> >> I export the /data directory on the 9.3 system, and I can see it on my >> 7.2 hosts. >> >> $ showmount -e 9.3-host >> Exports list on 9.3-host: >> /data Everyone >> >> But I can't automount it: >> >> $ ls -l /net/9.3-host/data >> ls: /net/9.3-host/data: No such file or directory >> >> If I manually mount the exported directory, it works: >> >> $ sudo mount -t nfs 9.3-host:/data /mnt/data/ >> $ mount | grep nfs >> 9.3-host:/data on /mnt/data (nfs) >> >> $ ls -l /mnt/data >> total 4 >> drwxr-xr-x 9 root wheel 512 Dec 20 17:41 iaf2 >> >> I've spent some time on Google, but haven't found a solution. I realize >> these are very old versions, but I'm not in a position to upgrade them >> right now. My last resort will be to use /etc/fstab to do the NFS >> mount, but I'd rather avoid that if I can. >> >> Thanks for any pointers on how to resolve this. >> >> -karl >> >> > > if you changed the export file on the server after you tried to mount in on > the client, > and will not realise this, if that’s the case, usually rebooting the client > helps. > s/and/amd/ ^%$# hate spell checkers > my .5 cents > > danny > >> >> ___ >> freebsd-stable@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-stable >> To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org" > > ___ > freebsd-stable@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org" ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: NFS and amd on older FreeBSD
On Wed, Jan 11, 2017 at 03:47:37PM -0800, Karl Young wrote: > I inherited a lab that has a few hundred hosts running FreeBSD 7.2. > These hosts run test scripts that access files that are stored on > FreeBSD 6.3 host. The 6.3 host exports a /data directory with NFS > > [...] > > $ showmount -e 9.3-host > Exports list on 9.3-host: > /data Everyone > > But I can't automount it: > > $ ls -l /net/9.3-host/data > ls: /net/9.3-host/data: No such file or directory > > If I manually mount the exported directory, it works: > > $ sudo mount -t nfs 9.3-host:/data /mnt/data/ > $ mount | grep nfs > 9.3-host:/data on /mnt/data (nfs) > > $ ls -l /mnt/data > total 4 > drwxr-xr-x 9 root wheel 512 Dec 20 17:41 iaf2 > > I've spent some time on Google, but haven't found a solution. I realize > these are very old versions, but I'm not in a position to upgrade them > right now. My last resort will be to use /etc/fstab to do the NFS > mount, but I'd rather avoid that if I can. If you can mount the share manually, there is almost certainly nothing wrong with the server. Based on the error ("No such file or directory"), I would recommend checking your amd config on the client. -- greg byshenk - gbysh...@byshenk.net - Leiden, NL ___ freebsd-stable@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"