Sponsored Content
Top Forums UNIX for Advanced & Expert Users Remove /dev/sdb partition using fdisk - BY ACCIDENT! Post 302180551 by kevindoman on Monday 31st of March 2008 12:29:36 PM
Old 03-31-2008
Remove /dev/sdb partition using fdisk - BY ACCIDENT!

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 today.

I inherited a system and while doing some exploratory tasks, I used the "fdisk /dev/sdb" command to look inside the disk /dev/sdb. While there, I accidentally hit the 'd', enter, 'w' ... effectively wiped out /dev/sdb?

Here's what I found:
(1) /dev/sdb is a stack of four drives belonging to a hardware RAID5 setup.

(2) The /etc/fstab file has this labeled as "home" and mounted as /home on the system.

(3) Looked like users can still access /home for read/write, and they continues to log in and out.

And so, my question to all the gurus: What was the damage from my using of the fdisk tasks?
 

10 More Discussions You Might Find Interesting

1. Solaris

recovery partition table from fdisk?

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

Ran out of space on /dev/root partition

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

Remove /dev/sdb partition using fdisk - BY ACCIDENT!

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

OS X fdisk - Remove bootable flag

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

Partition management: lvm? fdisk? parted? (on RAID)

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

Non-interactive fdisk partition in script

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

Can I change the partition type with fdisk without disrupting data?

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

Lun remove, stuck in /dev/dsk and /dev/rdsk

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

Disk /dev/sdb doesn't contain a valid partition table

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

Changing grub from /dev/sda to /dev/sdb

Hi, Please suggest steps to change grub from /dev/sda to /dev/sdb, (1 Reply)
Discussion started by: manoj.solaris
1 Replies
PARTX(8)						       System Administration							  PARTX(8)

NAME
partx - tell the kernel about the presence and numbering of on-disk partitions SYNOPSIS
partx [-a|-d|-P|-r|-s|-u] [-t type] [-n M:N] [-] disk partx [-a|-d|-P|-r|-s|-u] [-t type] partition [disk] DESCRIPTION
Given a device or disk-image, partx tries to parse the partition table and list its contents. It can also tell the kernel to add or remove partitions from its bookkeeping. The disk argument is optional when a partition argument is provided. To force scanning a partition as if it were a whole disk (for example to list nested subpartitions), use the argument "-" (hyphen-minus). For example: partx --show - /dev/sda3 This will see sda3 as a whole-disk rather than as a partition. partx is not an fdisk program - adding and removing partitions does not change the disk, it just tells the kernel about the presence and numbering of on-disk partitions. OPTIONS
-a, --add Add the specified partitions, or read the disk and add all partitions. -b, --bytes Print the SIZE column in bytes rather than in human-readable format. -d, --delete Delete the specified partitions or all partitions. -g, --noheadings Do not print a header line with --show or --raw. -l, --list List the partitions. Note that all numbers are in 512-byte sectors. This output format is DEPRECATED in favour of --show. Do not use it in newly written scripts. -n, --nr M:N Specify the range of partitions. For backward compatibility also the format M-N is supported. The range may contain negative num- bers, for example --nr -1:-1 means the last partition, and --nr -2:-1 means the last two partitions. Supported range specifications are: M Specifies just one partition (e.g. --nr 3). M: Specifies the lower limit only (e.g. --nr 2:). :N Specifies the upper limit only (e.g. --nr :4). M:N Specifies the lower and upper limits (e.g. --nr 2:4). -o, --output list Define the output columns to use for --show, --pairs and --raw output. If no output arrangement is specified, then a default set is used. Use --help to get list of all supported columns. This option cannot be combined with the --add, --delete, --update or --list options. -P, --pairs List the partitions using the KEY="value" format. -r, --raw List the partitions using the raw output format. -s, --show List the partitions. The output columns can be selected and rearranged with the --output option. All numbers (except SIZE) are in 512-byte sectors. -t, --type type Specify the partition table type. --list-types List supported partition types and exit. -u, --update Update the specified partitions. -S, --sector-size size Overwrite default sector size. -v, --verbose Verbose mode. -V, --version Display version information and exit. -h, --help Display help text and exit. EXAMPLES
partx --show /dev/sdb3 partx --show --nr 3 /dev/sdb partx --show /dev/sdb3 /dev/sdb All three commands list partition 3 of /dev/sdb. partx --show - /dev/sdb3 Lists all subpartitions on /dev/sdb3 (the device is used as whole-disk). partx -o START -g --nr 5 /dev/sdb Prints the start sector of partition 5 on /dev/sdb without header. partx -o SECTORS,SIZE /dev/sda5 /dev/sda Lists the length in sectors and human-readable size of partition 5 on /dev/sda. partx --add --nr 3:5 /dev/sdd Adds all available partitions from 3 to 5 (inclusive) on /dev/sdd. partx -d --nr :-1 /dev/sdd Removes the last partition on /dev/sdd. SEE ALSO
addpart(8), delpart(8), fdisk(8), parted(8), partprobe(8) AUTHORS
Davidlohr Bueso <dave@gnu.org> Karel Zak <kzak@redhat.com> The original version was written by Andries E. Brouwer <aeb@cwi.nl>. ENVIRONMENT
LIBBLKID_DEBUG=all enables libblkid debug output. AVAILABILITY
The partx command is part of the util-linux package and is available from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils /util-linux/>. util-linux December 2014 PARTX(8)
All times are GMT -4. The time now is 08:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy