Need a bit of help salvaging a perfectly working ZFS mirror that I''ve managed to render unbootable. I''ve had a ZFS root (x86, mirored zpool, SXCR b46 ) working fine for months. I very foolishly decided to mirror /grub using SVM (so I could boot easily if a disk died). Shrank swap partitions to make somewhere to keep the SVM database (2 copies on each disk). Rebooted and everything seemed ok. I booted with the second disk unplugged and SVM didn''t seem to come up. ZFS showed the pool as degraded, as expected. Unplugged the first disk, tried another boot. Got as far as detecting the disks, then hangs. So the question - How do I get rid of SVM from a zfs root system? Will just clobbering the database partitions help (sounds easiest as it doesn''t need a rescue kernel to be ZFS aware)? Otherwise, I''ll need to mount the root filesystems out of the zpool to undo SVM - will a belenix live cd be enough? ISTR I need a zpool.cache before it''ll see the pool at all. -- Rasputin :: Jack of All Trades - Master of Nuns http://number9.hellooperator.net/
Dick Davies wrote:> Need a bit of help salvaging a perfectly working ZFS > mirror that I''ve managed to render unbootable. > > I''ve had a ZFS root (x86, mirored zpool, SXCR b46 ) working fine for > months. > > I very foolishly decided to mirror /grub using SVM > (so I could boot easily if a disk died). Shrank swap partitions > to make somewhere to keep the SVM database (2 copies on each > disk).D''oh! N.B. this isn''t needed, per se, just make a copy of /grub and the boot loader.> Rebooted and everything seemed ok. I booted with the > second disk unplugged and SVM didn''t seem to come up. > ZFS showed the pool as degraded, as expected. > > Unplugged the first disk, tried another boot. > Got as far as detecting the disks, then hangs. > > So the question - > How do I get rid of SVM from a zfs root system?The key change is in /etc/system where the rootfs is specified as the metadevice rather than the real device. N.B. if you only have 2 disks, then the test you performed will not work for SVM. -- richard
On 05/10/06, Richard Elling - PAE <Richard.Elling at sun.com> wrote:> Dick Davies wrote:> > I very foolishly decided to mirror /grub using SVM > > (so I could boot easily if a disk died). Shrank swap partitions > > to make somewhere to keep the SVM database (2 copies on each > > disk). > > D''oh! > N.B. this isn''t needed, per se, just make a copy of /grub and > the boot loader.Lesson learned :) It''s not like /grub changes much, and if it does a simple rsync takes care of it.> > How do I get rid of SVM from a zfs root system?> The key change is in /etc/system where the rootfs is > specified as the metadevice rather than the real device.Ah, thanks.> N.B. if you only have 2 disks, then the test you performed > will not work for SVM.I gathered :) - I''ve flattened the box. This time I''ll bother to create the ZFS rescue bits in the howto I was working from. Thanks. -- Rasputin :: Jack of All Trades - Master of Nuns http://number9.hellooperator.net/