免费注册 查看新帖 |

Chinaunix

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

V880smc新建卷步骤(下) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-07-14 15:39 |只看该作者 |倒序浏览

四、 /opt目录备份操作

由于要用新建的/dev/md/dsk/d5 挂到/opt下使用,我们在备份的时候就把/opt目录下的所有文件都恢复到/dev/md/dsk/d5挂载的一暂时目录/test下,出到对安全的考量,我们建议再做一份磁带的备份,以防不时之需。

操作方法和步骤:
1.ok boot -s
2.# ufsdump 0uf - /opt |(cd /test ; ufsrestore rf - )
3.# vi /etc/vfstab
/dev/md/dsk/d5        /dev/md/rdsk/d5        /opt        ufs     1       no      -
4.# mount /opt
5.# reboot

文件目录的复制,这样可以使用COPY过来的文件的属性和原来的是一样的。链接文件也会拷贝过来:
# cd /opt
# find . –print –depth |cpio –pdm /test
如果只是做目录的同步可以按上面的操作进行,只用非根(/)和非/usr目录的情形。

五、 磁盘分区操作

如果要对磁盘各片进行大小的调整可以按下面的操作方法进行操作。指定各个磁盘片的大小,如果要使用整个磁盘的话可以将除了片s2之外的所有片的空间都置为0就可以了。在使用片的时候可以直接使用s2就可以达到使用整个磁盘空间的目的了。不过,建议还是留一部分小的空间用供状态数据库使用。

# format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
       0. c1t0d0
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf789b07,0
       1. c1t1d0
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf788acc,0
       2. c1t2d0
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf789ae9,0
       3. c1t3d0
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf787f27,0
       4. c1t4d0
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf789b34,0
       5. c1t5d0
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf789a49,0
Specify disk (enter its number): 3
selecting c1t3d0
[disk formatted]

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
        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
        !     - execute , then return
        quit
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
        ! - execute , then return
        quit
partition> modify
Select partitioning base:
        0. Current partition table (original)
        1. All Free Hog
Choose base (enter number) [0]? 0

Part      Tag    Flag     Cylinders         Size            Blocks
0       root    wm       0 -    90      128.37MB    (91/0/0)      262899
1       swap    wu      91 -   181      128.37MB    (91/0/0)      262899
2     backup    wu       0 - 24619       33.92GB    (24620/0/0) 71127180
3 unassigned    wm       0                0         (0/0/0)            0
4 unassigned    wm       0                0         (0/0/0)            0
5 unassigned    wm     182 - 24589       33.62GB    (24408/0/0) 70514712
6        usr    wm   24590 - 24604       21.16MB    (15/0/0)       43335
7 unassigned    wm   24605 - 24619       21.16MB    (15/0/0)       43335

Do you wish to continue creating a new partition
table based on above table[yes]? yes
Free Hog partition[6]? 6     #注释:从第6个盘片上取空间用于新的盘片
Enter size of partition '0' [262899b, 91c, 128.37mb, 0.13gb]:
Enter size of partition '1' [262899b, 91c, 128.37mb, 0.13gb]:
Enter size of partition '3' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '4' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '5' [70514712b, 24408c, 34431.01mb, 33.62gb]:
Enter size of partition '7' [43335b, 15c, 21.16mb, 0.02gb]:

Part      Tag    Flag     Cylinders         Size            Blocks
0       root    wm       0 -    90      128.37MB    (91/0/0)      262899
1       swap    wu      91 -   181      128.37MB    (91/0/0)      262899
2     backup    wu       0 - 24619       33.92GB    (24620/0/0) 71127180
3 unassigned    wm       0                0         (0/0/0)            0
4 unassigned    wm       0                0         (0/0/0)            0
5 unassigned    wm     182 - 24589       33.62GB    (24408/0/0) 70514712
6        usr    wm   24590 - 24604       21.16MB    (15/0/0)       43335
7 unassigned    wm   24605 - 24619       21.16MB    (15/0/0)       43335

Okay to make this the current partition table[yes]? yes
Enter table name (remember quotes): original

Ready to label disk, continue? Yes
完成对磁盘的分区操作。

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/73464/showart_1081353.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP