Setting up a Linux home server based on a low cost and low power hardware (Pc Engines Alix) – External USB disk mounted at boot – Part3

The Compact Flash we created is used only for the operating system and the binaries of the applications, we need some space for saving our data.

Most of PC Engines boards, like the Alix 2D2 we are using, have 2 USB 2.0 ports, perfect for managing an external USB disk!

If available a 2.5 inch external disk (for example an used notebook disk with an external case) is preferable because it’s lower power hungry and noisy respect a 3.5 disk.

This new post will describe how to format and mount an external USB disk at each boot to make available all the space we need for our data.

First of all, let’s power on our disk and plug it into a free USB port.
Now we need to identify the special device assigned to the new disk, partition and format: follow instructions in the first part of this howto.

Please remember that you want to work on the newly added USB disk, and not on the CF (hda1)
Fdisk will permanently delete all data contained in the disk, please pay attention.

Once the partition is created you can format it with ext3 filesystem with the following command:

homeserver:~# mkfs.ext3 /dev/sda1

We will use this new ext3 partition to store all downloaded and personal data.
We need a script to mount the disk at each boot of the operating system.
Let’s create a file mount_usb.sh in the directory /etc/init.d:

homeserver:~# touch /etc/init.d/mount_usb.sh

Edit it with "nano" and add the following content:

#! /bin/sh
mount -o defaults /dev/sda1 /data

We need to make this file executable and create the mount point

homeserver:~# chmod 755 /etc/init.d/mount_usb.sh
homeserver:~# mkdir /data

We can now try the script and see if the disk is correctly mounted with the command “df”:

homeserver:~# /etc/init.d/mount_usb.sh
homeserver:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 3.7G 337M 3.2G 10% /
tmpfs 125M 0 125M 0% /lib/init/rw
udev 10M 24K 10M 1% /dev
tmpfs 125M 4.0K 125M 1% /dev/shm
tmpfs 125M 0 125M 0% /tmp
tmpfs 125M 0 125M 0% /var/tmp
tmpfs 125M 24K 125M 1% /var/run
tmpfs 125M 100K 125M 1% /var/log
tmpfs 125M 0 125M 0% /var/lock
/dev/sda1 29G 173M 27G 1% /data

Everything is working correctly, we can now configure the automatic execution of this scripts at each boot.

homeserver:~# update-rc.d -f mount_usb.sh start 89 2 3 4 5 .

Now the mount_usb script is executed at boot time at each runlevel (remember the dot at the end of the command!).
But we also need to unmount the external disk when the system is powered off

Create a file umount_usb.sh always in the directory /etc/init.d:

homeserver:~# touch /etc/init.d/umount_usb.sh
homeserver:~# chmod 755 /etc/init.d/umount_usb.sh

edit it with nano and add the following content:

#! /bin/sh
umount /dev/sda1

Now we need to configure the execution the the umount_usb.sh script when the system powers off.

homeserver:~# update-rc.d -f umount_usb.sh stop 89 0 1 6 .

Now we have a lot of free space for our needs!

Tags: , , , , , , , , , ,

Tuesday, August 18th, 2009 Debian Lenny, Home server, Linux, Voyage Linux

62 Comments to Setting up a Linux home server based on a low cost and low power hardware (Pc Engines Alix) – External USB disk mounted at boot – Part3

  1. Search music now US Charts…

  2. gerard on September 16th, 2011
  3. Download@pop.Rock” rel=”nofollow”>…

    Search rock US Charts…

  4. greg on September 22nd, 2011
  5. sleep aids and half-life

    Buy_it now…

  6. JEFFERY on October 17th, 2011
  7. warfarin zoloft

    Buy_drugs without prescription…

  8. STEPHEN on October 17th, 2011
  9. do cats carry ringworm

    Buy_generic meds…

  10. CHARLIE on October 17th, 2011
  11. PATRICK on October 17th, 2011
  12. mike divorce cancer tiffany

    Buy_generic pills…

  13. ALFREDO on October 17th, 2011
  14. adhd drugs causing hallucinations

    Buy_generic meds…

  15. MARION on October 18th, 2011
  16. boulder valley asthma and allergy clinic

    Buy_no prescription…

  17. PETER on October 19th, 2011
  18. soft food diet ideas

    Buy_drugs without prescription…

  19. ROGER on October 19th, 2011
  20. number of obese in this generation

    Buy_generic meds…

  21. RONNIE on October 20th, 2011
  22. aspirin pain relief dog

    Buy_drugs without prescription…

  23. GREG on October 20th, 2011
  24. ALEXANDER on October 21st, 2011
  25. tuna during pregnancy

    Buy_generic meds…

  26. MILTON on October 21st, 2011
  27. red wine and lipitor

    Buy_no prescription…

  28. JEFFERY on October 25th, 2011
  29. gestational surrogacy

    Buy_now…

  30. KEVIN on October 25th, 2011
  31. combination food diet

    Buy_drugs without prescription…

  32. FREDDIE on October 25th, 2011
  33. ALLEN on October 26th, 2011
  34. follistim increase estradiol levels

    Buy_generic drugs…

  35. MILTON on October 26th, 2011
  36. faye sick lung cancer

    Buy_drugs without prescription…

  37. WADE on October 26th, 2011
  38. serotonin natural sources

    Buy_generic meds…

  39. ANDRE on October 26th, 2011
  40. effexor xr 75

    Buy_generic pills…

  41. JAY on October 27th, 2011
  42. genital erection

    Buy_now it…

  43. ADAM on October 27th, 2011
  44. low fat diets history

    Buy_drugs without prescription…

  45. DENNIS on October 27th, 2011
  46. nursing drug study website

    Buy_drugs without prescription…

  47. DERRICK on October 27th, 2011
  48. swollen ankles headache pregnancy

    Buy_generic drugs…

  49. HARRY on October 29th, 2011
  50. hives rash from coming off prednisone

    Buy_generic drugs…

  51. JULIO on October 29th, 2011
  52. BILL on November 1st, 2011
  53. stop smoking phlegm

    Buy_drugs without prescription…

  54. KYLE on November 1st, 2011
  55. zocor and ms

    Buy_it now…

  56. STEVE on November 1st, 2011
  57. adderall then tylenol pm

    Buy_generic drugs…

  58. CASEY on November 1st, 2011
  59. abdominal pain lutenizing hormone

    Buy_generic drugs…

  60. NEIL on November 2nd, 2011
  61. questions about ortho tri cyclen

    Buy_generic drugs…

  62. AUSTIN on November 2nd, 2011
  63. ic tramadol hcl 50 mg

    Buy_generic meds…

  64. SHAWN on November 2nd, 2011
  65. KENT on November 2nd, 2011
  66. what foods anorexia eat

    Buy_drugs without prescription…

  67. BYRON on November 3rd, 2011
  68. hot dog hospital diet substitutions

    Buy_generic drugs…

  69. NATHAN on November 4th, 2011
  70. canine medi cam rx

    Buy_generic drugs…

  71. DONALD on November 5th, 2011
  72. nexium pepsin ac

    Buy_generic drugs…

  73. CLIFTON on November 5th, 2011
  74. LEE on November 7th, 2011
  75. will the recession become a depression

    Buy_without prescription…

  76. MICHAEL on November 7th, 2011
  77. teen girl 16 18.6 bmi

    Buy_generic drugs…

  78. JEREMIAH on November 7th, 2011
  79. social interaction anxiety

    Buy_without prescription…

  80. TERRY on November 8th, 2011
  81. at home diet programs

    Buy_generic pills…

  82. RANDY on November 9th, 2011
  83. synephrine hcl diet pills

    Buy_generic pills…

  84. NATHAN on November 9th, 2011
  85. psychotic depression and philadelphia

    Buy_generic meds…

  86. PATRICK on November 9th, 2011
  87. ARTURO on November 9th, 2011
  88. terry abbot

    Buy_generic drugs…

  89. FRED on November 10th, 2011
  90. menopause thyroid cancer

    Buy_without prescription…

  91. TERRENCE on November 11th, 2011
  92. IAN on November 12th, 2011
  93. foods with triglycerides in them

    Buy_generic drugs…

  94. MARION on November 12th, 2011
  95. macon georgia drug court

    Buy_without prescription…

  96. ARTURO on November 13th, 2011
  97. flat warts and probiotics

    Buy_generic drugs…

  98. DAN on November 15th, 2011
  99. medicare drugs covered

    Buy_generic meds…

  100. ENRIQUE on November 16th, 2011
  101. VIRGIL on November 16th, 2011
  102. lexapro versus prozac differences

    Buy_without prescription…

  103. ALFRED on November 16th, 2011
  104. sample ncp for diabetes

    Buy_without prescription…

  105. SHANE on November 17th, 2011
  106. TRACY on November 17th, 2011
  107. Download@pop.Rock” rel=”nofollow”>.

    Buy rock US Charts…

  108. jordan on December 8th, 2011
  109. canadian@pharmacy.valtrex” rel=”nofollow”>…

    Buygeneric meds…

  110. JOHN on December 9th, 2011
  111. dr@azor.milwaukee” rel=”nofollow”>..

    Buyno prescription…

  112. GREGORY on December 10th, 2011
  113. indications@for.use.of.atrovent” rel=”nofollow”>…

    Buygeneric meds…

  114. BRETT on December 10th, 2011

Leave a comment

 

Categories

AskoziaPBX

Create your full features PBX IP with voicemail and Automated Attendant with alix2d3 or alix2d2 system board.

You can find the PBX IP preconfigured image here:


And obtain all support information "how to" here: