- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: /dev erase by mistake
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
09-12-2003 10:30 AM
09-12-2003 10:30 AM
/dev erase by mistake
Now i'm not able to connect to the server with telnet and rlogin.
Not able to restore, because my tape is /dev/rmt/1m
What we have to do?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2003 10:31 AM
09-12-2003 10:31 AM
Re: /dev erase by mistake
It re-creates all the device special files. Looks like you are going to have to do it from the console though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2003 10:33 AM
09-12-2003 10:33 AM
Re: /dev erase by mistake
# insf -e
And then restore your /dev directory completely from backup. If this doesn't work, you can recover the directory from make_tape_recovery (Ignite) tape.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2003 10:34 AM
09-12-2003 10:34 AM
Re: /dev erase by mistake
I'm not able to connect with a console too,
I have the login prompt, but no tty are available.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2003 10:37 AM
09-12-2003 10:37 AM
Re: /dev erase by mistake
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2003 10:38 AM
09-12-2003 10:38 AM
Re: /dev erase by mistake
A UNIX box just ain't gonna do nothing without no /dev directory on account of it ain't got no devices.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2003 10:38 AM
09-12-2003 10:38 AM
Re: /dev erase by mistake
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2003 10:40 AM
09-12-2003 10:40 AM
Re: /dev erase by mistake
If you have absolutely no way of getting into this machine you have a slightly more difficult problem.
You might try running it using "rsh" from another machine, if only to create /dev/console. I don't think rsh needs a /dev entry BUT you will have lost a lot more than just terminal and tape and disk devices.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2003 10:55 AM
09-12-2003 10:55 AM
Re: /dev erase by mistake
Logon CDE in failsafe mode.
insf -e
Restore with omniback /dev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2003 11:02 AM
09-12-2003 11:02 AM
Re: /dev erase by mistake
Take your latest make_tape_recovery tape and put it in the tape drive
power the machine off, since you can't log in and shut down
power it up.
Go to console
Interupt at the 10 second prompt
bo
Y Interact with the ISL
hpux -is
If it boots, do this.
find the mount command
mount /usr
insf -e
shutdown -ry now
If the solution works, you are on the road to recovery.
If not.
Power down again.
Interupt at the 10 second prompt at the console
sea
You'll see a sequential device. Sequential means tape. It will say something like P3
bo P3
N Do not interact.
Restore from that Ignite tape.
Its automated from there.
In case you are really screwed and can't recovery, you probably need to immediately explain to management that you made a big mistake and reinstall the operating system on that system. You might be able to get away without harming data, depending on how you laid out your volume groups.
When the system is back up, you need to run a script that looks like this once a week.
#!/usr/bin/sh
/opt/ignite/bin/make_tape_recovery -Av -x inc_entire=vg00
Good Luck,
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
09-12-2003 11:20 AM
09-12-2003 11:20 AM
Re: /dev erase by mistake
You could install the boot disk in another box, import the VG, and mount the root filesystem as, perhaps, /dev/root. You could then run mknod to create a few of the critical devices, along with /dev/vg00, and be back in business rather quickly. If you do have another box in which you can mount your boot disk then we can probably talk you through the process.
Yours is the kind of problem that mirrors don't help because you simply mirror your booboo's. That's why a "lifeboat disk" (or an Ignite tape) is such a good tool; it protects you from two things that mirrors do not: 1) really, really bad patches and 2) your own stupidity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2003 11:34 AM
09-12-2003 11:34 AM
Re: /dev erase by mistake
I'm impressed that this was recoverable, and I've never tried to remove a /dev file.
If I tried rm -r /dev/* , why would it not try to access the devices there, try to 'erase' them, but leave my /dev/ directories alone?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2003 12:06 PM
09-12-2003 12:06 PM
Re: /dev erase by mistake
However, insf -e (or a reboot) is NOT guarenteed to create the same device file names. This is because insf scans the backplane as it exists at the moment. If you never added any new disks or tapes or LAN cards, most likely the device files will have the same name. When the system was first installed, the new device files were created the same way, but later I/O cards will not necessarily be in numerical order and the device names (based on the card's instance number) will likely not be the same.
Bill Hassell, sysadmin