> Both work properly. Half of the job done; now I have
> the new home mounted, but inactive. So I can rm -Rf *
> or similar there; in order to 'cp -a' the content of
> the old home to the new home.
> Still the other half is unresolved: How do I mount
> the old home which is in no fstab (mnttab), on c0d1s1
> ?

I guess I am unclear on what you are trying to do.   As far as I can tell, you 
have two solaris root partitions, and two zpools, one of which is associated 
with each of the two solaris root partitions?  I assume both of those two disks 
are in the system at the same time?  Or do you have one single zpool called 
"home" with two mirrored disks in it?

If you type "zpool status" what do you get?  You might be getting into trouble 
because both pools are called "home"?   One of the devs here might be able to 
help you with this particular instance.  (I am not a dev, just a hapless 
sysadmin)  You may be able to force one to mount elsewhere by using the "zfs 
set mountpoint=/somewhere_else home" but again, I don't know how you'd tell it 
which "home" zpool you are talking about.

> I can only think of rebooting to the old system, also
> single user, also 'mount -a'; but then, how to store
> the files ? In the archives here I read that GNU-tar
> does not handle all the features ! Which is why I'd
> like to mount both home-s, old and new, at the same
> time; hoping that 'cp -a' will be complete.

Again, "zfs send [EMAIL PROTECTED]" just sends to standard output.  You could 
do:
"zfs send [EMAIL PROTECTED] > /some/other/fs/home1.backup".    This backup can 
then be restored with the "zfs receive" command.

> [i]
> zfs snapshot [EMAIL PROTECTED]
> zfs send [EMAIL PROTECTED] | zfs receive u02
> 
> Does not work because "u02" already exists - the
> receive must be done into a brand new zfs. (It will
> create the zfs) I suppose you could get around this
> by creating a new zfs and "mv * ../." from
> there.[/i]
> 
> Meaning, I'd have to add another hard disk as
> temporary storage ?

I guess the confusion here is between zpools and zfs filesystems.  A zpool is a 
collection of devices, or possibly only one device.    By default, a zfs 
filesystem is created on top of the zpool with the same name as the zpool.  
ZFSs are heirarchical, they are made to be created one filesystem within 
another. 

Here are two zpools, each with one disk, note that each of them has the default 
ZFS on top of it.
[EMAIL PROTECTED]:/u04# zpool list                                              
                                                         
NAME                    SIZE    USED   AVAIL    CAP  HEALTH     ALTROOT
u01                     354G     82K    354G     0%  ONLINE     -
u02                     354G    117K    354G     0%  ONLINE     -
[EMAIL PROTECTED]:/u04# zfs list                                                
                                                         
NAME   USED  AVAIL  REFER  MOUNTPOINT
u01     79K   348G  26.5K  /u01
u02    114K   348G  24.5K  /u04

I can create a new ZFS with a single command, which allocates space from the 
zpool "u01" (Beacuse the filesystem name is u01/home)

[EMAIL PROTECTED]:/u04# zfs create u01/home                                     
                                                         
[EMAIL PROTECTED]:/u04# zfs list                                                
                                                         
NAME       USED  AVAIL  REFER  MOUNTPOINT
u01        110K   348G  26.5K  /u01
u01/home  24.5K   348G  24.5K  /u01/home
u02        114K   348G  24.5K  /u02


> And here, my 'venerable' problem comes up again: How
> do I address that additional storage; let's say
> /dev/dsk/c2t0d0p3 ? If I don't give a partition, it
> might not work or overwrite my data; and currently I
> have no completely empty, new drive, and there is no
> Solaris partition on my current USB drive, neither
> free space to partition it.

You first add your storage to a zpool, which then gets a zfs created on top of 
it automatically, and by default is mounted in /zpool_name.

[EMAIL PROTECTED]:/# zpool create -f new_zpool c0t2d0s6                         
                                                         
[EMAIL PROTECTED]:/# mount |grep new_zpool                                      
                                                         
/new_zpool on new_zpool read/write/setuid/devices/exec/atime/dev=2d9001c on Sun 
Feb 11 23:29:12 2007
[EMAIL PROTECTED]:/# zfs list |grep new_zpool                                   
                                                         
new_zpool    77K   348G  24.5K  /new_zpool

> Or, I could destroy the existing, new-to-be home
> slice (I don't need the data) and write directly to
> there. How would I do that ?

zpool create newhome c0d0s7
zfs snapshot [EMAIL PROTECTED]
zfs send [EMAIL PROTECTED] | zfs receive newhome/home

> Question: How do I make a full copy of old home to
> new home; without either being active, and none in
> the fstab / mnttab of the other system ?
> And no, I don't want to *extend* the home to old and
> new. Just copy, and then fdisk c0d1.

Well, both will have to be 'active' (i.e. mounted on the same machine) if you 
want the zfs send/zfs receive to work.  

If you've created the disk on another machine and physically moved the drive 
over, you might have to use the 'zfs import' command but I'm not sure exactly 
what the circiumstances are where you have to use that.

-A
 
 
This message posted from opensolaris.org
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to