avatar
Question: How to make room for /?# Unix - 噫吁兮,危乎高哉
L*e
1
How to make room for /?
One old system has Solaris 7.
and /usr, /var, /opt are all on partition of /.
Now it's almost full (100% usage) and only 12M left on /
partition.
What could be done to make room for this partition?
What kind of files can be moved around without lost of
function?
We have much room on other partitions, like /home, /home1.
Is there any tool like partition magic on PC for Unix? With
PM I can move free space around and it works pretty cool.
Thanks.
avatar
c*u
2
su
..
mkfile -v 100m swap.dat
swap -a DIR/swap.dat.
I remeber I once did that, but I think repartition is best way to go

【在 L***e 的大作中提到】
: How to make room for /?
: One old system has Solaris 7.
: and /usr, /var, /opt are all on partition of /.
: Now it's almost full (100% usage) and only 12M left on /
: partition.
: What could be done to make room for this partition?
: What kind of files can be moved around without lost of
: function?
: We have much room on other partitions, like /home, /home1.
: Is there any tool like partition magic on PC for Unix? With

avatar
m*e
3
A simple solution is to move directories to other partitions, and make symlinks
to point to the new location. Better not move /usr/bin or /usr/lib. man pages
or things like that are a good candidate.

【在 L***e 的大作中提到】
: How to make room for /?
: One old system has Solaris 7.
: and /usr, /var, /opt are all on partition of /.
: Now it's almost full (100% usage) and only 12M left on /
: partition.
: What could be done to make room for this partition?
: What kind of files can be moved around without lost of
: function?
: We have much room on other partitions, like /home, /home1.
: Is there any tool like partition magic on PC for Unix? With

avatar
s*t
4

why? you can move any directory /foo/bar to a new partition and make the
mount point of that partition be /foo/bar and you are done.

【在 m*****e 的大作中提到】
: A simple solution is to move directories to other partitions, and make symlinks
: to point to the new location. Better not move /usr/bin or /usr/lib. man pages
: or things like that are a good candidate.

avatar
c*t
5
For system files/directories, better not move them around since if you
do, you may not get the system boot up because at the boot time, only /
is mounted. Also, many /usr/bin/, /sbin/ maybe hard linked to other
directories; moving them don't save any space..

【在 s***t 的大作中提到】
:
: why? you can move any directory /foo/bar to a new partition and make the
: mount point of that partition be /foo/bar and you are done.

avatar
s*t
6
don't understand. anything needed for booting the os is in /boot.
of course you don't want to move it arround and it's very small.
but for /usr/, sure you can move it to another partition and don't
affect anything, and /usr/ usually has several hundred megabytes to
a couple of gigabytes. unix doesn't use partition, instead, it uses
directory to locate the files.

【在 c*****t 的大作中提到】
: For system files/directories, better not move them around since if you
: do, you may not get the system boot up because at the boot time, only /
: is mounted. Also, many /usr/bin/, /sbin/ maybe hard linked to other
: directories; moving them don't save any space..

avatar
m*e
7
Having spare space on a partition doesn't necessarily mean the whole partition
can be used.
Also you'd better keep critical stuff on / only, in case of emergency.
Otherwise what if that partition fails but fsck is on it? It's always
bad to add an extra point of failure.

【在 s***t 的大作中提到】
: don't understand. anything needed for booting the os is in /boot.
: of course you don't want to move it arround and it's very small.
: but for /usr/, sure you can move it to another partition and don't
: affect anything, and /usr/ usually has several hundred megabytes to
: a couple of gigabytes. unix doesn't use partition, instead, it uses
: directory to locate the files.

avatar
s*t
8

good point.
but why / is safer than any other paticular partition? also, one should
always have a rescue disc in case of emergency.

【在 m*****e 的大作中提到】
: Having spare space on a partition doesn't necessarily mean the whole partition
: can be used.
: Also you'd better keep critical stuff on / only, in case of emergency.
: Otherwise what if that partition fails but fsck is on it? It's always
: bad to add an extra point of failure.

avatar
m*e
9

There is no /boot for unix.
On Solaris /bin is a symlink to /usr/bin, so it really matters. If you
have a separate /bin, like in Linux, I totally agree that you can mount
another partition on /usr and it really doesn't affect anything. But
here just be careful..
Uh, some programs are in /sbin, such as mount, but fsck is in /usr/sbin,
and /usr/lib is needed for all programs. Anyway, the whole point is, /
should have everything you need to boot/fix a system to a healthy state.
I have no idea w

【在 s***t 的大作中提到】
: don't understand. anything needed for booting the os is in /boot.
: of course you don't want to move it arround and it's very small.
: but for /usr/, sure you can move it to another partition and don't
: affect anything, and /usr/ usually has several hundred megabytes to
: a couple of gigabytes. unix doesn't use partition, instead, it uses
: directory to locate the files.

avatar
m*e
10

/ is not safer than any other partition. The point is, if / fails, everything
else fails even if you have a good /usr. If / is good, but /usr fails, you
should be able to fix it. But if the bins are all on /usr, you fail too.
You are right that rescue disc helps, although it's not so convenient to use.
Seriously, in this case, the best way is to move all /usr/local stuff out to
other partitions. It's usually where the custom packages are installed,
and moving them out shouldn't affect anyth

【在 s***t 的大作中提到】
:
: good point.
: but why / is safer than any other paticular partition? also, one should
: always have a rescue disc in case of emergency.

avatar
L*e
11
Can anyone explain in steps how to move /usr/local to
another partition?
like /dev/dsk/c0t0d0s7 (/hom1)?
What should I do to move a file?
I figure should be:
mv -f /usr/local /home1
link -s /home1/usr/local /usr/local
This would make /usr/local be the subdirectory of /home1,
right?
What if I want it to be at the level of /home1, but change
to the partition
/home1 resides? Is there anything need to be done in
/etc/vfstab?
How to specify /usr/local to a specific partition. Like
/dev/dsk/c0t0d0s7?

【在 m*****e 的大作中提到】
:
: / is not safer than any other partition. The point is, if / fails, everything
: else fails even if you have a good /usr. If / is good, but /usr fails, you
: should be able to fix it. But if the bins are all on /usr, you fail too.
: You are right that rescue disc helps, although it's not so convenient to use.
: Seriously, in this case, the best way is to move all /usr/local stuff out to
: other partitions. It's usually where the custom packages are installed,
: and moving them out shouldn't affect anyth

avatar
m*e
12

yes.
yes.
You can remove /home1 from vfstab and mount it on /usr/local.
If you want to keep existing partitions as-is, you will have to repartition.
in your /etc/vfstab:
/dev/dsk/c0t1d0s7 /dev/rdsk/c0t1d0s7 /usr/local ufs 1 yes -

【在 L***e 的大作中提到】
: Can anyone explain in steps how to move /usr/local to
: another partition?
: like /dev/dsk/c0t0d0s7 (/hom1)?
: What should I do to move a file?
: I figure should be:
: mv -f /usr/local /home1
: link -s /home1/usr/local /usr/local
: This would make /usr/local be the subdirectory of /home1,
: right?
: What if I want it to be at the level of /home1, but change

avatar
L*e
13
avatar
m*e
14

They will be in /usr/local, and you will not be able to see all the files in
the original /usr/local if you don't copy them out to the old /home1.
Yes of course.
If you never did this before, I'd say take your own risk.
I have no experience installing Solaris by CD. All the machines
in my department were installed via network, and I upgraded lots
of them (hmmm, I upgraded 10 sun4u's last week, and I'm gonna
upgrade another 7 suns next week).
For Solaris 8 2G is enough. Lots of machines in my

【在 L***e 的大作中提到】

avatar
L*e
15
What about user home directories? /export/home?
Do you use NIS and put all user files on one HOME machine?
I wanted to set up a network installation server, but how do
I do that? It's not stated in the documentation. So far I
tried 2 machines and they don't give me an OPTION to set it
up as network installation server. Some of the old Unix
boxes don't even have a CD-rom, I will need to figure out
how to dismount one CD-rom and attach it to the other when
installing Solaris 8.
It's tough when the
avatar
m*e
16

Home directories are automounted via NFS/AMD :-)

【在 L***e 的大作中提到】
: What about user home directories? /export/home?
: Do you use NIS and put all user files on one HOME machine?
: I wanted to set up a network installation server, but how do
: I do that? It's not stated in the documentation. So far I
: tried 2 machines and they don't give me an OPTION to set it
: up as network installation server. Some of the old Unix
: boxes don't even have a CD-rom, I will need to figure out
: how to dismount one CD-rom and attach it to the other when
: installing Solaris 8.
: It's tough when the

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。