[ug-bosug] What is the /second_root slice? How do i get rid of it?

Moinak Ghosh Moinak.Ghosh at Sun.COM
Tue Feb 5 03:47:47 PST 2008


Manish Chakravarty wrote:
> Hi BOSUG,
>
> I did a df -h of my system and found this:
> Filesystem             size   used  avail capacity  Mounted on
> /dev/dsk/c2t0d0s0       15G   7.0G   7.6G    48%    /
> /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                   2.8G  1004K   2.8G     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
>                         15G   7.0G   7.6G    48%    /lib/libc.so.1
> fd                       0K     0K     0K     0%    /dev/fd
> swap                   2.8G    80K   2.8G     1%    /tmp
> swap                   2.8G    44K   2.8G     1%    /var/run
> /dev/dsk/c2t0d0s4       15G    15M    15G     1%    /second_root
> /dev/dsk/c2t0d0s7       18G   1.5G    16G     9%    /export/home
> /dev/dsk/c1t0d0s2      3.7G   3.7G     0K   100%    /media/SOL_11_X86s\
>
> I did not create a /second_root slice. Why is it there and what is it
> for?
>
> I dont want to waste 15 gigs of space on this slice. I want it for
> my /export/home. Is there any way to "reclaim" it?
>   

   It is meant for Live Upgrade as Saurabh mentioned in another reply. 
Essentially
   it is a safe upgrade path. In case of a standard upgrade you boot 
from CD and
   upgrade your root filesystem. If the upgrade fails for some reason 
your install is
   borked! You will have to re-install. Even otherwise you might face 
problems
   after upgrade, but going back to the previous working setup will mean 
re-install
   again.

   With live upgrade you have 2 roots. On is your active booted root, 
other is the
   alternate root or alternate boot environment. You can clone your 
active booted
   root onto the alternate boot environment and upgrade that while your 
system is
   booted and you are doing other work. After the upgrade you simply 
make the
   alternate boot environment as the active one and reboot and you will 
boot off
   the newly upgraded setup. If you have problems with the upgraded 
setup you
   can simply switch back to the earlier working boot environment.

   This is basically a godsend for critical installations. It reduces 
chances of failure
   and downtime. However it also means some disk space wastage. For a 
desktop
   setup you may not want it. the simplest way to reclaim the space is 
to use ZFS.

   Do this:

   umount /second_root
   umount /export/home

   zpool create -f -m /export/home export_home c2t0d0s4 c2t0d0s7
   You have all your fragmented space is one nice storage pool.

   Edit /etc/vfstab and comment out the lines for second_root and 
export/home.
  
   BTW the future direction is to move to ZFS root getting rid of this 
slicing
   (sub-partition) business altogether. In addition one will be able to 
get the
   benefits of Live Upgrade without having to waste disk space. The Snap
   Upgrade project intends to use ZFS snapshot and clone features to provide
   next-gen painless upgrade and boot environment administration

Regards,
Moinak.

> Thanks
> Manish
>
> _______________________________________________
> ug-bosug mailing list
> List-Unsubscribe: mailto:ug-bosug-unsubscribe at opensolaris.org
> List-Owner: mailto:ug-bosug-owner at opensolaris.org
> List-Archives: http://www.opensolaris.org/jive/forum.jspa?forumID=54
>   



More information about the ug-bosug mailing list