nareshovの日記

(TL note: nareshov's diary)

Posts Tagged ‘debian

On resizing filesystems and LVM2 logical volumes

leave a comment »

I’ve been using Debian squeeze/sid for a while now (with apt-pinning) and for the past few days I’ve been facing the “no space left to write” problem. I used the default LVM2-based disk partitioning scheme offered by the Debian installer. I thought it was okay to have a 6.5G root partition and the rest for the swap and my home partitions. Looks like 6.5G wasn’t enough for me. And the root and home partitions used the ext4(!) file-systems.

Now, here’s how you go about reducing your home’s size and increasing your root’s size.

  1. Reduce the filesystem size of the partition which has enough free space to spare using resize2fs.
  2. Then reduce the logical volume in which this filesystem resides using lvreduce.
  3. Now extend the logical volume in which the “starving” filesystem resides  using lvextend by the same amount you used in step 2.
  4. Then simply issue resize2fs /dev/VGNAME/LVNAME which should simply fill up the unallocated space in the logical volume it resides.
  5. (optional), if your reduced filesystem doesn’t mount due to a block-size mismatch, e2fsck it and apply step 4. to it.

Glad that it all worked out fine. I didn’t have to use a live cd to do this (was too lazy for that anyway). I dropped into a vt, unmounted my home (which has the “important” data) and performed steps 1 and 2 on it. My root was still mounted while I did steps 3 and 4 on it.

Written by Naresh

November 13, 2009 at 12:41 pm

Posted in Linux/BSD

Tagged with , , , , ,

Playing with LISP on Debian Squeeze

with 2 comments

I haven’t looked up at how you play with LISP using Vim. Not really interested either since I’m committed to Emacs *rolls eyes*.
So, assuming you’ve already done aptitude install emacs23, Let’s go ahead and aptitude install sbcl cl-asdf slime. When in doubt aptitude show sbcl or aptitude show cl-asdf.

My motivation for this post in the first place was to document the quirks with the installation I was facing last night. If you happen to notice the following with the above aptitude install:

Setting up cl-asdf (1:20090819-3) ...
Reinstalling for sbcl
Recompiling Common Lisp Controller for sbcl
/usr/lib/common-lisp/bin/sbcl.sh loading and dumping clc.
; loading system definition from /usr/lib/sbcl/sb-grovel/sb-grovel.asd into
; #
; registering # as SB-GROVEL
;
; compilation unit aborted
; caught 1 fatal ERROR condition

Error running init-common-lisp-controller-v4: Lock on package SB-IMPL violated
when interning NATIVE-FILE-KIND.
See also:
The SBCL Manual, Node "Package Locks"
mv: cannot stat `sbcl-new.core': No such file or directory
FAILED

Done rebuilding
Setting up cl-swank (1:20090908-1) ...
Setting up emacs (23.1+1-4) ...
Setting up sbcl (1:1.0.25.0-1) ...
/usr/lib/common-lisp/bin/sbcl.sh loading and dumping clc.
; loading system definition from /usr/lib/sbcl/sb-grovel/sb-grovel.asd into
; #
; registering # as SB-GROVEL
;
; compilation unit aborted
; caught 1 fatal ERROR condition

Error running init-common-lisp-controller-v4: Lock on package SB-IMPL violated
when interning NATIVE-FILE-KIND.
See also:
The SBCL Manual, Node "Package Locks"
mv: cannot stat `sbcl-new.core': No such file or directory
FAILED

Your slime setup isn’t going to be functional. Fret not. Read on.

From Debian BTS bug #549528

=======BEGIN PATCH===================
--- /usr/share/common-lisp/source/common-lisp-controller/post-sysdef-install.lisp.orig 2009-10-21 14:42:00.000000000 -0400
+++ /usr/share/common-lisp/source/common-lisp-controller/post-sysdef-install.lisp 2009-10-21 14:40:59.000000000 -0400
@@ -61,7 +61,7 @@
#+sbcl
(defun get-owner-and-mode (directory)
(when (eq :directory
- (sb-impl::native-file-kind (namestring directory)))
+ (sb-impl::unix-file-kind (namestring directory)))
;; check who owns it
(multiple-value-bind (res dev ino mode nlink uid gid rdev size atime mtime)
(sb-unix:unix-stat (namestring directory))
=======END PATCH=================

Followed by,

dpkg-reconfigure cl-asdf
dpkg-reconfigure sbcl

Append the following to your .emacs, if you haven’t already.
;; Slime
(add-to-list 'load-path "/usr/share/common-list/source/slime/")
(setq inferior-lisp-program "/usr/bin/sbcl")
(require 'slime)
(slime-setup)

And your Emacs is ready to roll.

Written by Naresh

November 8, 2009 at 10:57 pm

Posted in Emacs, Linux/BSD, Software

Tagged with , , , , , ,

Updates as of 25th Feb., ’09

with 3 comments

Hello. I’ve got some fresh news here – http://timesofindia.indiatimes.com/India/Bloggers-can-be-nailed-for-views/articleshow/4178823.cms

Getting back to the post, a lot of things, as usual, have happened in the past couple of months. FOSSKriti- IITK’s FOSS event during Techkriti was once again organised this year and turned out pretty well. Here‘s a longer account.

More interesting updates in the campus include the introduction of a modern internet service in the campus. I can now stop looking for alternatives to necessary applications with HTTP(connect) proxy support. Our campus can now boast of a 1GBps internet connection (the whole country’s bandwidth is apparently 33GBps). Back then (four years ago), we started off with a measly 2MBps connection which went higher and higher up with time – eventually leading us all to this pleasant surprise. Well, pleasant or not is another day’s debate… approx 4.5 crores p.a. for such bandwidth (turns out to about 1lac per day!).

OS update: Used Windows Vista for more than a semester, then Windows 7 Beta for about a couple of weeks or more. Now on Debian 5.

Music update: check my last.fm page.

Written by Naresh

February 25, 2009 at 5:37 pm