Erwin Panen
2010-Mar-03 22:32 UTC
[zfs-discuss] recovering data - howto mount rpool to newpool?
Hi, I''m not very familiar with manipulating zfs. This is what happened: I have an osol 2009.06 system on which I have some files that I need to recover. Due to my ignorance and blindly testing, I have managed to get this system to be unbootable... I know, my own fault. So now I have a second osol 2009.06 machine. Off course this system has the same user and homedir structural settings. I''ve added the harddisk from system 1 to system 2. The zfspool was not exported at shutdown of system 1. Of course both contain the standard rpool. As far as my reading has learned me, I should be able to import rpool to newpool. ------------------------- zpool import -f rpool newpool cannot mount ''export'': directory is not empty cannot mount ''export/home'':directory is not empty cannot mount ''export/home/erwin'':directory is not empty -------------------------------- So I end up with /newpool containing boot and etc dirs. How can I work around this problem? Mount to different mountpoint? Thanks for helping out! Erwin
Richard Elling
2010-Mar-03 22:47 UTC
[zfs-discuss] recovering data - howto mount rpool to newpool?
You need the -R option to zpool import. Try the procedure documented here: http://www.solarisinternals.com/wiki/index.php/ZFS_Troubleshooting_Guide#Resolving_ZFS_Mount_Point_Problems_That_Prevent_Successful_Booting -- richard On Mar 3, 2010, at 2:32 PM, Erwin Panen wrote:> Hi, > > I''m not very familiar with manipulating zfs. > This is what happened: > I have an osol 2009.06 system on which I have some files that I need to recover. Due to my ignorance and blindly testing, I have managed to get this system to be unbootable... I know, my own fault. > > So now I have a second osol 2009.06 machine. Off course this system has the same user and homedir structural settings. > I''ve added the harddisk from system 1 to system 2. > The zfspool was not exported at shutdown of system 1. > Of course both contain the standard rpool. As far as my reading has learned me, I should be able to import rpool to newpool. > ------------------------- > zpool import -f rpool newpool > cannot mount ''export'': directory is not empty > cannot mount ''export/home'':directory is not empty > cannot mount ''export/home/erwin'':directory is not empty > -------------------------------- > > So I end up with /newpool containing boot and etc dirs. > > How can I work around this problem? Mount to different mountpoint? > > Thanks for helping out! > > Erwin > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discussZFS storage and performance consulting at http://www.RichardElling.com ZFS training on deduplication, NexentaStor, and NAS performance http://nexenta-atlanta.eventbrite.com (March 16-18, 2010)
Ian Collins
2010-Mar-03 22:48 UTC
[zfs-discuss] recovering data - howto mount rpool to newpool?
Erwin Panen wrote:> Hi, > > I''m not very familiar with manipulating zfs. > This is what happened: > I have an osol 2009.06 system on which I have some files that I need > to recover. Due to my ignorance and blindly testing, I have managed to > get this system to be unbootable... I know, my own fault. > > So now I have a second osol 2009.06 machine. Off course this system > has the same user and homedir structural settings. > I''ve added the harddisk from system 1 to system 2. > The zfspool was not exported at shutdown of system 1. > Of course both contain the standard rpool. As far as my reading has > learned me, I should be able to import rpool to newpool. > ------------------------- > zpool import -f rpool newpool > cannot mount ''export'': directory is not emptyTry adding the -R option to change the root directory. -- Ian.
Erwin Panen
2010-Mar-03 23:07 UTC
[zfs-discuss] recovering data - howto mount rpool to newpool?
Richard, thanks for replying; I seem to have complicated matters: I shutdown the system (past midnight here :-) )and seeing your reply come in, fired it up again to further test. The system wouldn''t come up anymore (dumped in maintenance shell) as it would try to import both rpool systems (I guess) So I powered down, and disconnected the 2nd disk, and rebooted. So far so good, system comes up. Then I reconnected the 2nd disk (it''s a sata) but the system will not see it. /var/adm/messages shows this: --------------- erwin at mars:/var/adm$ tail -f messages Mar 3 23:55:30 mars SATA device detected at port 0 Mar 3 23:55:30 mars sata: [ID 663010 kern.info] /pci at 0,0/pci1849,554 at 9 : Mar 3 23:55:30 mars sata: [ID 761595 kern.info] SATA disk device at port 0 Mar 3 23:55:30 mars sata: [ID 846691 kern.info] model WDC WD800JD-75JNC0 Mar 3 23:55:30 mars sata: [ID 693010 kern.info] firmware 06.01C06 Mar 3 23:55:30 mars sata: [ID 163988 kern.info] serial number WD-WMAM96632208 Mar 3 23:55:30 mars sata: [ID 594940 kern.info] supported features: Mar 3 23:55:30 mars sata: [ID 981177 kern.info] 28-bit LBA, DMA, SMART self-test Mar 3 23:55:30 mars sata: [ID 514995 kern.info] SATA Gen1 signaling speed (1.5Gbps) Mar 3 23:55:30 mars sata: [ID 349649 kern.info] capacity = 156250000 sectors ----------------------------------------------------- I also have this from previous collections: ----------------------------------------------------- erwin at mars:~# format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c4d0 <DEFAULT cyl 6525 alt 2 hd 255 sec 63> /pci at 0,0/pci-ide at 6/ide at 0/cmdk at 0,0 1. c6t0d0 <DEFAULT cyl 9722 alt 2 hd 255 sec 63> /pci at 0,0/pci1849,554 at 9/disk at 0,0 Specify disk (enter its number): ------------------------------------------------------- So I know the sata disk is /dev/dsk/c6t0d0 How would I proceed to get this fixed? Thanks for helping out! Erwin Richard Elling wrote:> You need the -R option to zpool import. Try the procedure documented here: > http://www.solarisinternals.com/wiki/index.php/ZFS_Troubleshooting_Guide#Resolving_ZFS_Mount_Point_Problems_That_Prevent_Successful_Booting > > -- richard > > On Mar 3, 2010, at 2:32 PM, Erwin Panen wrote: > > >> Hi, >> >> I''m not very familiar with manipulating zfs. >> This is what happened: >> I have an osol 2009.06 system on which I have some files that I need to recover. Due to my ignorance and blindly testing, I have managed to get this system to be unbootable... I know, my own fault. >> >> So now I have a second osol 2009.06 machine. Off course this system has the same user and homedir structural settings. >> I''ve added the harddisk from system 1 to system 2. >> The zfspool was not exported at shutdown of system 1. >> Of course both contain the standard rpool. As far as my reading has learned me, I should be able to import rpool to newpool. >> ------------------------- >> zpool import -f rpool newpool >> cannot mount ''export'': directory is not empty >> cannot mount ''export/home'':directory is not empty >> cannot mount ''export/home/erwin'':directory is not empty >> -------------------------------- >> >> So I end up with /newpool containing boot and etc dirs. >> >> How can I work around this problem? Mount to different mountpoint? >> >> Thanks for helping out! >> >> Erwin >> _______________________________________________ >> zfs-discuss mailing list >> zfs-discuss at opensolaris.org >> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >> > > ZFS storage and performance consulting at http://www.RichardElling.com > ZFS training on deduplication, NexentaStor, and NAS performance > http://nexenta-atlanta.eventbrite.com (March 16-18, 2010) > > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20100304/bb767008/attachment.html>
Ian Collins
2010-Mar-03 23:28 UTC
[zfs-discuss] recovering data - howto mount rpool to newpool?
Erwin Panen wrote:> Richard, thanks for replying; > I seem to have complicated matters: > I shutdown the system (past midnight here :-) )and seeing your reply > come in, fired it up again to further test. > The system wouldn''t come up anymore (dumped in maintenance shell) as > it would try to import both rpool systems (I guess) > So I powered down, and disconnected the 2nd disk, and rebooted. So far > so good, system comes up. > Then I reconnected the 2nd disk (it''s a sata) but the system will not > see it. > /var/adm/messages shows this: > --------------- > erwin at mars:/var/adm$ tail -f messages > Mar 3 23:55:30 mars SATA device detected at port 0 > Mar 3 23:55:30 mars sata: [ID 663010 kern.info] /pci at 0,0/pci1849,554 at 9 : > Mar 3 23:55:30 mars sata: [ID 761595 kern.info] SATA disk > device at port 0 > Mar 3 23:55:30 mars sata: [ID 846691 kern.info] model WDC > WD800JD-75JNC0 > Mar 3 23:55:30 mars sata: [ID 693010 kern.info] firmware 06.01C06 > Mar 3 23:55:30 mars sata: [ID 163988 kern.info] serial > number WD-WMAM96632208 > Mar 3 23:55:30 mars sata: [ID 594940 kern.info] supported > features: > Mar 3 23:55:30 mars sata: [ID 981177 kern.info] 28-bit LBA, > DMA, SMART self-test > Mar 3 23:55:30 mars sata: [ID 514995 kern.info] SATA Gen1 > signaling speed (1.5Gbps) > Mar 3 23:55:30 mars sata: [ID 349649 kern.info] capacity = > 156250000 sectorsAssuming your system supports hot swap, what does "cfgadm | grep sata" show? You should be able to use "cfgadm -c configure sataX/Y" to configure an attached, but unconfigured drive. Or you could use failsafe boot and import/rename the old rpool. -- Ian.
Erwin Panen
2010-Mar-03 23:33 UTC
[zfs-discuss] recovering data - howto mount rpool to newpool?
Ian, thanks for replying. I''ll give cfgadm | grep sata a go in a minute. At the mo I''ve rebooted from 2009.06 livecd. Of course I can''t import rpool because it''s a newer zfs version :-( Any way to update zfs version on a running livecd? Thanks for helping out! Erwin Ian Collins wrote:> Erwin Panen wrote: >> Richard, thanks for replying; >> I seem to have complicated matters: >> I shutdown the system (past midnight here :-) )and seeing your reply >> come in, fired it up again to further test. >> The system wouldn''t come up anymore (dumped in maintenance shell) as >> it would try to import both rpool systems (I guess) >> So I powered down, and disconnected the 2nd disk, and rebooted. So >> far so good, system comes up. >> Then I reconnected the 2nd disk (it''s a sata) but the system will not >> see it. >> /var/adm/messages shows this: >> --------------- >> erwin at mars:/var/adm$ tail -f messages >> Mar 3 23:55:30 mars SATA device detected at port 0 >> Mar 3 23:55:30 mars sata: [ID 663010 kern.info] >> /pci at 0,0/pci1849,554 at 9 : >> Mar 3 23:55:30 mars sata: [ID 761595 kern.info] SATA disk >> device at port 0 >> Mar 3 23:55:30 mars sata: [ID 846691 kern.info] model WDC >> WD800JD-75JNC0 >> Mar 3 23:55:30 mars sata: [ID 693010 kern.info] firmware >> 06.01C06 >> Mar 3 23:55:30 mars sata: [ID 163988 kern.info] serial >> number WD-WMAM96632208 >> Mar 3 23:55:30 mars sata: [ID 594940 kern.info] supported >> features: >> Mar 3 23:55:30 mars sata: [ID 981177 kern.info] 28-bit LBA, >> DMA, SMART self-test >> Mar 3 23:55:30 mars sata: [ID 514995 kern.info] SATA Gen1 >> signaling speed (1.5Gbps) >> Mar 3 23:55:30 mars sata: [ID 349649 kern.info] capacity = >> 156250000 sectors > > Assuming your system supports hot swap, what does "cfgadm | grep sata" > show? > > You should be able to use "cfgadm -c configure sataX/Y" to configure > an attached, but unconfigured drive. > > Or you could use failsafe boot and import/rename the old rpool. >
Ian Collins
2010-Mar-03 23:35 UTC
[zfs-discuss] recovering data - howto mount rpool to newpool?
Erwin Panen wrote:> Ian, thanks for replying. > I''ll give cfgadm | grep sata a go in a minute. > At the mo I''ve rebooted from 2009.06 livecd. Of course I can''t import > rpool because it''s a newer zfs version :-( > > Any way to update zfs version on a running livecd? >No, if you can get a failsafe session to boot, use that. Or download a more recent liveCD from genunix.org! -- Ian.