- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Symbolic link
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 05:02 AM
02-16-2005 05:02 AM
I want to move /sbin to a separate lvol mounted on /sbin2, how do i go about copying the current directory & symbolicly linking to the new /sbin2 lvol ?
Regards,
Aidan Mc Ardle
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 05:09 AM
02-16-2005 05:09 AM
Solution/sbin contains among other things /sbin/sh /sbin/fsck and /sbin/mount - Your system won't survive the next reboot.
If You have a space issue in / there are many other ways to solve it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 05:11 AM
02-16-2005 05:11 AM
Re: Symbolic link
cd /sbin
find . -print | cpio -ocv > /var/tmp/cpio.dat
mkdir /sbin2
cpio -icvdum < /var/tmp/cpio.dat
cd /
rm -r /sbin
ln -s /sbin2 /sbin
Now, you stand an excellent chance of shooting yourself in the foot. All of the utilities in /sbin are statically linked and are expected to be in the root filesystem. If you mount them to another filesystem, you need the mount commandf to mount them but (oops) the mount command isn't available because the filesystem housing it is mounted.
As long as /sbin2 and /sbin are actually housed in the root filesystem then you should be okay but it that case a hard-link rather than a symbolic link would work. Since you are asking about soft (symbolic) links, you are implying a diffent filesystem. DON'T DO IT.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 05:11 AM
02-16-2005 05:11 AM
Re: Symbolic link
cd /sbin
find . -print | cpio -ocv > /var/tmp/cpio.dat
mkdir /sbin2
cpio -icvdum < /var/tmp/cpio.dat
cd /
rm -r /sbin
ln -s /sbin2 /sbin
Now, you stand an excellent chance of shooting yourself in the foot. All of the utilities in /sbin are statically linked and are expected to be in the root filesystem. If you mount them to another filesystem, you need the mount commandf to mount them but (oops) the mount command isn't available because the filesystem housing it is mounted.
As long as /sbin2 and /sbin are actually housed in the root filesystem then you should be okay but it that case a hard-link rather than a symbolic link would work. Since you are asking about soft (symbolic) links, you are implying a different filesystem. DON'T DO IT.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 05:20 AM
02-16-2005 05:20 AM
Re: Symbolic link
# du -ks *
8 AUTO
644049 Linux_Distros
0 MANPATH
0 NULL
0 bin
0 cdrom
0 core
16 core.dtwm
100774 data
88 dev
67336 etc
0 home
0 lib
0 lost+found
0 net
0 nohup.out
2418096 opt
100232 sbin
0 sbin2
57616 stand
1007296 tmp
2045512 usr
393600 var
& bdf shows the following
# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 1024000 1023688 312 100% /
/dev/vg00/lvol1 311296 66120 243312 21% /stand
/dev/vg00/lvol7 6291456 413056 5833128 7% /var
/dev/vg00/lvol8 2924544 2069600 848280 71% /usr
/dev/vg00/lvol6 4096000 1024104 3047968 25% /tmp
/dev/vg00/lvol5 5242880 2443848 2777192 47% /opt
/dev/vg00/lvol4 204800 8432 194848 4% /home
/dev/vg01/lvol1 2048000 117748 1809617 6% /data
/dev/vg02/lvol1 25600000 666798 23374883 3% /Linux_Distros
/dev/vg00/sbin2 1024000 16853 944336 2% /sbin2
Aidan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 05:26 AM
02-16-2005 05:26 AM
Re: Symbolic link
This would seem to have been downloaded into your root file system. Move it someplace more appropriate.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 05:29 AM
02-16-2005 05:29 AM
Re: Symbolic link
Linux_Distros has its own lvol in vg02.
Aidan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 05:31 AM
02-16-2005 05:31 AM
Re: Symbolic link
find / -xdev -type f -size +2000000c
A very common mistake is to do a backup to a regular file rather than a tape device node. You might look in /dev/rmt for any regular files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 05:32 AM
02-16-2005 05:32 AM
Re: Symbolic link
Run the command this way:
du -akx / | sort -nr | more
The -x keeps the scan IN the filesystem & the reverse sort puts the big hitters up top.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 05:34 AM
02-16-2005 05:34 AM
Re: Symbolic link
du -kx | sort -rn | head
This will show You the top disk space hogs in the root filesystem.
The usual way of extending / is to recover from an ignite tape and modify it there.
The only way to do it completely online works *only* if You have a 'relocatable' lv directly after lvol3 and run a mirrored configuration.
---
relocatable: not /stand, not pri swap, not /
nothing that needs contingous allocation.
---
On our systems /home resides in that space for this very reason.
If that is the case You can lvreduce the mirrors on the primary disk, create a unmirrored lv that fills the space, remirror the to-be-moved lv, then drop the other mirror and fill that space, remirror, drop both temporary lvs.
then check that original and mirror PEs of / are contiguous (LE X resides on the same PE of the mirrored disks) and extend the lvol3 and filesystem /.
also, You will have to take care that the /etc/lvmconf/*Z backups don't fill up the / directory and get damaged by it. These should better be moved to a safe place before every step.
Did I mention making backups and being aware that this is a lengthy process?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 05:36 AM
02-16-2005 05:36 AM
Re: Symbolic link
Both your /etc/ and your /sbin/ look to be at least twice normal size. Try drilling down into them with "du -sk /etc/*" and "du -sk /sbin/*"
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 05:41 AM
02-16-2005 05:41 AM
Re: Symbolic link
fuser -u
if it's (sometimes happens, e.g. with problems on dld.sl) the file /etc/rc.log, copy it over to /tmp, compress it there and then wipe it using a redirect
> /etc/rc.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2005 06:21 AM
02-17-2005 06:21 AM
Re: Symbolic link
Check any "dot" files and directories
in "/" like /.mozilla, /.netscape, etc.
"du *" does not scan those. ("du /.*" is
overkill, because ".*" matches "..")
Also, files in directories which are hidden
under mount points count against your disk
usage. Go to single user mode and
see if there is anything in the directories
/usr, /tmp, etc. before /usr, /tmp, etc. get
mounted to them (from vg00, vg01, etc.)
You'll have to check /usr without the use of
"du" or "find", because they live in /usr.
Once you've checked /usr you can mount /usr
and scan the others with "du" or "find".