Re: failed to create gmirror with the handbook instructions
Thanks very much. Please could I make a suggestion that this be included in the handbook page? On 8 Oct 2013 01:31, Warren Block wbl...@wonkity.com wrote: On Tue, 8 Oct 2013, Andy Zammy wrote: Hi, I used the second section of the handbook (20.4) to create a gmirror. In my particular setup I had a 1GB /, 6GB swap, 1GB /tmp and the rest of the 1TB drive was left for /usr I had to deviate from the handbook when it came to running the dump + restore commands, as the dump failed due to an issue with the journalling. To get around this problem, I dropped into single user mode, so I could remount root as read-only. The dump commands then worked. It specified in the handbook to restart the machine, and boot from ada1. It was at this point that I noticed something wasn't quite right. There was a spew of 'not found/no such file or directory' messages. These were all trying to reference libs and binaries that live in /usr. I boot into single user mode, and upon checking the other partitions, I notice that /tmp and /usr are empty, apart from a .snap file, and the restoresymtable file. Please could someone help me troubleshoot this problem? Let me know if you need any more info, and I'll post it up asap. dump does not work reliably on filesystems with SUJ enabled. Turn off SUJ on the filesystems to be dumped by booting in single-user mode and running tunefs -j disable /dev/ada0whatever Do each filesystem, then use dump. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: failed to create gmirror with the handbook instructions
This is actually trickier than it first looked. First I got into single user mode by supplying 'shutdown now', but the tunefs commands all failed with the following: #tunefs -j disable /dev/ada0s1a Clearing journal flags from inode 4 tunefs: Failed to write journal inode: Operation not permitted tunefs: soft updates journalling cleared but soft updates still set. tunefs: remove .sujournal to reclaim space tunefs: /dev/ada0s1a: failed to write superblock I tried the dump command on the off-chance, and it failed with the original errors. Is there anything you can recommend? I then noticed you specified to boot into single user more, so I restarted the machine, with only ada0 attached. Because the handbook wants me to use the mirror/gm0sX devices, I swapped my fstab file back to the original. The boot loader now only seems to recognise the mirror/gm0 nodes, the original ada0sX are gone (though ada0 still shows up). I'm not sure if it's acceptable to do the dump by booting the 1st hard drive using the mirror/gm0, and then dump to the 2nd hard drive by mounting what will be ada1sX. Is this okay to do? On 8 October 2013 01:31, Warren Block wbl...@wonkity.com wrote: On Tue, 8 Oct 2013, Andy Zammy wrote: Hi, I used the second section of the handbook (20.4) to create a gmirror. In my particular setup I had a 1GB /, 6GB swap, 1GB /tmp and the rest of the 1TB drive was left for /usr I had to deviate from the handbook when it came to running the dump + restore commands, as the dump failed due to an issue with the journalling. To get around this problem, I dropped into single user mode, so I could remount root as read-only. The dump commands then worked. It specified in the handbook to restart the machine, and boot from ada1. It was at this point that I noticed something wasn't quite right. There was a spew of 'not found/no such file or directory' messages. These were all trying to reference libs and binaries that live in /usr. I boot into single user mode, and upon checking the other partitions, I notice that /tmp and /usr are empty, apart from a .snap file, and the restoresymtable file. Please could someone help me troubleshoot this problem? Let me know if you need any more info, and I'll post it up asap. dump does not work reliably on filesystems with SUJ enabled. Turn off SUJ on the filesystems to be dumped by booting in single-user mode and running tunefs -j disable /dev/ada0whatever Do each filesystem, then use dump. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: failed to create gmirror with the handbook instructions
I On 8 October 2013 01:31, Warren Block wbl...@wonkity.com wrote: On Tue, 8 Oct 2013, Andy Zammy wrote: Hi, I used the second section of the handbook (20.4) to create a gmirror. In my particular setup I had a 1GB /, 6GB swap, 1GB /tmp and the rest of the 1TB drive was left for /usr I had to deviate from the handbook when it came to running the dump + restore commands, as the dump failed due to an issue with the journalling. To get around this problem, I dropped into single user mode, so I could remount root as read-only. The dump commands then worked. It specified in the handbook to restart the machine, and boot from ada1. It was at this point that I noticed something wasn't quite right. There was a spew of 'not found/no such file or directory' messages. These were all trying to reference libs and binaries that live in /usr. I boot into single user mode, and upon checking the other partitions, I notice that /tmp and /usr are empty, apart from a .snap file, and the restoresymtable file. Please could someone help me troubleshoot this problem? Let me know if you need any more info, and I'll post it up asap. dump does not work reliably on filesystems with SUJ enabled. Turn off SUJ on the filesystems to be dumped by booting in single-user mode and running tunefs -j disable /dev/ada0whatever Do each filesystem, then use dump. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: failed to create gmirror with the handbook instructions
On Tue, 8 Oct 2013, Andy Zammy wrote: This is actually trickier than it first looked. First I got into single user mode by supplying 'shutdown now', but the tunefs commands all failed with the following: #tunefs -j disable /dev/ada0s1a Clearing journal flags from inode 4 tunefs: Failed to write journal inode: Operation not permitted tunefs: soft updates journalling cleared but soft updates still set. tunefs: remove .sujournal to reclaim space tunefs: /dev/ada0s1a: failed to write superblock I tried the dump command on the off-chance, and it failed with the original errors. Is there anything you can recommend? I then noticed you specified to boot into single user more, so I restarted the machine, with only ada0 attached. Because the handbook wants me to use the mirror/gm0sX devices, I swapped my fstab file back to the original. The boot loader now only seems to recognise the mirror/gm0 nodes, the original ada0sX are gone (though ada0 still shows up). I don't know what would do that. The device nodes on the original drive should be untouched until it is added back to the mirror. What does gpart show ada0s1 show? Did you make a backup of the original drive first? Is there an entry for vfs.root.mountfrom in /boot/loader.conf? I'm not sure if it's acceptable to do the dump by booting the 1st hard drive using the mirror/gm0, and then dump to the 2nd hard drive by mounting what will be ada1sX. Is this okay to do? Sorry, I don't quite understand the question. The mirror will not be usable until a good copy of the original drive is made to it. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: failed to create gmirror with the handbook instructions
# gpart show ada0s1 gpart: No such geom: ada0s1 By the way, this is after a restart of the machine. There's nothing to back up, I'm installing a fresh os, so I just install on one drive, plug the other in, and start following the handbook instructions for this method. So the only thing in loader.conf is geom_mirror_load=YES. I'll rephrase the question: given that the handbook originally wanted me to dump from ada0s1 to the mounted mirror/gm0s1 (which was ada1 at the time), and I cannot do this, would it be enough to dump from mirror/gm0s1 (which is what ada0 is now mounted as), to ada1s1 (even though this *should* be the other way around, it's equivalent as far as i can see, isn't it?)? On 8 October 2013 22:59, Warren Block wbl...@wonkity.com wrote: On Tue, 8 Oct 2013, Andy Zammy wrote: This is actually trickier than it first looked. First I got into single user mode by supplying 'shutdown now', but the tunefs commands all failed with the following: #tunefs -j disable /dev/ada0s1a Clearing journal flags from inode 4 tunefs: Failed to write journal inode: Operation not permitted tunefs: soft updates journalling cleared but soft updates still set. tunefs: remove .sujournal to reclaim space tunefs: /dev/ada0s1a: failed to write superblock I tried the dump command on the off-chance, and it failed with the original errors. Is there anything you can recommend? I then noticed you specified to boot into single user more, so I restarted the machine, with only ada0 attached. Because the handbook wants me to use the mirror/gm0sX devices, I swapped my fstab file back to the original. The boot loader now only seems to recognise the mirror/gm0 nodes, the original ada0sX are gone (though ada0 still shows up). I don't know what would do that. The device nodes on the original drive should be untouched until it is added back to the mirror. What does gpart show ada0s1 show? Did you make a backup of the original drive first? Is there an entry for vfs.root.mountfrom in /boot/loader.conf? I'm not sure if it's acceptable to do the dump by booting the 1st hard drive using the mirror/gm0, and then dump to the 2nd hard drive by mounting what will be ada1sX. Is this okay to do? Sorry, I don't quite understand the question. The mirror will not be usable until a good copy of the original drive is made to it. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: failed to create gmirror with the handbook instructions
On Tue, 8 Oct 2013, Andy Zammy wrote: Thanks very much. Please could I make a suggestion that this be included in the handbook page? Please do not top-post, it makes replies more difficult. I have added a warning about SUJ to the top of the gmirror section in the Handbook. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: failed to create gmirror with the handbook instructions
On Tue, 8 Oct 2013, Andy Zammy wrote: # gpart show ada0s1 gpart: No such geom: ada0s1 By the way, this is after a restart of the machine. There's nothing to back up, I'm installing a fresh os, so I just install on one drive, plug the other in, and start following the handbook instructions for this method. So the only thing in loader.conf is geom_mirror_load=YES. I'll rephrase the question: given that the handbook originally wanted me to dump from ada0s1 to the mounted mirror/gm0s1 (which was ada1 at the time), and I cannot do this, would it be enough to dump from mirror/gm0s1 (which is what ada0 is now mounted as), to ada1s1 (even though this *should* be the other way around, it's equivalent as far as i can see, isn't it?)? There is not much point in dumping from the mirror to another drive. The dump/restore is how the single drive is copied to the mirror. On a fresh install, use the Shell mode of the installer to set up the mirror, then install directly to it. There are some instructions on mountpoints in the bsdinstall man page. This will avoid the lag of waiting for the second drive to sync. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: failed to create gmirror with the handbook instructions
Andy Zammy wrote: # gpart show ada0s1 gpart: No such geom: ada0s1 By the way, this is after a restart of the machine. There's nothing to back up, I'm installing a fresh os, so I just install on one drive, plug the other in, and start following the handbook instructions for this method. So the only thing in loader.conf is geom_mirror_load=YES. [snip] Since you are beginning to reinstall from scratch, please allow/forgive a small interjection from some of my recent experience with this. Warren is more knowledgeable on this than I am, and I have followed many of his instructions in the past. With the shift towards GPT and away from the old DOS mbr/partition table stuff of the past, the current Handbook pages reflect this. The central point of contention arises from the fact that GPT, GEOM (gmirror), and many hardware RAID controllers require to claim the very last sector of a drive to store their metadata. Obviously, the effect of this collision is a whoever wrote last wrote best - so you can't use combinations of things that all want this sector. The most simple gmirroring is to slice an entire drive, with partitions contained within. The very end of the drive must NOT have any file system on it, and this is usually the case by default as most of the time slicing/partitioning leaves a little free space at the end anyway. This will not work with GPT; only with the old DOS compatible mbr and disklabel scheme. In order to use GPT and gmirror together you gmirror individual partitions (as opposed to the slice) , e.g. gmirror will write its metadata at the end of each partition leaving the very last sector at the end of the drive for GPT. This is what the content on the relevant Handbook pages reflects. More complicated, but allows for the demise of the ancient DOS/mbr partitioning. Notice that if you combine GPT and a hardware RAID controller card the same collision problem noted previously can still happen. If you utilize the BIOS on the controller card for anything it will save its metadata on the last drive sector. When not faced with terabyte sized humongous volumes and the huge amount of time an fsck will consume, the old DOS way with disklabel is still an option that works. The main reason for the journaling is to sidestep waiting for a very long fsck on a huge volume to run to completion before finishing a boot into a cleaned up/repaired file system. If your drive volume is small this is not so much a problem. Indeed my old gateway/firewall/IDS router box I did the old DOS/mbr scheme with gmirror (the old single-slice entire drive and mirror the drive) as the pair of drives are ancient 74GB Raptors. On my web/database test box I did go the GPT and SUJ+journaling route but am not using any mirroring here (yet). I have not experienced any problems with dump - but I also do not use the -L switch. It will show an error/warning about not dumping a live file system this way but I go ahead and do it anyway. IIRC the dump problem you may be seeing may be related to drive snapshotting. The caveat is I can sort of 'get away' with it as my boxen are largely quiescent, but would hesitate to do this on something like a public web/database box that was continually being hammered with lots of traffic. Just tossing out some ideas for your perusal and consideration. The way I used the old DOS/mbr and disklabel scheme on my router machine is very simple, quick to do, and has survived a few power outages now with no data loss (other than the time it takes to rebuild which it does automagically on boot). On the 74GB Raptors this rebuild takes about twenty minutes. Your situation and needs may force you in a different direction. Hence, the proverbial YMMV applies. FWIW. Now for to finally get around to purchasing a new UPS to replace the old one that went up in smoke and died horribly... -Mike ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: failed to create gmirror with the handbook instructions
I tried creating the mirror before the install. As the drives are now mirrored, the installer picked up on the face that there are two gm0 nodes - one on each hard drive. I installed onto ada0's gm0 node. After it reboots, the bootloader stops at the manual prompt. From what I can see that's not dissapeared up the screen, it tried and failed to mount from mirror/gm0s1a with error 19. I had to mount from ada0s1a in order for the boot to get further, but as it's been installed to boot from gm0s1x, it stops after it mounts /. After having checked my partition setup many times at this point, I know for a fact there's a rather large 500MB section free at the end of my hard drives with this partition set up. Is there any reason I can't just install as normal, do a 'gmirror label gm0 ada0', and then do a 'gmirror insert gm0 ada1', before changing my fstab to use mirror/gm0? I can't see why dumping and restoring is necessary, it's just manually doing what gmirror is there for in the first place. Correct me if I'm wrong :) On 9 October 2013 00:11, Warren Block wbl...@wonkity.com wrote: On Tue, 8 Oct 2013, Andy Zammy wrote: # gpart show ada0s1 gpart: No such geom: ada0s1 By the way, this is after a restart of the machine. There's nothing to back up, I'm installing a fresh os, so I just install on one drive, plug the other in, and start following the handbook instructions for this method. So the only thing in loader.conf is geom_mirror_load=YES. I'll rephrase the question: given that the handbook originally wanted me to dump from ada0s1 to the mounted mirror/gm0s1 (which was ada1 at the time), and I cannot do this, would it be enough to dump from mirror/gm0s1 (which is what ada0 is now mounted as), to ada1s1 (even though this *should* be the other way around, it's equivalent as far as i can see, isn't it?)? There is not much point in dumping from the mirror to another drive. The dump/restore is how the single drive is copied to the mirror. On a fresh install, use the Shell mode of the installer to set up the mirror, then install directly to it. There are some instructions on mountpoints in the bsdinstall man page. This will avoid the lag of waiting for the second drive to sync. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: failed to create gmirror with the handbook instructions
On Tue, 8 Oct 2013, Andy Zammy wrote: Hi, I used the second section of the handbook (20.4) to create a gmirror. In my particular setup I had a 1GB /, 6GB swap, 1GB /tmp and the rest of the 1TB drive was left for /usr I had to deviate from the handbook when it came to running the dump + restore commands, as the dump failed due to an issue with the journalling. To get around this problem, I dropped into single user mode, so I could remount root as read-only. The dump commands then worked. It specified in the handbook to restart the machine, and boot from ada1. It was at this point that I noticed something wasn't quite right. There was a spew of 'not found/no such file or directory' messages. These were all trying to reference libs and binaries that live in /usr. I boot into single user mode, and upon checking the other partitions, I notice that /tmp and /usr are empty, apart from a .snap file, and the restoresymtable file. Please could someone help me troubleshoot this problem? Let me know if you need any more info, and I'll post it up asap. dump does not work reliably on filesystems with SUJ enabled. Turn off SUJ on the filesystems to be dumped by booting in single-user mode and running tunefs -j disable /dev/ada0whatever Do each filesystem, then use dump. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org