Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Where should I mount home directories on new disk ??

1 view
Skip to first unread message

Dave

unread,
Oct 26, 2009, 3:31:01 PM10/26/09
to
I today received my Sun Ultra 27, which came with a 500 GB disk and 2 GB RAM.
Solaris 10 was pre-installed.

After briefly checking the machine was OK, I put in another 10 GB RAM and a
couple of 2 TB Hitachi UltraStar disks. So currently the machine has

* 1 x 500 GB disk
* 2 x 2 TB disks.

(I intend adding another 500 GB disk, to mirror the root pool. I hope I can
source the same model of 500 GB disk Sun used, which seems difficult, as it is
discontinued by Hitachi)

When installing OpenSolaris 06/2009, there is only the option to select a
disk/partition to install to. One does not have the option to select multiple
disks like I've seen in Solaris 10 and earlier. As such, once Solaris was
installed, only the 500 GB disk was used for the root pool. The other two larger
disks were unused.

I created a new mirrored pool where I want to store home directories

# zpool create bpool mirror c7t3d0 c7t4d0

I'm unsure where best to mount the home directories. Currently, the only user is
mounted under /export/home/drkirkby. I'm a bit concerned things might go wrong
if I delete the /export, /export/home and /export/home/drkirkby file systems
from the root pool (rpool), and try to add them on 'bpool' instead of 'rpool'.

so I now have:

drkirkby@hawk:~# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
bpool 1.81T 74.5K 1.81T 0% ONLINE -
rpool 464G 13.7G 450G 2% ONLINE -


drkirkby@hawk:~# df -h
Filesystem size used avail capacity Mounted on
rpool/ROOT/opensolaris
457G 3.5G 437G 1% /
/devices 0K 0K 0K 0% /devices
/dev 0K 0K 0K 0% /dev
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 14G 364K 14G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1
441G 3.5G 437G 1% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 14G 28K 14G 1% /tmp
swap 14G 44K 14G 1% /var/run
rpool/export 457G 21K 437G 1% /export
rpool/export/home 457G 21K 437G 1% /export/home
rpool/export/home/drkirkby
457G 4.1G 437G 1% /export/home/drkirkby
rpool 457G 78K 437G 1% /rpool
bpool 1.8T 19K 1.8T 1% /bpool


Any thoughts the best way to put the file systems in a logical manner, isolation
the user files from the root pool?

Dave

Zfs..

unread,
Oct 26, 2009, 3:49:18 PM10/26/09
to

Dave,

This is a simple task with zfs.

zfs snapshot rpool/export/home/drkirkby@move

zfs send rpool/export/home/drkirkby@move | zfs recv bpool/users -F

zfs set mountpoint=none rpool/export/home/drkirkby

zfs set mountpoint=/export/home/drkirkby bpool/drkirkby

Zfs..

unread,
Oct 26, 2009, 3:52:18 PM10/26/09
to

That should of course be bpool/users at the end not bpool/drkirkby

Dave

unread,
Oct 26, 2009, 5:16:36 PM10/26/09
to

Is that supposed to be

zfs send rpool/export/home/drkirkby@move | zfs recv -F bpool/users

?

> zfs set mountpoint=none rpool/export/home/drkirkby
>
> zfs set mountpoint=/export/home/drkirkby bpool/drkirkby

I assume from your previous post, that should be:

zfs set mountpoint=/export/home/drkirkby bpool/users

I've got a more fundamental problem I need to get over though. I can't log in as
root - only as another user and su to root. But if I log in as drkirkby, the
file system is in use, so can't be moved!

I've just created a new user, set his home directory to /tmp, and given him the
permissions to change to root. I can't help feeling there is a better way to do
that! I'll find if it works in a minute!

Dave

cindy

unread,
Oct 26, 2009, 6:09:25 PM10/26/09
to

Dave,

In the OpenSolaris installation, a user account is created with root
privileges,
but you need to preface those commands like this:

% pfexec some-command

As you figured out, root is setup as a role by default so you need to
su to it rather
than login as root.

You can modify the root role behavior, like this:

# rolemod -K type=normal root

Other OpenSolaris admin tips are described here:

http://wikis.sun.com/display/OpenSolarisInfo200906/Changing+root+User+Behavior

This behavior is different from other Solaris releases but it gets
easier from here.
You're doing great so far.

Cindy

Chris Ridd

unread,
Oct 27, 2009, 5:14:04 AM10/27/09
to
On 2009-10-26 19:31:01 +0000, Dave <f...@coo.com> said:

> (I intend adding another 500 GB disk, to mirror the root pool. I hope I
> can source the same model of 500 GB disk Sun used, which seems
> difficult, as it is discontinued by Hitachi)

I don't think you need exactly the same model disk, just another one
with the same number of sectors. A post on zfs-discuss is worth reading
<http://mail.opensolaris.org/pipermail/zfs-discuss/2009-June/028531.html>.

--


Chris

hume.sp...@bofh.ca

unread,
Oct 27, 2009, 9:22:38 AM10/27/09
to
In comp.unix.solaris Zfs.. <cian.s...@gmail.com> wrote:
> This is a simple task with zfs.
>
> zfs snapshot rpool/export/home/drkirkby@move
> zfs send rpool/export/home/drkirkby@move | zfs recv bpool/users -F

You can save some time with this step...

zfs snapshot rpool/export/home/drkirkby@move
zfs clone rpool/export/home/drkirkby@move bpool/users
zfs promote bpool/users

(The last step turns rpool/export/home/drkirkby into a clone of bpool/users,
making rpool/export/home/drkirkby destructable...)

--
Brandon Hume - hume -> BOFH.Ca, http://WWW.BOFH.Ca/

0 new messages