You probably didn't do an "update-grub" and grub no longer has any proper menu entries, but before you can fix it let's try to get grub booting anyway.
If you get this lovely black grub screen here's how you can get things booting.
In my case I have a gpt partition with partition 1 and 2. Partion 1 is just my EFI / ESPand partion 2 /dev/sda2 is my root which includes /boot.
You will have to adjust this if you had a separate /boot partition.........
1.) Create your EFI/ESP Partition
If you happen to have some free space on the drive already then this is easy, just create a new partition of at least 100M.
The nice thing about the EFI spec is that it must just be in the first 2.2TB of space so for most users, it means you can simply resize the last partition(downsize it by 100M) and then add an EFI partition at the end.
For example if you had this partition scheme:
/dev/sda1 = /........
Usually if you get the grub boot loader and it doesn't show any boot options, it's because grub was not installed correctly and/or the partition that it is supposed to be on has changed or does not exist. It can also happen if you install Linux to one drive, but the boot loader to another by accident, whether EFI or MBR/Legacy mode.
You can normally fix your booting/bootloader/MBR/EFI it by chrooting into your root partition:
Before you try to install and dual boot it is very important to understand the concept of "what boot mode your BIOS is in" and "what mode you booted the installer to".
Then follow the example of Linux Mint (but most Linux installers are very similar)to carefully understand WHERE you are installing your Boot Loader to whether that be MBR or EFI.
How Am IBooted?
First it's important to check your BIOS to see........
Is a mdadm check on your trusty software RAID array happening at the worst time and slowing down your server or NAS?
Personalities : [raid1] [raid10]
md127 : active raid10 sdb4 sda4
897500672 blocks super 1.2 2 near-copies [2/2] [UU]
[==========>..........] check = 50.4% (452485504/897500672) finish=15500.3min speed=478K/sec
This is caused because the user is running as qemu for virt-resize and if qemu does not have privileges to read from the source and write to the destination, it will fail with the below. So either change the uid of qemu or change the ownership of the source and target.
virt-resize --expand /dev/sda2 /root/kvmtemplates/windows2019-eval-template.img /root/kvmguests/kvmkvmuser4515........
It is unfortunate that LXC's dir mode is completely insecure and allows way too much information from the host to be seen. I wonder if there will eventually be a way to break into the host filesystem or other container's storage?
OpenVZ better security:
[root@ev ~]# cat /proc/mdstat
cat: /proc/mdstat: No such file or directory
/dev/simfs 843G 740G 61G........
The reason for doing this is that the installer doesn't seem to work properly for LUKS and the server installer doesn't even support LUKS anymore. When you use the GUI install on Desktop for LUKS it won't boot and will just hang after you enter your password. So the only reliable way is to do it ourselves.
1.) Make a default minimal install of Ubuntu
2.) Have a secondary disk on the server or VM.
The cool thing here is that we only need 1 drive to make a RAID 10 or RAID 1 array, we just tell the Linux mdadm utility that the other drive is "missing" and we can then add our original drive to the array after booting into our new RAID array.
Step#1 Install tools we need
yum -y install mdadm rsync
Step #2 Create your partitions on the drive that will be our RAID array
Here I assume it is /dev........
dd is a very handy tool and there are some more practical things we can do. For example if we want to dump a 3TB drive and want to preserve it and only 200GB are being used on the 3TB we can save a lot of space with gzip.
Backing Stuff up with dd
How to Use dd to backup a raw hard drive and tar gzip at once
Change /dev/sda to the drive you want to backup
There are many ways but a favorite way is to boot any Linux LiveCD and to use the syslinux package like so:
Just change the "sdx" to your sd for example /dev/sda or whatever the drive is that is supposed to boot Windows.
sudo dd if=/usr/lib/syslinux/mbr/mbr.bin of=/dev/sdx
0+1 records in
0+1 records out
440 bytes copied, 0.0197808 s, 22.2 kB/s........
Install Errors on Version 12:
This error happened on QEMU emulator version 2.11.1 pve-qemu-kvm_2.11.1-5
on Proxmox/Debian but installing on QEMU.12 on Centos 6 did not produce the error.
*Update it is not related to the OS or QEMU version. This happened in Centos 6 too after a second install.
What really causes this even though you successfully install........
The strange thing is that usually the first install or two will work on any new machine but then it suddenly won't. I had this experience on QEMU 2.13 on a different machine. There is something finicky or buggy about the CUCM installer even when choosing the same virtual hardware specs.
QEMU PC emulator version 0.12.1 (qemu-kvm-0.12.1.2-2.506.el6_10.1), Copyright (c) 2003-2008 Fabrice Bellard
For some reason, perhaps you don't want to run a daemon or let Letsencrypt have access to your production server.
There is a way to use it like a normal CSR/CA setup in manual mode.
./letsencrypt-auto certonly --manual -d realtechtalk.com - www.realtechtalk.com
Eventually you will get prompted to create a certain path and file with certain data:
Create a file containing just this data:
The key thing is that you must use a "machine"id of "pc-1.3" or it will say your hardware is not supported.
Additionally you MUST use a virtio disk or you will get a ks_pre.sh error as soon as the install starts (a look at logs will show it can't find a disk). This is funny because even though the OS finds the disk and an fdisk -l shows it, it looks like the script looks for a /dev/vda device (virtio) and nothing else, so if you didn't use Virtio as you........
The key thing here is to know the actual partition that is encrypted.
Often in Linux Mint's installer that ends up being partition 5 or /dev/sda5
sudo cryptsetup luksOpen /dev/sda5 anynamehere
You will then be prompted for your irrecoverable passphrase:
Enter passphrase for /dev/sda5:
If all goes well it won't say anything further. If it says ""No key available with this passphr........
Do you hate how Centos 7 defaults to allocating most of your valuable space to /home even though it is a production server?
Here is a quick guide on how to take back that space live, while online (of course make sure you have backups just in case something goes wrong!):
First we will reduce our home dir by 100G:
lvreduce -L -100G /dev/mapper/centos-home
WARNING: Reducing active and open logical volume to ........
On a test machine Iwas never able to access to a newly created 4th partiton. As we can see there are dev devices for everything but the 4th partition.
The normal "partprobe" or "kpartx" or kernel being told to rescan the block device didn't help (only a reboot did).
fdisk -l /dev/sda
Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Before getting into the output here is my typical experience with SMART, there is what I call a "bad disk" with pending and uncorrectable sectors that cannot be reallocated.
It has caused a kernel panic and system crash repeatedly as we can see from the logs.
But SMART says it has "PASSED" its self assessment. SMART is still useful to me but it is more about looking at Current_Pending_Sector.
Any time I have had anything but 0 for that attribute it........
sudo apt-get install hwloc-nox
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 530 not upgraded.
Need to get 151 kB of archives.
After this operation, 453 kB of additional disk space will be used.
I don't recall having this issue in the distant past but nowadays at least Debian seems to be very picky about this.
I used dd to copy one hard drive to another and tried booting it. Everything seemed fine with grub working but each time it would drop to the busybox shell. There is no particular error so this is misleading.
Normally the first things you would check are to make sure your fstab is correct (that the UUID is correct)and that you've updated grub.&........
guestmount -a kvmuserscra.img -m /dev/sda1 mount
libguestfs: error: mount_options: /dev/sda1 on / (options: ''): mount: unknown filesystem type 'ntfs'
guestmount: '/dev/sda1' could not be mounted.
guestmount: Did you mean to mount one of these filesystems?
guestmount: /dev/sda1 (ntfs)
guestmount: /dev/sda2 (ntfs)
yum -y install ntfs-3g
The old MBR 512 bytes partition table is no longer valid if you are using GPT.
To copy a GPT table with dd to another disk do it like so:
Below sda is the source disk and destination disk is sdb (change to meet your needs).
dd if=/dev/sda of=/dev/sdb bs=1536 count=1
You can also use dd to backup your partition table like normal but with the bs of 1536
Done on Centos 7.3 very important as clearly based on older guides it was a lot easier and more simpler! Hint do not use grub2-install!
If you have trouble booting after this check this CentOS mdadm RAID booting/fixing guide.
One huge caveat if you are an oldschool user or sysadmin who has avoided UEFIbooting
1.) Replicate the number of partitions in your new drives.
I created 3 partitions of the same same size.
partition #1: +1G (/boot)
partition #2: +60G (swap)
partition #3: rest of it (/)
#note if you are using GPT/gdisk you need to create separate a partition at least 1MB in size (in my case I would a 4th partition and mark it type ef02).........
To disable NCQ in the Linux kernel (change sda to match your device).
echo 1 > /sys/block/sda/device/queue_depth
To enable NCQ (change sda to match your device).
echo 31 > /sys/block/sda/device/queue_depth........
It is possible to tell mdadm to create an md device on a raw disk even though it will give you an error, it writes a superblock and this corrupts the partition table which can result in your system not booting.
To fix it just zero the super-block on the offending device that you made the mistake in.
mdadm --zero-superblock /dev/sda
It is also a way of starting fresh if you wanted to create a new array.........
We've all done this at some point, you work on the wrong shell window and this was my first time making this mistake but I deleted a partition table in fdisk, recreated it and saved it with "wq" and even ran partprobe! If you haven't rebooted yet then you can still recover your partition table, otherwise you're in big trouble.
Fortunately since it was a live system and in use the kernel still had to use the old table like below:........
mv -f /home/user/Downloads/android-studio/ /mnt/sda3/
mv: inter-device move failed: ‘/home/user/Downloads/android-studio/’ to ‘/mnt/sda3/android-studio’; unable to remove target: Is a directory........
grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0xfd
grub> setup (hd0)
But if you do:
it does work, I think hd0/sda had a GPT partition that was not removed properly (what I did was just dd bs=512 count=1 the partition table from another drive since the partition table should be identical).
Checking if "/boot/grub/........
In this example we have 2 drives in a RAID array and /dev/sdb is the one that failed. /dev/sda1 is also the /boot partition which we tell grub to install on /dev/sdb eg install root (hd0,0) /dev/sda1 on the new drive /dev/sdb (hd1)
First copy the partition table from /dev/sda to /dev/sdb
dd if=/dev/sda of=/dev/sdb bs=512 count=1
Run partprobe to detect the new partition table
Iwas surprised to see that Linux Mint at the latest 17.2 version still has NO mdadm installer option, and worse the installer will not be able to create a proper booting environment even when you do install it.
How to setup mdadm in Linux mint LiveCD
apt-get install mdadm
# partition as you need and then create your mdadm devices
# create your SWAP md0
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /d........
if [[ "$templatesource" == *windows* ]]; then
The * before and after * windows will match this "Ihavelotsofwindowshere"
Of we could have used "windows*" and anything that starts with "windows" will be matched etc...........
libguestfs tools howto guide for managing virtual machine images.
libguestfs-tools aka guestfs tools has a lot of tools that make this very easy for you. You can easily mount partitons from an image with some of the commands below.
To mount a partition
#mount the kvmuser102821.img image and the /dev/sda1 partition from it to the local directory "mount"
guestmount -a kvmuser102821.img -m /dev/sda1 mount
drbd 8.3 hard drive failure recovery
drbdadm attach r0
DRBD module version: 8.3.10
userland version: 8.3.8
you should upgrade your drbd tools!
0: Failure: (119) No valid meta-data signature found.
==> Use 'drbdadm create-md res' to initialize meta-data area. ........
#count=10000 makes an image of 10000MB make sure your image is at least the same as your existing
dd if=/dev/zero of=yourimage.img bs=1M count=10000
# losetup -fv newimage.raw
# fdisk -cu /dev/loop0
# kpartx -a /dev/loop0
# dd if= of=/dev/mapper/loop0p1
# e2fsck -f /dev/mapper/loop0p1
# resize2fs /dev/mapper/loop0p1
# a lot of guides tell you to edit /etc/fst........
fdisk unfortunately can't do this and I'm not sure if there's any updated version that handles it but parted can do it.
Here's an example of how to do it:
parted /dev/sda print
1 17.4kB 1024MB 1024MB ntfs primary
2 1024MB 16144MB 15120MB ntfs primary
/dev/sda1 would be the first partiton
/dev/sda2 would be the second partition
You can then just access them like any other normal partition.........
[3805108.257042] sd 0:0:0:0: [sda] 1953525168 512-byte hardware sectors: (1.00 TB/931 GiB)
[3805108.257052] sd 0:0:0:0: [sda] Write Protect is off
[3805108.257054] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[3805108.257066] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[3805108.257083] sd 0:0:0:0: [sda] 1953525168 512-byte hardware sectors: (1.00 TB/931 GiB)
[3805108.257090] sd 0:0:0:0: [sda] Write Protect is off........
mount -o bind /proc /sda2/proc
mount -o bind /dev/ /sda2/dev
mount -o bind /sys /sda2/sys
mint / # mount -o bind /proc /sda2/proc
mint / # mount -o bind /dev/ /sda2/dev
mint / # mount -o bind /sys /sda2/sys
mint / # chroot /sda2
mint / # cd ~
mint ~ # ls
mint ~ # cd /
mint / # ls
bin Desktop dev-temp home&nb........
This was caused by some weird dmraid setup which kind of takes control of drives even if they're blank/unused.
1. Check the table.
ddf1_44656c6c202020201000006010281f0b3f5195b77cf86172: 0 3905945600 linear 8:0 0
ddf1_44656c6c202020201000006010281f0b3f5195b77cf86172p3: 0 37124096 linear 253:0 284547072
ddf1_44656c6c202020201000006010281f0b3f5195b77cf86172p2: 0 283496448 linear 253:0 1050624
This is a great way to upgrade your RAID array or move it/copy it to a new set of hard drives.
Eg. you have a current RAID 1 array on older/slower drives.
Just add at least 1 of the new drives to the array, update grub/install it and then boot into it. Then you have a transparent data migration that is fully synchronized.
mdadm --grow /dev/md126 --raid-devices 3
md127 : active raid1 sdc1........
guestmount -a yourimage.img -m /dev/sda1 --ro /mountpoint
Change "yourimage.img"to the actual disk image.
Change "/dev/sda1" to the device on the disk image you want to mount.
--ro is specified only if you don't want write access (good to ensure you don't mess anything up if you just want to recover data).........
At first it was configured as a RAID 0, then I deleted the Virtual Disk Group.
I thought both drives would be shown and detected in Linux as sda and sdb but it actually shows nothing.
To make them work you have to hit Ctrl+R before the system boots (when prompted) and create a Virtual Disk Group. In my case I created each one as RAID 0 (with a single drive only) as I just wanted JBOD but there is no such option or default in these Dell Pe........
These drives seem to die very easily during shipping:
sd 0:0:0:0: [sda] Unhandled error code
sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
sd 0:0:0:0: [sda] CDB: Read(10): 28 00 18 8b 65 e0 00 00 08 00
end_request: I/O error, dev sda, sector 411788768
sd 0:0:0:0: [sda] Unhandled error code
sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
sd 0:0:0:0: [sda] CDB: Read(10): 28 00 18 8b........
This is just trying to read 5GB off the drive with dd and the drive initially tested ok but shortly after I wondered why I was seeing 2MB/s read speeds. Notice the "current_pending_sector", anytime I've seen it at anything above 0 even with no other bad fields/attributes, it means the drive is bad.
ata1.00: exception Emask 0x0 SAct 0x3 SErr 0x0 action 0x0
ata1.00: irq_stat 0x40000008
ata1.00: failed command: READ FPDMA QUEUED
ata1.00: cmd 60/00:00:........
mdadm --create /dev/md2 --level=1 --raid-devices=2 /dev/sda3 /dev/sdb3
Personalities : [raid1]
md2 : active raid1 sdb3 sda3
1363020736 blocks super 1.2 [2/2] [UU]
[=>...................] resync = 8.3% (113597440/1363020736) finish=276.2min speed=75366K/sec
smartctl -a /dev/sda
smartctl version 5.36 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
Device: ATA WDC WD1600YS-01S Version: 20.0
Serial number: WD-WCAP03024940
Device type: disk
Local Time is: Mon Apr 29 21:40:07 2013 PDT
Device does not support SMART
Error Counter logging not supported........
mdadm --manage /dev/md3 --add /dev/sda1
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md0 : inactive sdd2 sdd1(S)
md3 : active raid1 sda1 sdb1 sdc1(F)
943730240 blocks [2/1] [_U]
Filesystem Size Used Avail Use% Mounted on
50G 1.2G 46G 3% /
tmpfs 7.8G 0&nb........
mdadm --manage /dev/md1 --add /dev/sdb1
mdadm: metadata format 00.90 unknown, ignored.
mdadm: metadata format 00.90 unknown, ignored.
mdadm: metadata format 00.90 unknown, ignored.
mdadm: /dev/sdb1 not large enough to join array
md1's first primary member /dev/sda3 has 57394 cylinders while the /dev/sdb1 has 57393 (1 less cylinder) which is why it won't work.
fdisk -l /dev/sda3
Disk /dev/sda3: 47........
Disk /dev/sda: 320.0 GB, 320072933376 bytes
256 heads, 63 sectors/track, 38761 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 38........
dd if=/dev/sda of=/dev/null creates ever increasing load every second.
After minutes the load has moved up to 4.79
I've tried with two different discs in my system.
I wonder if it's a delay or problem with the SATA bus because one drive I have connected has recently failed.
I notice when drives fail that you get some IO/blocking issue when they don't respond properly.
Yes I believe it was, because here's the same disc after removing the dead........
I had a system running a 128MB live CD image with 2.8 gigs of available RAM and the OOM kernel killer went crazy when using dd for more than 8 minutes and kept killing everything. I've read that this is due to a low-memory issue and paging in the kernel and 32-bit systems with lots of RAM.
I even enabled swapspace on my LiveCD and the issue happened 25 minutes into dd rather than 8 minutes, so what gives?
Also no swap space was ever used!
I like dd, although it only reads it, usually a read test of the entire disk will uncover if your hard drive is bad in some parts. This is a good thing to do at least once a month, a lot of times bizarre program behavior, laginess and crashing/unnmounting problems etc.. are due to a failing disc and SMART won't know it or indicate a problem:
We must also remember there's never a guarantee, I've found that ever since we moved to larger and more platters per drive with 1TB drives........
I had a dying drive that smart thought until it totally disappeared was a good drive, and actually all parameters did look fine but this system was causing my system to lockup and other bad behavior:
=== START OF INFORMATION SECTION ===
Device Model: WDC WD20EARS-00MVWB0
Serial Number: WD-WMAZ20139
Firmware Version: 50.0AB50
User Capacity: 2,000,398,934,016 bytes
This assumes that you've at least created the correct partition for your DRBD already.
Notice that I am "diskless", that's because either your DRBD partition doesn't exist/has been renamed (eg. sdb becomes sda when sdb dies and you reboot) or because that drive is really actually dead/gone.
*If you need to permanently change the partition/device for your resource be sure to edit /etc/drbd.conf on both hosts and reload the config.
(replace r0 with........
smartctl -t long /dev/sda (note you can specify short, but it's not as thorough as long of course).
smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Extended self-test routine immediately in off-line mode".
Drive command "Execute SMART Extended sel........
This happened during a RAID array check:
SMART says both drives pass the test, but I'm doing a long test on them and hopefully this is not a hardware error.
Apr 3 04:22:01 remote kernel: md: syncing RAID array md2
Apr 3 04:22:01 remote kernel: md: minimum _guaranteed_ reconstruction speed: 1000 KB/sec/disc.
Apr 3 04:22:01 remote kernel: md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for reconstruction.
I think this will be useful to others because I have a server that kept crashing mysteriously during intense disk usage/RAID checks. It would only crash during the weekly RAID integrity check.
ThenI noticed during a reboot that not all CPUs were being brought up, as a result this actually creates much higher temperatures with the output I got from sensors, just booting the system produced higher than normal temperatures.
You can imagine that a full blown RAID check........
Jan 16 04:02:03 centosbox syslogd 1.4.1: restart.
Jan 16 04:07:34 centosbox kernel: INFO: task updatedb:20771 blocked for more than 300 seconds.
Jan 16 04:07:34 centosbox kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Jan 16 04:07:34 centosbox kernel: updatedb D F78BE050 6476 20771 20766&n........
This doesn't seem to be widely known (maybe it's in some documentation that none of us read though)but there's an easy way to check the integrity of any mdadm array:
sudo echo check > /sys/block/md0/md/sync_action
-bash: /sys/block/md0/md/sync_action: Permission denied
sudo will never work, this only works as root since echo is not actually a binary/command. It is built-into bash.
This really made me nervous but notice the mdstat says "check". This is because in Ubuntu there is a scheduled mdadm cronscript that runs everyday on Sunday at 00:57 that checks your entire array. This is a good way because it prevents gradual but unnoticed data corruption which Inever thought of.
As long as the check completes properly you have peace of mind knowing that your data integretiy is assured and that your hard drives are functioning properly (I'........
There's no partial WD EARS alignment fix:
I had data on /dev/sda3 and /dev/sdb3 (RAID1) so I couldn't edit that one.
I thought I'd be smart and try fixing the first two partitions so I set the first one starting at sector 2048 and then +8 for the second partition.
This has really slowed the performance down worse than it ever was!
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, tot........
Go into the directory for your Virtual Machine and delete all ".lck" directories.
rm -rf *.lck
After that your server should boot.........
hdparm -B 255 /dev/sdb
setting Advanced Power Management level to disabled
HDIO_DRIVE_CMD failed: Input/output error
The one thing you can do though is to set hdparm spindown time lower (it doesn't seem to work that well).
-S set standby (spindown) timeout
hdparm -S 251 /dev/sda
I separated the 2 drives in the RAID 1 array.
1 is the old one /dev/sda and is out of date, while the separated other one /dev/sdc was in another drive and mounted and used with more data (updated).
I wonder how mdadm will handle this:
usb-storage: device scan complete
md: md127 stopped.
md: md127: raid array is not clean -- starting background reconstruction
raid1: raid set md127 active with 1 out of 2 m........
Moving to RAID was a pain.
What you have to do is the following from an existing install:
Create your mdadm RAID 1 array on your spare hard drive.
Start it with the missing disk.
rsync the entire contents of your current / to the md partition.
Here's a good way of doing it:
rsync -Pha --exclude=/proc/* --exclude=/sys/* --exclude=/mnt/* /. /mnt/md2........
had trouble trying to revert Ubuntu 10.04 LTS from grub2, won't boot mdraid and did not even install mdadm during the installation!
I have tried moving back to GRUB 0.97
backed up original /boot and then copied /boot from an old Debian install. Modified device.map and menu.lst and put the appropriate kernels and initrd for Ubuntu back in /boot
I ran grub:
grub> setup (hd0)
Checking if "/boot/grub/stage1........
Create New RAID 1 Array:
First setup your partitions (make sure they are exactly the same size)
In my example I have sda3 and sdb3 which are 500GB in size.
mdadm --create /dev/md2 --level=1 --raid-devices=2 /dev/sda3 /dev/sdb3
mdadm: array /dev/md2 started.
Check Status Of The Array
*Note I already have other arrays md0 and md1.
You can see below that md2 is syn........
smartctl -a -d ata -T permissive --smart=on /dev/sda
-d ata is usually required for most SATA drives or you get an error.
-T permissive is required if it's the first time you are running SMART on this device (it's not enough just to enable SMART in the BIOS)
--smart=on is also required for the first time........
md: Autodetecting RAID arrays.
md: autorun ...
md: considering sdb1 ...
md: adding sdb1 ...
md: adding sda1 ...
md: created md0
md: kicking non-fresh sda1 from array!
raid1: raid set md0 active with 1 out of 2 mirrors
The md0 raid kicked sda1 ou........
[27969.398749] sd 5:0:0:0: [sdb] 3907029168 512-byte hardware sectors (2000399 MB)
[27969.398749] sd 5:0:0:0: [sdb] Write Protect is off
[27969.398749] sd 5:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[27969.398749] sd 5:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[27972.117543] ata6.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x0
[27972.117543] ata6.00: irq_stat 0x48000000
[27972.117543] ata6.00: cmd 60/08:00:ff:7........
If you have the "(auto-read-only)" beside an arrayI have no idea why that happens but it is easy to fix.
Just run "mdadm --readwrite /dev/md1" (rename md0 to the device with the problem and it will begin to resync.
md1 : active (auto-read-only) raid1 sdb2 sda2
19534976 blocks [2/2] [UU]
I found this article interesting, it basically says that with 2TB hard drives or larger sizes, you are more likely to encounter an unrecoverable read error. But is this just another Y2K doomsday? Don't HDD's have enough advanced hardware ECC error and read recovery to prevent this from happening?
I'm almost tempted to build a 3 x........
I was creating a RAID array and got this error: mdadm: /dev/sda1 is too small: 0K
mdadm: create aborted
Of course sda1 is not too small, both partitions sda1 and sdb1 are identical in size:
Disk /dev/sda: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Device Boot Sta........
Why would you want to downgrade the superblock? Old mdadm verisons like mdadm 2.5.6 only use the 0.90 superblock/metadata and new versions use 1,1.0,1.1 and 1.2 superblocks by default.
There are some annoying caveats with this, first of all the new superblocks (later than 0.90) CANNOT be read by GRUB, so you won't even be able to install GRUB. Even worse, old versions of mdadm CANNOT automatically detect arrays even if they were created with a new version of mdadm with th........
Which one does the OS care about? blkid says the UUID is "787f1fa4-b010-4d77-a010-795b42884f56" while md insists its UUID is "4d96dd3b:deb5d555:7adb93cb:ce9182d9"
When in doubt, do we assume the OS takes the one from blkid?
/dev/md0: UUID="787f1fa4-b010-4d77-a010-795b42884f56" TYPE="ext3"
[root@localhost ~]# mdadm -D /dev/md0
Version : 0.90
I have an md0 arary that my Centos install refers to. I feel this is half the reason why it won't boot anymore.
I saw the initrd for Centos was assembling it as md127 even though it was known as md0.
The reason for this is because I used mdadm --assemble --scan to detect the array on a LiveCD. I had no idea this name would stick (but now I realize the name is permanently stored in the metadata once you mount md127 or whatever random name assemble gives it). W........
I successfully created a single RAID 1 partition which includes /boot inside it and my root directory through the Debian installer. It said GRUB installed successfully but when I try booting the OS it seems GRUB can't read anything.
When trying to boot from GRUB
GRUB Loading stage 1.5.
GRUB loading, please wait...
I get "Error 2" when trying to boot Debian. I also notice from a LiveCD that........
I installed 5.5 with a 300GB RAID 1 partition (boot is also on this partition). It booted up fine the first few times until after I used a Live CD and accessed the array, and it became named /dev/md127 for some reason.
Now whenI boot into CentOS I get a kernel panic and different errors, once I got "invalid superblock", even though the array is fine (it didn't happen again, probably because I was sure to dismount and stop the mdadm array properly).
This was unbelievable how much the Xen kernel slows things down, keep in mind both tests were done on the hostnode, one was with the Openvz-Xen hybrid kernel and the other was just OpenVZ. You can see the performance difference is nearly 300% better when not using the Xen kernel.
OpenVZ-Xen Kernel Test Results (I was wondering what was wrong/so slow with my Core i5!)
# # # # # #&n........
It's not just as simple as running the chroot command, you need to ensure the /proc and /dev entries are passed through and populated to the chroot environment.
Step 1 - Mount Your Off-lineOS
mount /dev/sda1 /mnt
Step 2 - Mount Proc
mount -t proc none /mnt/proc
Step 3 - Mount Dev
Most guides will tell you to use this: mount -o bind /dev /mnt//dev but that doesn't work for some reason in many cases:
mdadm --assemble --scan
mdadm: /dev/md/diaghost05102010:2 has been started with 2 drives.
mdadm: /dev/md/diaghost05102010:1 has been started with 2 drives.
mdadm: /dev/md/diaghost05102010:0 has been started with 2 drives.
-bash-3.1# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid6] [raid5] [raid4] [multipath]
md125 : active raid1 sda1 sdb1
14658185 blocks super 1.2........
Seagate Inventory/Firmware Check
I heard about this issue a long time ago but never looked into it. I figured I wasn't affected since my 500GB drives were running for so long. I've been using Seagate's since 2002 and to this day all of the drives I have are alive from Seagate.
*Update the bad news is that I realize one of my 500GB's is about to die, it's not even a year old, but is also not affected by the recall according to Seagate!
Before we start I take no responsibility for this, you should have a backup and if you make a mistake during this process you could wipe out all of your data. So backup somewhere else before starting this as a precaution, or make sure it's data you could afford to lose.
The RAID 1 Setup (Hardware Wise)
I've already setup my 2 x 1TB (Seagate) drives with identical partitions, make sure your new hard drive (the empty one) is setup like your curr........
The binary "iostat" comes from the package "sysstat" and is available on all Linux/Unix like platforms.
Use the "-m" option to give you what you probably want, which is to see in MB/s how much bandwidth each disk is doing.
Linux 188.8.131.52 ((none)) 04/16/10
avg-cpu: %user %nice %system %iowait %steal %idle
I have no idea why but mkfs.ext3 defaults to a patheticlly small blocksize of 1024 bytes/1KB (kilobyte). That means the maximum filesize is ONLY 16GB! With 2KB/2048 bytes you get a 256 GB maximum filesize, and with 4KB/4096 bytes you get 2TB!
I finally noticed/paid attention to this after realizing that with rsync and scp that no file larger than 17GB could be transferred. I then realized it must be a file size limit on the partition.
Here is what tune2fs tol........
./ntfs-3g /dev/sda1 /mnt -o force
Unexpected sectors per cluster value (127).
Failed to mount '/dev/sda1': Invalid argument
The device '/dev/sda1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
This is happening on a system I've come across an HP 6930P running Windows XP Professional. The partition appears to be very norm........
Intel's Finnish FetishIntel's Finnish Fetish
By Dave Mock
June 13, 2005
Chipmaker Intel (NASDAQ: INTC) has successfully topped the personal computer market for decades. Breaking into related areas such as communications has been much difficult for the world's largest semiconductor maker. But a new partnership with Nokia (NYSE: NOK) could help to change that.
Intel's forays into cellular-phone and home-entertaiment-device chips have........
top - 09:34:12 up 2 days, 20:57, 2 users, load average: 1.83, 1.99, 2.03
Tasks: 59 total, 2 running, 57 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.3%us, 0.0%sy, 0.0%ni, 0.0%id, 99.7%wa, 0.0%hi, 0.0%si, 0.0%st
That 99.7% wa is iowait, it means the server is waiting for a process to complete an IOoperation or in plain English, there is a delay in........
When trying to even cd or ls the mounted OCFS2 partition it crashes. Ithink this is a combination of VMWare Server's problem and the way I mounted and symlinked to it.
More than anything this shows the problem and lack of forsight with VMWare, but also that OCFS2 is easily crashed if you do strange things.
Output of /var/log/messages for OCFS2
Apr 10 15:57:45 localhost kernel: [84331.691258] Modules linked in: vmnet vmci vmmon ocfs2_stac........
There's a lot of information and guides on OCFS2 for RHELand Centos Linux but the package setup and configuration is slightly different and this has thrown some people off.
You should install the following packages to get started:
apt-get install ocfs2-tools ocfs2console
In RHEL/Centos the main configuration file is located in /etc/sysconfig/o2cb
However in Debian based Linux it is located........