- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: SAM corrupted
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
08-16-2006 04:18 AM
08-16-2006 04:18 AM
Re: SAM corrupted
"/problem = the problem filesystem (in my case, /usr /var and opt)
cp /problem /temp_problem
newfs -F vxfs /problem
cp -r /tmp/problem /problem
"
The line
cp /problem /temp_problem
will do nothing, because the switch -R is missing. So the /temp_problem directory will stay empty. Anyway, if you use the -R, you will change all access rights and ownership to different values.
The newfs command requires "raw" devices, but I assume you did something like
newfs -F vxfs /dev/vg00/rlvol6
But finally you need to rebuild the system now, at least because of your wrong copy action.
Don't waste your time and reinstall the box ;-)
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2006 06:23 AM
08-16-2006 06:23 AM
Re: SAM corrupted
This was more of a high level pseudocode than exact commands, sorry I used the -R switch of course, and the "raw" device when doing newfs.
The system has been rebult... But I want to know what went wrong out of sheer curiosity and the desire to be better so that this doesn't happen again.
In my mind the lesson I see, you cannot use the "cp" command on critical filesystems like that. My guess is, some important files were left out somehow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2006 06:29 AM
08-16-2006 06:29 AM
Re: SAM corrupted
Secondly, cp with or without -R is not a good choice for copying critical files because ownership/group/mode will not be perfectly preserved. You also have to concern yourself with symbolic links. Utilities like tar, cpio, fbackup/frecover are much better at preserving attributes.
In short, the ways to mess up a UNIX box are legion. You obviously have discovered at least one technique.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2006 06:36 AM
08-16-2006 06:36 AM
Re: SAM corrupted
There are two ways to do this, the professional way with proper tools or you can try and make a tool that is inapprpriate for the job try and do the job.
The options being considered are equal, in my opinion equally bad.
When money is short I've used rsync with ssh to get the job done. Here is the code.
# configuration to control variables like currentnode and othernode.
. /etc/sysconfig/syncftp.sysconfig
currentnode=$(hostname)
# clusternode=$(clustat | grep samba | awk '{print $2}' )
# echo "hostname: $currentnode $othernode"
while true
do
rsync -avH --stats --delete -e ssh /home/ gatec:/home/
rsync -avH --stats --delete -e ssh /home/ gated:/home/
# echo "sleeping now ..... zzzzzz...."
sleep $DELAY
done
Using a utility that is build into your disk storage arrrays at both end is the way to go.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2006 06:55 AM
08-16-2006 06:55 AM
Re: SAM corrupted
Thanks for the code, it's neat.
In this case, it's even simpler, as there is only 1 machine involved. I needed to sync files between different partitions on the same machine.
tar would have been a much better choice.
- « Previous
-
- 1
- 2
- Next »