[{"data":1,"prerenderedAt":397},["ShallowReactive",2],{"Categories":3,"NavIndexCategoriesCountFooter":203,"content-\u002F2005\u002F08\u002F03\u002Frecovering-box-after-powercut\u002F":204},[4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,68,70,71,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202],{"category":5},"System Administration",{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},"Software Development",{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":27},{"category":27},{"category":67},"Drones & RC",{"category":69},"DIY Projects",{"category":67},{"category":72},"Photography",{"category":69},{"category":69},{"category":69},{"category":67},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":67},{"category":69},{"category":69},{"category":67},{"category":67},{"category":72},{"category":72},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":5},{"category":5},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":5},{"category":67},{"category":67},{"category":72},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":72},{"category":67},{"category":138},"3D Printing - Laser Cutting - CNC",{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":5},{"category":138},{"category":27},{"category":27},{"category":138},{"category":138},{"category":72},{"category":158},"Photography,3D Printing - Laser Cutting - CNC",{"category":27},{"category":27},{"category":69},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":67},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":27},{"category":69},{"category":27},{"category":27},{"category":27},{"category":27},{"category":181},"Home Assistant",{"category":181},{"category":72},{"category":27},{"category":27},{"category":72},{"category":138},{"category":5},{"category":72},{"category":72},{"category":138},{"category":27},{"category":181},{"category":181},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},191,{"id":205,"title":206,"body":207,"category":5,"date":384,"description":213,"embedImage":385,"extension":386,"image":385,"intro":385,"meta":387,"navigation":388,"path":389,"seo":390,"series":385,"sitemap":391,"stem":392,"tags":393,"__hash__":396},"content\u002F2005\u002F08\u002F03\u002Frecovering-box-after-powercut.md","Recovering box after powercut",{"type":208,"value":209,"toc":382},"minimark",[210,214,217,220,270,273,276,310,313,316,319,346,349,352,355,358,361,375,378],[211,212,213],"p",{},"Had a powercut over most of Oslo. When this box came up the partition table on \u002Fdev\u002Fhdb was totally gone.",[211,215,216],{},"Now - this is not good since most of the partitions on the box are lvm2 partitions using physical volumes on both hda and hdb.",[211,218,219],{},"First thing to try was to look in \u002Fetc\u002Flvm\u002Farchive for the latest vol group descriptor. This stated that the lvm partition was installed on \u002Fdev\u002Fhdb (note - no idea how I managed that - or why). Nothing would work using hdb sadly so a new partition hdb1 of type lvm was added spanning the whole disk. pvdisplay stated that it couldn't find a device with a given UUID. Some googling led to the following:",[221,222,227],"pre",{"className":223,"code":224,"language":225,"meta":226,"style":226},"language-shell shiki shiki-themes github-dark","pvcreate --restorefile \u002Fetc\u002Flvm\u002Farchive\u002Ffile --uuid \u003Cuuid>\u003C\u002Fuuid>\n","shell","",[228,229,230],"code",{"__ignoreMap":226},[231,232,235,239,243,247,250,254,257,261,264,267],"span",{"class":233,"line":234},"line",1,[231,236,238],{"class":237},"svObZ","pvcreate",[231,240,242],{"class":241},"sDLfK"," --restorefile",[231,244,246],{"class":245},"sU2Wk"," \u002Fetc\u002Flvm\u002Farchive\u002Ffile",[231,248,249],{"class":241}," --uuid",[231,251,253],{"class":252},"snl16"," \u003C",[231,255,256],{"class":245},"uui",[231,258,260],{"class":259},"s95oV","d>\u003C",[231,262,263],{"class":245},"\u002Fuui",[231,265,266],{"class":259},"d",[231,268,269],{"class":252},">\n",[211,271,272],{},"Now I could mount the missing partitions - but \u002Ftmp and \u002Fusr were damaged (probably due to the difference in using hdb vs hdb1).",[211,274,275],{},"So - most user data was on the backup tape - though not all (box was newly set up and not all backup was yet configured). Managed to extract the following:",[277,278,279,283,286,289,292,295,298,301,304,307],"ul",{},[280,281,282],"li",{},"\u002Fetc",[280,284,285],{},"\u002Fusr\u002Flocal (own partition)",[280,287,288],{},"\u002Fweb (also on tape)",[280,290,291],{},"\u002Frepository (also on tape)",[280,293,294],{},"\u002Fhome",[280,296,297],{},"\u002Fvar\u002Flib\u002Fmailman",[280,299,300],{},"\u002Fvar\u002Flib\u002Fawstats",[280,302,303],{},"\u002Fvar\u002Flib\u002Fmunin",[280,305,306],{},"\u002Fvar\u002Flib\u002Fldap",[280,308,309],{},"\u002Fvar\u002Flib\u002Fmysql",[211,311,312],{},"Took also a copy of the output of df -h, apt's sources.list and dpkg --get-selections.",[211,314,315],{},"Reinstalled using the latest sarge net install - set up lvm etc as before (this time on hdb1)",[211,317,318],{},"After a reinstall with as minimal a set of packages possible - ran",[221,320,322],{"className":223,"code":321,"language":225,"meta":226,"style":226},"dpkg --get-selections \u003C selectionsfile\napt-get dselect-upgrade\n",[228,323,324,337],{"__ignoreMap":226},[231,325,326,329,332,334],{"class":233,"line":234},[231,327,328],{"class":237},"dpkg",[231,330,331],{"class":241}," --get-selections",[231,333,253],{"class":252},[231,335,336],{"class":245}," selectionsfile\n",[231,338,340,343],{"class":233,"line":339},2,[231,341,342],{"class":237},"apt-get",[231,344,345],{"class":245}," dselect-upgrade\n",[211,347,348],{},"Now the install set matched.",[211,350,351],{},"Copied out from the old \u002Fetc config for exim4, apache2, greylistd, slapd, any cron files that differed, nagios, munin, mrtg. Re-ran make-jpkg - and restarted jboss.",[211,353,354],{},"Things forgotten:",[211,356,357],{},"As far as I can see - only the SSL self-generated certificates at the moment.",[211,359,360],{},"Things to do:",[277,362,363,366,369,372],{},[280,364,365],{},"Generate SSL certs",[280,367,368],{},"Bring https site back up",[280,370,371],{},"Find out why spamassassin bayesian autolearn is failing (90% sure it's a permissions problem)",[280,373,374],{},"Re-add the svnserve wrapper (from the svn book - sets umask)",[211,376,377],{},"Note - ALL partitions are now configured to go on tape :)",[379,380,381],"style",{},"html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":226,"searchDepth":339,"depth":339,"links":383},[],"2005-08-03 07:28:16 +0200",null,"md",{},true,"\u002F2005\u002F08\u002F03\u002Frecovering-box-after-powercut",{"title":206,"description":213},{"loc":389},"2005\u002F08\u002F03\u002Frecovering-box-after-powercut",[394,395],"debian","lvm2","m2vDgt6BIUKFe6aBJuvVOgvpH9CSbZFbajhe6BK1Gps",1775293016938]