免费注册 查看新帖 |

Chinaunix

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

紧急求救:根目录满了怎么办? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-07-14 09:29 |只看该作者 |倒序浏览
root用户的邮箱满了,把根目录的空间也挤满了。我想删掉邮件,可root的邮箱也进不去。高手指点一下,我应该怎么处理呀?

论坛徽章:
0
2 [报告]
发表于 2003-07-14 10:00 |只看该作者

紧急求救:根目录满了怎么办?

do you have root password?

if you do, cut root's mail box and save it to another partition

论坛徽章:
0
3 [报告]
发表于 2003-07-14 10:05 |只看该作者

紧急求救:根目录满了怎么办?

我把root的邮箱给转移了,系统还能自动找到吗?

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
4 [报告]
发表于 2003-07-14 10:10 |只看该作者

紧急求救:根目录满了怎么办?

此文转贴,恕不负文责。另,请通读全文后再操作。

ZT: How to increase the size of root Partition.

overview:

() go to single user mode
() backup root partition
() boot cdrom
() use format to resize root/swap partitions
() create a new (empty) partition on root partition
() restore root partition
() run installboot to tell HW where to boot blocks are
   on the root partition
() reboot to mulituser mode


instructions:

(1) bring machine to single user mode
(2) run fsck on root to make sure the filesystem is clean:

        fsck /dev/dsk/c0t3d0s0

(3) load a tape and run ufsdump (the options to ufsdump
    assume you've got an 8mm tape drive):

        ufsdump 0vbf 126 /dev/rmt/<tape>; /dev/rdsk/c0t3d0s0

    where <tape>; is your tape device. the 'v' option is
    for verify, which'll take a bit longer since it verifies
    the tape after the dump finishes by comparing its contents
    the the filesystem.  When the dump is done, remove the
    tape, write protect it, and reload the tape.

(4) halt the system and boot into single user mode from cdrom:

    boot cdrom -s

(5) when the OS is loaded, run format and select the appropriate
    disk. hit 'p' to get to the partition menu, then 'p' again
    to print the partition table.  I'll use my disk as an example.
    Here are my root and swap listings.

Part      Tag    Flag     Cylinders        Size       Blocks
  0       root    wm       0 -   91       25.16MB    (92/0/0)
  1       swap    wu      92 -  384       80.12MB    (293/0/0)

    I hit '0' to change the size of the root partition:

partition>; 0
Part      Tag    Flag     Cylinders        Size       Blocks
  0       root    wm       0 -   91       25.16MB    (92/0/0)

Enter partition id tag[root]: <return>;
Enter partition permission flags[wm]: <return>;
Enter new starting cyl[0]: <return>;
Enter partition size[51520b, 92c, 25.16mb]: 180c


    I've just increased the size of my root partition from 92
    cylinders to 180.  The table now looks like:


Part      Tag    Flag     Cylinders        Size       Blocks
  0       root    wm       0 -  179       49.22MB    (180/0/0)
  1       swap    wu      92 -  384       80.12MB    (293/0/0)

    Note the new ending cylinder for root (179).
    Now I change slice 1:

partition>; 1
Part      Tag    Flag     Cylinders        Size       Blocks
  1       swap    wu      92 -  384       80.12MB    (293/0/0)

Enter partition id tag[swap]: <return>;
Enter partition permission flags[wu]: <return>;
Enter new starting cyl[92]: 180
Enter partition size[164080b, 293c, 80.12mb]: 205c

    The new starting cylinder for swap (180) is one greater than the
    root's ending cylinder (179)

    I reduced the size from 293c to 205c (205 = 384 - 179: the
    swap's ending cylinder number minus the root's ending
    cylinder number). I verify that there's no overlap:

Part      Tag    Flag     Cylinders        Size       Blocks
  0       root    wm       0 -  179       49.22MB    (180/0/0)
  1       swap    wu     180 -  384       56.05MB    (205/0/0)

    Make sure that root's ending cylinder is one less than the
    swap's starting cylinder, and that the swap's ending cylinder is the
    same as before the changes.

    I now label the disk to make the new partition table permanent

partition>; label

    You can quit out of format now.

(6) create a new filesystem on the root partition:

     newfs /dev/rdsk/c0t3d0s0
      
    This'll take a minute or two.

(7) run fsck on the new partition to make sure it's ok:

     fsck /dev/rdsk/c0t3d0s0

( if the directory /a doesn't exist, create it, and
    then mount the new root partition on it:

     mount /dev/dsk/c0t3d0s0 /a

(9)  verify the mount, cd into /a and run ufsrestore
     (make sure in in /a!):
  
     ufsrestore -rf /dev/rmt/<tape>;

(10) run installboot:

     /usr/sbin/installboot /usr/lib/fs/ufs/bootblk /dev/rdsk/c0t3d0s0

(11) umount /a and reboot the system.


论坛徽章:
0
5 [报告]
发表于 2003-07-14 10:36 |只看该作者

紧急求救:根目录满了怎么办?

老虾大哥,控制台上的出错信息是这样的
Jul 14 10:22:20 grenerp ufs: NOTICE: alloc: /: file system full
Jul 14 10:22:30 grenerp last message repeated 1 time
Jul 14 10:22:33 grenerp sendmail[290]: NOQUEUE: low on space (have 0, SMTP-DAEMO
N needs 101 in /var/spool/mqueue)

原来root的邮箱经常收到系统的出错信息,我都没有清理过。是不是清理一下,就没有必要增加空间了?

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
6 [报告]
发表于 2003-07-14 10:41 |只看该作者

紧急求救:根目录满了怎么办?

按理说ROOT收到的EMAIL应当不在根下,应当是在MAIL 目录下,不知你是什么情况

再说ROOT的信件不会有多少空间吧?

论坛徽章:
0
7 [报告]
发表于 2003-07-14 11:20 |只看该作者

紧急求救:根目录满了怎么办?

那些没有用的日志文件都放在什么地方呀?

我先清理一下,看看怎么样

论坛徽章:
0
8 [报告]
发表于 2003-07-14 11:57 |只看该作者

紧急求救:根目录满了怎么办?

是不是这个问题太简单了,怎么没有人回答呀?

论坛徽章:
0
9 [报告]
发表于 2003-07-14 11:57 |只看该作者

紧急求救:根目录满了怎么办?

/var/adm
/var/mail

论坛徽章:
0
10 [报告]
发表于 2003-07-14 12:03 |只看该作者

紧急求救:根目录满了怎么办?

谢谢 YY !

我想问一下,/ 目录下,自动增长的文件都是哪些呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP