[zones-discuss] Help, my zone's dataset has disappeared!
Hello I have an amd64 server running OpenSolaris 2009-06. In December I created one container on this server named 'cpmail' with it's own zfs dataset and it's been running ever since. Until earlier this evening when the server did a kernel panic and rebooted. Now, I can't see any contents in the zfs dataset for this zone! The server has two disks which are root mirrored with ZFS: # zpool status pool: rpool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 mirror ONLINE 0 0 0 c8t0d0s0 ONLINE 0 0 0 c8t1d0s0 ONLINE 0 0 0 errors: No known data errors Here are the datasets: # zfs list NAME USED AVAIL REFER MOUNTPOINT rpool 161G 67.6G 79.5K /rpool rpool/ROOT 3.66G 67.6G19K legacy rpool/ROOT/opensolaris 3.66G 67.6G 3.51G / rpool/cpmail 139G 67.6G22K /zones/cpmail rpool/cpmail/ROOT 139G 67.6G19K legacy rpool/cpmail/ROOT/zbe 139G 67.6G 139G legacy rpool/dump 2.00G 67.6G 2.00G - rpool/export 7.64G 67.6G 7.49G /export rpool/export/home 150M 67.6G21K /export/home rpool/export/home/jesse 150M 67.6G 150M /export/home/jesse rpool/repo 6.56G 67.6G 6.56G /rpool/repo rpool/swap 2.00G 69.4G 130M - /zones/cpmail is where it should be mounting the zone's dataset, I believe. Here's what happens when I try and start the zone: # zoneadm -z cpmail boot could not verify zfs dataset mailtmp: dataset does not exist zoneadm: zone cpmail failed to verify So the zone is trying to find a dataset 'mailtmp' and failing because it doesn't exist. So, what happened to it? Here's the zone config file, at /etc/zones/cpmail.xml (with IP address obfuscated) # cat /etc/zones/cpmail.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE zone PUBLIC -//Sun Microsystems Inc//DTD Zones//EN file:///usr/share/lib/xml/dtd/zonecfg.dtd.1 !-- DO NOT EDIT THIS FILE. Use zonecfg(1M) instead. -- zone name=cpmail zonepath=/zones/cpmail autoboot=false brand=ipkg network address=xxx.xxx.xxx.xxx physical=bge1/ dataset name=mailtmp/ /zone I just don't understand where the dataset 'mailtmp' went to. Perhaps it was an initial name I used for the dataset and I then renamed it to cpmail, but then I can't see any of the zones files in /zones/cpmail : # find /zones/cpmail/ /zones/cpmail/ /zones/cpmail/dev /zones/cpmail/root Does ZFS store a log file of all operations applied to it? It feels like someone has gained access and run 'zfs destroy mailtmp' to me, but then again it could just be my own ineptitude. Thank you Jesse -- This message posted from opensolaris.org ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Help, my zone's dataset has disappeared!
On 02/26/10 07:03, Jesse Reynolds wrote: Hello I have an amd64 server running OpenSolaris 2009-06. In December I created one container on this server named 'cpmail' with it's own zfs dataset and it's been running ever since. Until earlier this evening when the server did a kernel panic and rebooted. Now, I can't see any contents in the zfs dataset for this zone! The server has two disks which are root mirrored with ZFS: # zpool status pool: rpool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 mirror ONLINE 0 0 0 c8t0d0s0 ONLINE 0 0 0 c8t1d0s0 ONLINE 0 0 0 errors: No known data errors Here are the datasets: # zfs list NAME USED AVAIL REFER MOUNTPOINT rpool 161G 67.6G 79.5K /rpool rpool/ROOT 3.66G 67.6G19K legacy rpool/ROOT/opensolaris 3.66G 67.6G 3.51G / rpool/cpmail 139G 67.6G22K /zones/cpmail rpool/cpmail/ROOT 139G 67.6G19K legacy rpool/cpmail/ROOT/zbe 139G 67.6G 139G legacy rpool/dump 2.00G 67.6G 2.00G - rpool/export 7.64G 67.6G 7.49G /export rpool/export/home 150M 67.6G21K /export/home rpool/export/home/jesse 150M 67.6G 150M /export/home/jesse rpool/repo 6.56G 67.6G 6.56G /rpool/repo rpool/swap 2.00G 69.4G 130M - /zones/cpmail is where it should be mounting the zone's dataset, I believe. Here's what happens when I try and start the zone: # zoneadm -z cpmail boot could not verify zfs dataset mailtmp: dataset does not exist zoneadm: zone cpmail failed to verify So the zone is trying to find a dataset 'mailtmp' and failing because it doesn't exist. So, what happened to it? Here's the zone config file, at /etc/zones/cpmail.xml (with IP address obfuscated) # cat /etc/zones/cpmail.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE zone PUBLIC -//Sun Microsystems Inc//DTD Zones//EN file:///usr/share/lib/xml/dtd/zonecfg.dtd.1 !-- DO NOT EDIT THIS FILE. Use zonecfg(1M) instead. -- zone name=cpmail zonepath=/zones/cpmail autoboot=false brand=ipkg network address=xxx.xxx.xxx.xxx physical=bge1/ dataset name=mailtmp/ /zone I just don't understand where the dataset 'mailtmp' went to. Perhaps it was an initial name I used for the dataset and I then renamed it to cpmail, but then I can't see any of the zones files in /zones/cpmail : # find /zones/cpmail/ /zones/cpmail/ /zones/cpmail/dev /zones/cpmail/root Does ZFS store a log file of all operations applied to it? It feels like someone has gained access and run 'zfs destroy mailtmp' to me, but then again it could just be my own ineptitude. With the version of opensolaris that you're running, the zone's root dataset won't be mounted until the zone boots. You can see this in the 'zfs list' output above where the mountpoint is legacy and you can look at the zfs mounted property as well. Since the zone is configured with a dataset that doesn't exist, it can't boot so the zonepath dataset isn't mounted. You can use the 'zpool history' command to see what zfs operations were done. I don't know why the mailtmp dataset no longer exists. Jerry ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Help, my zone's dataset has disappeared!
On 02/26/10 07:37, Jerry Jelinek wrote: On 02/26/10 07:03, Jesse Reynolds wrote: Hello I have an amd64 server running OpenSolaris 2009-06. In December I created one container on this server named 'cpmail' with it's own zfs dataset and it's been running ever since. Until earlier this evening when the server did a kernel panic and rebooted. Now, I can't see any contents in the zfs dataset for this zone! The server has two disks which are root mirrored with ZFS: # zpool status pool: rpool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 mirror ONLINE 0 0 0 c8t0d0s0 ONLINE 0 0 0 c8t1d0s0 ONLINE 0 0 0 errors: No known data errors Here are the datasets: # zfs list NAME USED AVAIL REFER MOUNTPOINT rpool 161G 67.6G 79.5K /rpool rpool/ROOT 3.66G 67.6G 19K legacy rpool/ROOT/opensolaris 3.66G 67.6G 3.51G / rpool/cpmail 139G 67.6G 22K /zones/cpmail rpool/cpmail/ROOT 139G 67.6G 19K legacy rpool/cpmail/ROOT/zbe 139G 67.6G 139G legacy rpool/dump 2.00G 67.6G 2.00G - rpool/export 7.64G 67.6G 7.49G /export rpool/export/home 150M 67.6G 21K /export/home rpool/export/home/jesse 150M 67.6G 150M /export/home/jesse rpool/repo 6.56G 67.6G 6.56G /rpool/repo rpool/swap 2.00G 69.4G 130M - /zones/cpmail is where it should be mounting the zone's dataset, I believe. Here's what happens when I try and start the zone: # zoneadm -z cpmail boot could not verify zfs dataset mailtmp: dataset does not exist zoneadm: zone cpmail failed to verify So the zone is trying to find a dataset 'mailtmp' and failing because it doesn't exist. So, what happened to it? Here's the zone config file, at /etc/zones/cpmail.xml (with IP address obfuscated) # cat /etc/zones/cpmail.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE zone PUBLIC -//Sun Microsystems Inc//DTD Zones//EN file:///usr/share/lib/xml/dtd/zonecfg.dtd.1 !-- DO NOT EDIT THIS FILE. Use zonecfg(1M) instead. -- zone name=cpmail zonepath=/zones/cpmail autoboot=false brand=ipkg network address=xxx.xxx.xxx.xxx physical=bge1/ dataset name=mailtmp/ /zone Sorry for the second response. One more thing looks wrong. The zone is configured with a dataset named mailtmp. That looks wrong since your zpool is named rpool, so I would expect that the dataset would be named something like rpool/mailtmp or something like that. Is it possible you reconfigured this zone at some point but never tried to reboot it? It looks like the dataset you added is just incorrect for your zfs configuration. Jerry ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Help, my zone's dataset has disappeared!
Thanks Jerry! Yes, dataset=mailtmp looks wrong. I guess it's possible I altered the configuration and hadn't rebooted it. So, assuming that the manifest is out of date or wrong, what's the best way to fix it? Can I edit /etc/zones/cpmail.xml directly, or should I run zonecfg interactively? Can I just point the zone config at the dataset rpool/cpmail/ROOT and hope for the best? Thank you Jesse -- This message posted from opensolaris.org ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Help, my zone's dataset has disappeared!
On 02/26/10 07:56, Jesse Reynolds wrote: Thanks Jerry! Yes, dataset=mailtmp looks wrong. I guess it's possible I altered the configuration and hadn't rebooted it. So, assuming that the manifest is out of date or wrong, what's the best way to fix it? Can I edit /etc/zones/cpmail.xml directly, or should I run zonecfg interactively? Can I just point the zone config at the dataset rpool/cpmail/ROOT and hope for the best? No, don't edit the xml file. Just use zonecfg to edit the zone and delete or change the dataset. Jerry ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Help, my zone's dataset has disappeared!
OK, thanks Jerry for your assistance. Turns out I don't need access to that other 'mailtmp' dataset, it was only used initially when migrating mailboxes to this new server, and no longer exists. I've removed reference to the 'mailtmp' dataset and now it boots and is all good. Thanks again Jesse -- This message posted from opensolaris.org ___ zones-discuss mailing list zones-discuss@opensolaris.org