- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- A filesystem is full!
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
03-03-2002 05:41 PM
03-03-2002 05:41 PM
A filesystem is full!
I discovered a filesystem is almost full!
1. Now I want to copy files (older then 3 months) to another HP unix server's filesystem, then I will delete the files in the full filesystem.
or
2. ftp files (older than 3 months) to my PC, then I will delete the files in the full filesystem.
Would you tell me how I can write a script for that? Thanks!
Regards
ajk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2002 05:54 PM
03-03-2002 05:54 PM
Re: A filesystem is full!
A few questions first. How many megs does the file system have available, because a file system at 99% can still have 1GB of available space, it just depends upon the size of that filesystem. Also, when you say files that are 3 months old, do you mean files that have not been accessed in three months, or files that have not been updated in three months?
The "find" command do do either. "-atime" for "time last accessed", and "-mtime" for "date last modified".
To copy to another hpux machine using ftp? Why not write the files to tape or use rcp?
Have you tried to identify the large files causing this issue?
cd (to the directory in question)
then
find . -type f -size +1000000 -exec ls -l {} \;
will find any files over 1MB.
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2002 05:57 PM
03-03-2002 05:57 PM
Re: A filesystem is full!
If your are not sure what files you
wish to copy why not set up and NFS
mount point on the destination server.
Have you tried to compress the files
using compress or gzip first? Using
tools like this gain good compression
for flat files.
Another good way is gzip the files into
either tar or cpio and then store them
onto your other server.
gzip
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2002 06:46 PM
03-03-2002 06:46 PM
Re: A filesystem is full!
cd /directory
find . -mtime +90 -print >/tmp/list
for file in `cat /tmp/list`
do
rcp -p $file remote_host:/directory
done
After you verify the files were written on the remote system:
cd /directory
for file in `cat /tmp/list`
do
rm $file
done
As an alternative, you could create an archive file, gzip it, transfer it to the remote system, then extract it there. Of perhaps you could create a tape. Either way, I'd verify the files were actually written on the remote system before deleting them from the local system.
You could even use NFS to mount a remote filesystem then simply copy the files.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2002 10:51 PM
03-03-2002 10:51 PM
Re: A filesystem is full!
I did try "rcp -p $file remote_host:/directory"
but it has an error "remshd: Login incorrect."
What happen?
Thanks!
ajk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2002 12:39 AM
03-04-2002 12:39 AM
Re: A filesystem is full!
hi ,
u have to make necessary entries in ur .rhosts file in the target machine...
Vijeesh CTK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2002 03:50 AM
03-04-2002 03:50 AM
Re: A filesystem is full!
You need an .rhosts file in the home directory for the user, this file must have this structure:
machinename user
This is in order to use the rcp, rlogin and much more commands.
Regards,
Justo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2002 04:42 AM
03-04-2002 04:42 AM
Re: A filesystem is full!
find . -name core -exec rm -f {} \;
Actually that will remove them, but you could replace rm with ll.
Trond
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2002 08:24 PM
03-04-2002 08:24 PM
Re: A filesystem is full!
Now I am using the Darrell's procedure and I did the .rhosts. However, it caused an error
"rcp: cat: No such file or directory". Do you guys know what happen? Thanks
ajk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2002 08:31 PM
03-04-2002 08:31 PM
Re: A filesystem is full!
In your script, check your PATH settings. The cat command resides in /usr/bin. If your PATH does not comprise the cat command, the following statement in your script will fail:
for file in `cat /tmp/list`
You can either update your PATH variable or you can simply change the statement to:
for file in `/usr/bin/cat /tmp/list`
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2002 08:34 PM
03-04-2002 08:34 PM
Re: A filesystem is full!
The error could also probably be due to a non-existent /tmp/list.
Check that this file exists before cat executes on it.
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2002 10:31 PM
03-04-2002 10:31 PM
Re: A filesystem is full!
for NAME in $(cat /tmp/list)
>do
>rcp $NAME remote_host:/directory
>done
It works!
Do you know what the difference between NAME and FILE? Thanks!
Regards
ajk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2002 10:41 PM
03-04-2002 10:41 PM
Re: A filesystem is full!
No difference.
Both NAME and file are just variable names. You can define any name you want and reference them later using the $ dollar sign.
Hope this helps. Regards.
Steven Sim Kok Leong