Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

This is stupid. I ordered 2SSD from a provicer. Usually I am the one doing the partitioning and formatting. I will then know which one is the SSD by looking at disks that's not partitioned yet.

Turns out, despite the unmanaged status of the server, and price that's unusually low, the provider, perfectip.net did the installation and partitioning. In other word, they go above and beyond duty and have improved a lot.

While I actually appreciate it, I did not know how to differentiate which one is which.

So I repartition and reformat sdb and sdc because I thought that's the new SSDs. I got warning saying that sdc1 is in use, and I was like, how come? It's a new hard disk. So I unmount and go ahead nevertheless.

I went to /boot which seems to be where /sdc1 is mounted too and I saw a bunch of .img file. Ah, it must be back up I suppose.

In short, if I go to /boot I see nothing.

To further add complication /sdc1 which is now mounted to /home3 is only 440 MB even though the whole /sdc is 1.5 T hard disk.

root@host [/boot]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                       50G  8.6G   39G  19% /
tmpfs                  32G     0   32G   0% /dev/shm
/dev/mapper/VolGroup-lv_home
                      1.3T  192G  1.1T  16% /home
/usr/tmpDSK           485M   11M  449M   3% /tmp
/dev/sdc1             485M   11M  449M   3% /home3
/dev/sdb1              97M  5.6M   87M   7% /home2

doing

root@host [/boot]# fdisk -l

Disk /dev/sdb: 256.1 GB, 256060514304 bytes
255 heads, 63 sectors/track, 31130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xb4852a81

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       31130   250051693+  8e  Linux LVM

Disk /dev/sdc: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00037518

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1      182401  1465136001   8e  Linux LVM

Disk /dev/mapper/VolGroup-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/VolGroup-lv_swap: 33.8 GB, 33839644672 bytes
255 heads, 63 sectors/track, 4114 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/VolGroup-lv_home: 1412.2 GB, 1412247322624 bytes
255 heads, 63 sectors/track, 171695 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

root@host [/boot]#

As you see, there is only 1 partition in sdc namely sdc1

There is a bunch of /dev/mapper which I do not understand what.

Oh ya in addition of deleting /sdc1, I recreated /sdc1 and mount that and can't unmount.

So I am screwed do I? All files are already backed up. Server is still running anyway. Should I ask for a reinstall?

share|improve this question
1  
If you have all files backed up, why not just restore that backup? –  Marco Jan 4 '13 at 12:46
    
You assumed wrong about the device nodes for the new drive because they are not assigned in "the order in which the drives were installed" -- they are assigned in the order they are listed in the bios. So (eg) if your original HD was plugged into SATA port 3 -- there is no reason to care which one, and generally no clear marker on the motherboard anyway -- when it was the only drive existing, it would be sda. However, if you then plug a new drive into SATA port 1, when you boot up, that will be sda and your old drive sdb. Remember this next time. –  goldilocks Jan 4 '13 at 13:23
    
UUID's are a sort of solution to this ^^, as they do not change unless you reformat the drive. eaglegordon.hubpages.com/hub/Finding-UUIDs-numbers –  goldilocks Jan 4 '13 at 13:28

2 Answers 2

up vote 3 down vote accepted

Your kernel's already loaded into RAM, which is why if you haven't shut off your server you'll still be able to use the server. Make a new partition (probably ext2), about 50MB, and download the sources to the linux kernel (3.7.1). Then, compile your own kernel and reinstall GRUB or LILO. Then, update the config file and the /etc/fstab to your recognize your system's boot partition.

More info here:

http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?full=1

Gentoo's got great docs on how to do all of this. Just make sure to get either a vanilla kernel or your distro's kernel.

share|improve this answer

Those /dev/mapper entries mean your install uses dm/lvm which you usually don't need to worry about. It means you need an extra boot partition and initram files (or similar concepts), because it's usually impossible for your bootloader in this situation to be able to grab the kernel and boot.

Given that you deleted that partition and have no backup and it's probably pretty hard to recreate them (well it's not really, but you have obviously never done it and have no way of knowing if your provider does anything fancy, which would be a recipe for disaster), so please whatever you do, ask your provider to reinstall that boot partition.

This answer assumes this system is in some way in production already, which I believe you imply. If this system was just setup before you got it and you don't care about that state, then you could just wipe it and start over, but i guess you wouldn't have asked in that case.

Once this is all over, please sit back for half an hour and go over this situation again. You have made mistakes in more than one place here and you could really learn valuable lessons, that will save you great pain in the future.

share|improve this answer
    
From the OP: "All files are already backed up." So "Given that you ... have no backup" is plain wrong. –  Michael Kjörling Jan 4 '13 at 12:26
    
I read that to be a backup of the rest of the system taken after the fact and not including the /boot content, but op may want to clarify. –  Max Jan 4 '13 at 12:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.