Re: RAID1 all bootable

Francesco Pietra <[email protected]>
Newsgroups gmane.linux.debian.ports.amd64,gmane.linux.debian.user
Message-ID <CAEv0nmtSpZNQeD_1YEwsj98zMaRuOsHyTVx4RT5Hc8Kiq7hRrQ@mail.gmail.com>
On Wed, Mar 6, 2013 at 9:03 PM, Lennart Sorensen
<[email protected]> wrote:
> On Wed, Mar 06, 2013 at 08:03:12PM +0100, Francesco Pietra wrote:
>> Sorry, I forgot both the list and the appropriate output;
>>
>> root@....:/home/francesco# fdisk -l
>>
>> Disk /dev/sda: 500.1 GB, 500107862016 bytes
>> 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
>> Units = sectors of 1 * 512 = 512 bytes
>> Sector size (logical/physical): 512 bytes / 4096 bytes
>> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
>> Disk identifier: 0x000f1911
>>
>>    Device Boot      Start         End      Blocks   Id  System
>> /dev/sda1   *        2048      385023      191488   fd  Linux raid autodetect
>> /dev/sda2          385024   976166911   487890944   fd  Linux raid autodetect
>>
>> Disk /dev/sdb: 500.1 GB, 500107862016 bytes
>> 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
>> Units = sectors of 1 * 512 = 512 bytes
>> Sector size (logical/physical): 512 bytes / 4096 bytes
>> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
>> Disk identifier: 0x0000cca6
>>
>>    Device Boot      Start         End      Blocks   Id  System
>> /dev/sdb1   *        2048      385023      191488   fd  Linux raid autodetect
>> /dev/sdb2          385024   976166911   487890944   fd  Linux raid autodetect
>
> OK, so that is the normal setup with partitions.  grub-install /dev/sda
> and /dev/sdb should have worked fine (but of course it has to be run
> from the system, not some other thing like knoppix or the like) or from
> a chroot into the system even if booted from something else.
>
>> Disk /dev/md0: 195 MB, 195887104 bytes
>> 2 heads, 4 sectors/track, 47824 cylinders, total 382592 sectors
>> Units = sectors of 1 * 512 = 512 bytes
>> Sector size (logical/physical): 512 bytes / 4096 bytes
>> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
>> Disk identifier: 0x00000000
>>
>> Disk /dev/md0 doesn't contain a valid partition table
>>
>> Disk /dev/md1: 499.5 GB, 499465912320 bytes
>> 2 heads, 4 sectors/track, 121939920 cylinders, total 975519360 sectors
>> Units = sectors of 1 * 512 = 512 bytes
>> Sector size (logical/physical): 512 bytes / 4096 bytes
>> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
>> Disk identifier: 0x00000000
>>
>> Disk /dev/md1 doesn't contain a valid partition table
>>
>> Disk /dev/mapper/vg1-root: 998 MB, 998244352 bytes
>> 255 heads, 63 sectors/track, 121 cylinders, total 1949696 sectors
>> Units = sectors of 1 * 512 = 512 bytes
>> Sector size (logical/physical): 512 bytes / 4096 bytes
>> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
>> Disk identifier: 0x00000000
>>
>> Disk /dev/mapper/vg1-root doesn't contain a valid partition table
>>
>> Disk /dev/mapper/vg1-swap: 15.0 GB, 14998831104 bytes
>> 255 heads, 63 sectors/track, 1823 cylinders, total 29294592 sectors
>> Units = sectors of 1 * 512 = 512 bytes
>> Sector size (logical/physical): 512 bytes / 4096 bytes
>> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
>> Disk identifier: 0x00000000
>>
>> Disk /dev/mapper/vg1-swap doesn't contain a valid partition table
>>
>> Disk /dev/mapper/vg1-usr: 30.0 GB, 29997662208 bytes
>> 255 heads, 63 sectors/track, 3647 cylinders, total 58589184 sectors
>> Units = sectors of 1 * 512 = 512 bytes
>> Sector size (logical/physical): 512 bytes / 4096 bytes
>> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
>> Disk identifier: 0x00000000
>>
>> Disk /dev/mapper/vg1-usr doesn't contain a valid partition table
>>
>> Disk /dev/mapper/vg1-opt: 9999 MB, 9999220736 bytes
>> 255 heads, 63 sectors/track, 1215 cylinders, total 19529728 sectors
>> Units = sectors of 1 * 512 = 512 bytes
>> Sector size (logical/physical): 512 bytes / 4096 bytes
>> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
>> Disk identifier: 0x00000000
>>
>> Disk /dev/mapper/vg1-opt doesn't contain a valid partition table
>>
>> Disk /dev/mapper/vg1-var: 9999 MB, 9999220736 bytes
>> 255 heads, 63 sectors/track, 1215 cylinders, total 19529728 sectors
>> Units = sectors of 1 * 512 = 512 bytes
>> Sector size (logical/physical): 512 bytes / 4096 bytes
>> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
>> Disk identifier: 0x00000000
>>
>> Disk /dev/mapper/vg1-var doesn't contain a valid partition table
>>
>> Disk /dev/mapper/vg1-tmp: 2998 MB, 2998927360 bytes
>> 255 heads, 63 sectors/track, 364 cylinders, total 5857280 sectors
>> Units = sectors of 1 * 512 = 512 bytes
>> Sector size (logical/physical): 512 bytes / 4096 bytes
>> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
>> Disk identifier: 0x00000000
>>
>> Disk /dev/mapper/vg1-tmp doesn't contain a valid partition table
>>
>> Disk /dev/mapper/vg1-home: 430.0 GB, 430000046080 bytes
>> 255 heads, 63 sectors/track, 52277 cylinders, total 839843840 sectors
>> Units = sectors of 1 * 512 = 512 bytes
>> Sector size (logical/physical): 512 bytes / 4096 bytes
>> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
>> Disk identifier: 0x00000000
>>
>> Disk /dev/mapper/vg1-home doesn't contain a valid partition table
>> root@....:/home/francesco#
>>
>> root@.....:/home/francesco# cat /proc/mdstat
>> Personalities : [raid1]
>> md1 : active raid1 sda2[0] sdb2[1]
>>        487759680 blocks super 1.2 [2/2] [UU]
>>
>>  md0 : active raid1 sda1[0] sdb1[1]
>>        191296 blocks super 1.2 [2/2] [UU]
>>
>>  unused devices: <none>
>>  root@.....:/home/francesco#
>>
>>  francesco@.....:~$ df -h
>>  Filesystem            Size  Used Avail Use% Mounted on
>>  rootfs                938M  185M  705M  21% /
>>  udev                   10M     0   10M   0% /dev
>>  tmpfs                 807M  628K  807M   1% /run
>>  /dev/mapper/vg1-root  938M  185M  705M  21% /
>>  tmpfs                 5.0M     0  5.0M   0% /run/lock
>>  tmpfs                 1.6G   84K  1.6G   1% /run/shm
>>  /dev/md0              176M   19M  148M  11% /boot
>>  /dev/mapper/vg1-home  395G  284G   91G  76% /home
>>  /dev/mapper/vg1-opt   9.2G  1.5G  7.3G  17% /opt
>>  /dev/mapper/vg1-tmp   2.8G   69M  2.6G   3% /tmp
>>  /dev/mapper/vg1-usr    28G  4.3G   22G  17% /usr
>>  /dev/mapper/vg1-var   9.2G  840M  7.9G  10% /var
>>  francesco@.....:~$
>>
>> This is the currest status.
>>  "grub-install /dev/sdb" was run with that situation (deriving from
>> install with amd64 wheezy B$ installer downloaded on Feb 1, 2013. That
>> installation ended with
>>
>> grub-install /dev/sda
>> update grub
>
> That should work without issue.
>
> --
> Len Sorensen

I must confess that I am confused, or my description was unclear. Hope
not to bother you, I summarize my procedure;

Using the amd64 wheezy beta 4 installer, downloaded Feb 1, 2013, I got
the same situation as described above by "fdisk -l". That installation
ended by asking "install grub on /dev/sda?". I accepted the proposal,
whereby the terminal showed

grub-install /dev.sda

update grub


At next boot, I run

grub-install /dev/sdb

which was accepted without any error or warning message. After
"shutdown -h now", trying to boot, the system entered "grub rescue". I
was unable to recover  the system rapidly, while I had to run a server
(configured the same way as this one) to answer as soon as possible a
question by an editor. Which I did only after the defective machine
was restored with a new fresh installation of amd64, followed by scp
transfer of all my data from the server. This new installation also
ended with grub-install as described above. For me "grub-install
/dev/sdb" did not work.  I saved a trace of the commands.

I mentioned Knoppix only to say that it could serve to trace the
location of grub. I used Knoppix in the South Seas. I had a disk with
Knoppix and all my data, which I used to run Debian on the Microsoft
machines that I found at the institutions there. It proved plain work
on most machines.

Thanks
francesco pietra
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.