免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4228 | 回复: 5
打印 上一主题 下一主题

Solaris 10 如何分区 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-06-18 16:56 |只看该作者 |倒序浏览
小弟刚学solaris, 安装的是 solaris10, 安装过程中好像找不到给各磁盘分配空间,结果按默认的大小装下去,发现swap太小了,才600M左右,以至于安装一些软件时总不够用。请各位指点一下如何在solaris 10里面调整各区的大小,非常感谢(/home区有150G左右,但系统其它区加起来还不到 10G,就想怎么把home的磁盘分点给其他的)

论坛徽章:
0
2 [报告]
发表于 2009-06-18 17:13 |只看该作者
1./home是linux、hpux等系统中的说法,solaris里应该是/export/home
2.一般的建议
/给总30-60
swap为内存容量的1-2倍,看你是否跑oracle了
/export/home给个10G-20G就可以了
一般我写的启动文档都是给opt和usr多点,尤其是usr,而且一般还都弄个usr2或者database目录,一般这两个目录都要挂接磁阵的,但是如果你是自己玩的可以给/export/home大点,用来做个文件服务器啥的,比较方便。
3.针对你这个情况,建议把/export/home分区完全备份了,然后umount,接下来用format调整大小,最后mount,恢复数据,其他分区就,尤其是/要在单用户下做,而且要用光盘引导的单用户,步骤参考/export/home的方法进行放大;swap如果小就不用麻烦了,想要扩多大就直接mkfile一个多大的文件,你不是/export/home比较大吗,就吧这个文件放在/export/home下,然后swap -a那个文件就可以了,要绝对路径,为了重启后方便,在/etc/vfstab文件里,参照上面的格式吧这个大文件写上。
不知道你懂没,我写的好累啊

论坛徽章:
0
3 [报告]
发表于 2009-06-18 17:57 |只看该作者

回复 #2 pandc 的帖子

谢谢!
看是看懂了
关于swap我在装oracle的时候搞定了,就是按你说的那种方法做的

我装的是solaris10,上面是有/home,/export/home两个目录,export/home好像是挂在/下面的,所以空间很小,/home 是单独的一个区,我把所有的服务都装在home上面了

# pwd
/
# ls
Desktop         cdrom           home            opt             tmp
Documents       core            kernel          platform        usr
Mail            dev             lib             proc            var
TT_DB           devices         lost+found      rmdisk          vol
bin             etc             mnt             sbin            vpd.properties
boot            export          net             system          workspace
# df -h
文件系统               大小   用了   可用 容量      挂接在
/dev/dsk/c0t0d0s0      5.3G   4.4G   901M    84%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                   2.6G   936K   2.6G     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
                       5.3G   4.4G   901M    84%    /lib/libc.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                   2.6G    96K   2.6G     1%    /tmp
swap                   2.6G    24K   2.6G     1%    /var/run
/dev/dsk/c0t0d0s7      141G    17G   123G    13%    /home

# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c0t0d0 <DEFAULT cyl 19449 alt 2 hd 255 sec 63>
          /pci@0,0/pci1028,27f@1f,2/disk@0,0
Specify disk (enter its number): 0
selecting c0t0d0
[disk formatted]
Warning: Current Disk has mounted partitions.
/dev/dsk/c0t0d0s0 is currently mounted on /. Please see umount(1M).
/dev/dsk/c0t0d0s1 is currently used by swap. Please see swap(1M).
/dev/dsk/c0t0d0s7 is currently mounted on /home. Please see umount(1M).


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> portion
`portion' is not expected.
format> p


PARTITION MENU:
        0      - change `0' partition
        1      - change `1' partition
        2      - change `2' partition
        3      - change `3' partition
        4      - change `4' partition
        5      - change `5' partition
        6      - change `6' partition
        7      - change `7' partition
        select - select a predefined table
        modify - modify a predefined partition table
        name   - name the current table
        print  - display the current table
        label  - write partition map and label to the disk
        !<cmd> - execute <cmd>, then return
        quit
partition> print
Current partition table (original):
Total disk cylinders available: 19449 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm      68 -   769        5.38GB    (702/0/0)    11277630
  1       swap    wu       1 -    67      525.56MB    (67/0/0)      1076355
  2     backup    wm       0 - 19448      148.99GB    (19449/0/0) 312448185
  3 unassigned    wm       0                0         (0/0/0)             0
  4 unassigned    wm       0                0         (0/0/0)             0
  5 unassigned    wm       0                0         (0/0/0)             0
  6 unassigned    wm       0                0         (0/0/0)             0
  7       home    wm     770 - 19447      143.08GB    (18678/0/0) 300062070
  8       boot    wu       0 -     0        7.84MB    (1/0/0)         16065
  9 unassigned    wm       0                0         (0/0/0)             0

谢谢你,学了不少东西。不然这个文件系统不被老板笑死才怪

论坛徽章:
0
4 [报告]
发表于 2009-06-18 21:06 |只看该作者
一样学习。。

论坛徽章:
0
5 [报告]
发表于 2009-06-19 10:17 |只看该作者
学习。

论坛徽章:
2
丑牛
日期:2014-06-11 13:55:04ChinaUnix元老
日期:2015-02-06 15:16:14
6 [报告]
发表于 2009-06-19 10:25 |只看该作者
很好,学习了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP