레이블이 mdadm인 게시물을 표시합니다. 모든 게시물 표시
레이블이 mdadm인 게시물을 표시합니다. 모든 게시물 표시

2016년 7월 6일 수요일

Apache Issues of upgrading Ubuntu Server 12.04 LTS to 14.04 LTS

After '# do-release-upgrade' from Ubuntu Server 12.04 LTS to 14.04 LTS

On the dialog of grub setting, I just typed Enter with the default selection of hdd choice.

And, it failed to boot after the dist upgrade and went into its rescue mode.


I googled but couldn't find an exact same case, but it's... grub. Yes, GRUB. ... 2 actually.

I have RAID0 (mirroring) arrayed by mdadm with two of 500GB WD hard drives. So I did it with sdb too.

$ sudo grub-install /dev/sda
$ sudo grub-install /dev/sdb
$ sudo update-grub 

Reboot, and problem solved.


Apache2 couldn't run itself after the upgrade.

    $ sudo service apache2 status

So it was not running.

    $ sudo service apache2 start


It showed me some error msg about the reason, but definitely it's caused by the upgrade. Yes, I chose 'Keep current settings' when the new apache2 installation process asked me what to do.

    $ cd /etc/apache2
    $ mv apache2.conf apache2.conf.old

apache2.conf is my old setting and wasn't compatible perfectly to run new apache2. Of course there was a kind skeleton file for that, 'apache2.conf.dpkg-dist'.

    $ mv apache2.conf.dpkg-dist apache2.conf
    $ sudo vi apache2.conf

I added a line for phpmyadmin, one more for the ServerName at the end of the conf file.

    Include /etc/phpmyadmin/apache.conf
    ServerName www.mywebsite.com

When I started apache2 service again, it worked the same as before.




2015년 4월 12일 일요일

Recovery of degraded arrays of RAID1 (레이드1에서 동기화 어긋난 하드 디스크 복구)

우분투 12 Saucy. RAID1으로 미러링 중인 두 하드 중 하나가 고장 나거나, 동기화가 어긋난 경우(degraded) 아래와 같이 해당 파티션을 제거 했다가 다시 추가하면 mdadm이 동기화를 다시 시켜서 복구함.

In Ubuntu 12 Saucy, with mirrored two hard drives, /dev/sda and /dev/sdb, which are partitioned as three volumes, 1, 2, and 3, sda's partitions are degraded by some unknown reason. This happens regularly to me around once every other year with two identical WD 500GB hard drives.

To sync the degraded array back, you simply detach (remove) the partition and attach (add) it again like the followings:

Remove the unsynced hard drive
$ sudo mdadm --remove /dev/md0 /dev/sda1
$ sudo mdadm --remove /dev/md1 /dev/sda2
$ sudo mdadm --remove /dev/md2 /dev/sda3

(You may not need to remove the hard drive, because if it has been long since it's degraded, mdadm removes the hard drive by itself.)

Add them again into the array (to run the sync process again)
$ sudo mdadm --add /dev/md0 /dev/sda1
$ sudo mdadm --add /dev/md1 /dev/sda2
$ sudo mdadm --add /dev/md2 /dev/sda3

Then mdadm synchronizes the partitions of the hard drive one by one with its mirrored one. It takes for a while up to the size of the hard drive.


우분투 12 Saucy. RAID1으로 미러링 중인 두 하드 중 하나가 고장 나거나, 동기화가 어긋난 경우(degraded) 위와 같이 해당 파티션을 제거 했다가 다시 추가하면 mdadm이 동기화를 다시 시켜서 복구함.


Xubuntu: Installing a Printer (Canon G3060 PIXMA)

$ sudo apt install system-config-printer Download the proper driver for linux from Canon website. Turn on the printer and set up its WiFi. C...