03-31-2008
Remove /dev/sdb partition using fdisk - BY ACCIDENT!
Quote:
It will probably be gone after the next reboot. RAID complicates matters, but I think you just might be lucky enough that it could be recovered if you can figure out what numbers to put in when you create a new partition with
exactly the same parameters as the one you deleted.
There are also tools which can help you make an educated guess.
TestDisk - CGSecurity is one I personally had some success with under similar circumstances.
This is Linux, right? Make a lot of sense to include platform information for this sort of question.
Sorry, I was in sort of a panic mode and forgot other detail. This is a server running CentOS 4.5. The system partition is on a separate raid1 set and identified as /dev/sda; The one I messed up was /dev/sdb, and it contains all the users "home" directory. As of now, from the user's side, I don't think my mistake affect anyone. But for how long, I really don't know.
I will take a look at TestDisk and would really appreciate all advice and suggestions.
K.
10 More Discussions You Might Find Interesting
1. Solaris
I have two disks on a sun blade 100. I just installed a solaris8 on the first disk. The installation was successful. But the problem is now I lost all data / partition on my second hard disk.
The possible reason could be:
1. I used default web start install. During the installation I didn't... (2 Replies)
Discussion started by: motor98
2 Replies
2. Filesystems, Disks and Memory
hi,
I have a SCO unix server which has a 36gb hard drive, but the IT company who supplied it assigned 1gb to /dev/root, 15mb to /dev/boot and 33gb to /dev/u.
The /dev/root partition is now full, is there a way I can use the 33gb assigned to /dev/u without loosing any data, preferably... (2 Replies)
Discussion started by: Martyn
2 Replies
3. UNIX for Dummies Questions & Answers
Hello everyone -
Please forgive me if I violate the forum's etiquette as this is my very first post. I'm posting this on both the dummies and the advance section with the hope for any responses.
I stumbled on this forum while frantically looking for an answer to a dumb, ignorant thing I did... (2 Replies)
Discussion started by: kevindoman
2 Replies
4. UNIX for Dummies Questions & Answers
I have a FAT32 data disk attached to my Mac. It has 1 partition that is marked as bootable and the Mac tries to boot from it even though it has no OS on it. The man page for fdisk tells how to turn on the boot flag for a partition, but not how to remove it. Is there a way? Thanks! (0 Replies)
Discussion started by: jkorchok
0 Replies
5. Filesystems, Disks and Memory
Hello,
I have a RHEL system with two 500GB hard drives in RAID 1 (I think hardware, but not 100% certain - any way to tell?).
It looks like it was just set up in default configuration with a small boot partition and one huge partition for the rest, which composes a LVM volume.
I want... (1 Reply)
Discussion started by: builder88
1 Replies
6. Shell Programming and Scripting
Hi,
How can I run fdisk partition in a script without interactive input?
In manual procedure, I run fdisk device, select n, select p, presess enter for default start number (1), press enter to default end number, then select w for writing to the partition table. The command looks like... (3 Replies)
Discussion started by: hce
3 Replies
7. Red Hat
Hello,
I have been going through our environment and I see we have a few servers with LVM's setup and the file system type is still set to "83" within fdisk. If I change this to "8e", will it hurt the data or cause any loss? I need to know for sure before I make the change. (1 Reply)
Discussion started by: s ladd
1 Replies
8. Solaris
So, we removed a LUN from the SAN and the system is refusing to remove the references to it in the /dev folder. I've done the following:
devfsadm -Cv
powermt -q
luxadm -e offline <drive path>
luxadm probe
All those commands failed to remove the path. The drive stills shows up as <drive... (13 Replies)
Discussion started by: DustinT
13 Replies
9. UNIX for Advanced & Expert Users
Hello,
I have rebooted the RHEL VM but after rebooting the vm it not showing all the partition mounted on OS level, if i'll execute the fdisk -l command, then i'm able to see the same disk. below is the fdisk output :
# fdisk -l
Disk /dev/sda: 107.6 GB, 107639996416 bytes
255 heads, 63... (1 Reply)
Discussion started by: purushottamaher
1 Replies
10. Red Hat
Hi,
Please suggest steps to change grub from /dev/sda to /dev/sdb, (1 Reply)
Discussion started by: manoj.solaris
1 Replies
LEARN ABOUT DEBIAN
testdisk
TESTDISK(8) Administration Tools TESTDISK(8)
NAME
testdisk - Scan and repair disk partitions
SYNOPSIS
testdisk [/log] [/debug] [/dump] [device|image.dd|image.e01]
testdisk /version
testdisk /list [/log]
DESCRIPTION
TestDisk checks and recovers lost partitions
It works with :
- BeFS (BeOS)
- BSD disklabel (FreeBSD/OpenBSD/NetBSD)
- CramFS, Compressed File System
- DOS/Windows FAT12, FAT16 and FAT32
- HFS and HFS+, Hierarchical File System
- JFS, IBM's Journaled File System
- Linux ext2/ext3/ext4
- Linux Raid
RAID 1: mirroring
RAID 4: striped array with parity device
RAID 5: striped array with distributed parity information
RAID 6: striped array with distributed dual redundancy information
- Linux Swap (versions 1 and 2)
- LVM and LVM2, Linux Logical Volume Manager
- Mac partition map
- Novell Storage Services NSS
- NTFS (Windows NT/2K/XP/2003/Vista/...)
- ReiserFS 3.5, 3.6 and 4
- Sun Solaris i386 disklabel
- Unix File System UFS and UFS2 (Sun/BSD/...)
- XFS, SGI's Journaled File System
It can undelete files from
- DOS/Windows FAT12, FAT16 and FAT32
- Linux ext2
- NTFS (Windows NT/2K/XP/2003/Vista/...)
OPTIONS
/log create a testdisk.log file
/debug add debug information
/dump dump raw sectors
/list display current partitions
SEE ALSO
fdisk(8), photorec(8).
AUTHOR
TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
2011 November TESTDISK(8)