You are not logged in.

#1 2012-11-22 04:32:32

XaverOz
Member
Registered: 2012-02-24
Posts: 18

USB installation

I want to create usb  disk with Arch wich do next thing:
On start system it start my python2 programm which works with shelve, serial port, socket and threading.
I use archlinux-2011.08.19-core-i686.iso
I read next articles:
https://wiki.archlinux.org/index.php/SSD#Mount_Flags
https://wiki.archlinux.org/index.php/In … _a_USB_key
https://wiki.archlinux.org/index.php/Initscripts
I create USB flash with ext4 fs, for root directory. Disable swap. Add noatime flag to my flash disk mount option. I dont use discard flag and some other options which add TRIM support because i never read what TRIM  suppported by USB interface. <dump> and <pass> fields of fstab set to 0. Add run of fsck with autofix flag after mounting root fs. Using cutom hook sysinit_postfsck.
After a few months of working i run a fsck and get many errors on my USB key. I answer yes on all fsck questions (fix, clear). And now on start system i get ext4fs errors like:
ext4_map_blocks, ext4_remove_space. Why these errors appear? Why fsck with autofix flag cant fix all erros? I kill my USB flash after using them few months? Will I go to Btrfs?
Is there fsck for Btrfs in last arch version? How often should I run defrag Btrfs? what am I doing wrong?

Last edited by XaverOz (2012-11-22 05:05:42)

Offline

#2 2012-11-22 12:16:37

hadrons123
Member
From: chennai
Registered: 2011-10-07
Posts: 1,249

Re: USB installation

You have asked like 7 questions.
If you use systemd you dont have to use fsck in the hooks.


LENOVO Y 580 IVYBRIDGE 660M NVIDIA
Unix is user-friendly. It just isn't promiscuous about which users it's friendly with. - Steven King

Offline

#3 2012-11-23 02:39:34

XaverOz
Member
Registered: 2012-02-24
Posts: 18

Re: USB installation

i use archlinux-2011.08.19 it uses sysvinit

Last edited by XaverOz (2012-11-23 02:39:51)

Offline

#4 2012-11-23 02:51:28

alexanderthegre
Member
Registered: 2012-07-29
Posts: 66

Re: USB installation

Arch linux is rolling release, meaning that you use Arch Linux, not Arch Linux-whateverversionyouinstalledwith. Install media releases don't matter. At this point, as the news on the front page (archlinux.org) has made clear, you probably should switch to systemd.

Offline

#5 2012-11-23 03:13:19

hadrons123
Member
From: chennai
Registered: 2011-10-07
Posts: 1,249

Re: USB installation

@Alexanderthegre
You didn't answer the question the OP was asking.


LENOVO Y 580 IVYBRIDGE 660M NVIDIA
Unix is user-friendly. It just isn't promiscuous about which users it's friendly with. - Steven King

Offline

#6 2012-11-23 03:24:25

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: USB installation

@hadrons123, you mean questions smile 

@OP, decide first on what you want answered, then go from there.  Your filesystem sounds corrupt.  But then asking something or another about btrfs after talking about your ext4 filesystem makes this post seem a bit scatter brained.

Offline

#7 2012-11-23 04:09:21

chris_l
Member
Registered: 2010-12-01
Posts: 387

Re: USB installation

Is kind of hard to understand you, but for this:

XaverOz wrote:

After a few months of working i run a fsck and get many errors on my USB key.

It means you had your usb working fine, until one day you got many errors.
Usb flash memories get damaged by normal use*. I'm not 100% sure, but I almost could bet that is the problem.

So,
Buy a brand new usb and install arch there using the recent media. Read the article about systemd, because this time you are going to use it.

(by "normal use" I mean writing to them)

Last edited by chris_l (2012-11-23 04:10:45)


"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Offline

#8 2012-11-23 04:11:22

XaverOz
Member
Registered: 2012-02-24
Posts: 18

Re: USB installation

alexanderthegre wrote:

Arch linux is rolling release, meaning that you use Arch Linux, not Arch Linux-whateverversionyouinstalledwith. Install media releases don't matter. At this point, as the news on the front page (archlinux.org) has made clear, you probably should switch to systemd.

I meant that when I did this Arch has not used systemd. Also i think, i could install the sysvinit from repo.

Last edited by XaverOz (2012-11-23 04:17:22)

Offline

#9 2012-11-23 04:16:52

XaverOz
Member
Registered: 2012-02-24
Posts: 18

Re: USB installation

chris_l wrote:

Is kind of hard to understand you, but for this:

XaverOz wrote:

After a few months of working i run a fsck and get many errors on my USB key.

It means you had your usb working fine, until one day you got many errors.
Usb flash memories get damaged by normal use*. I'm not 100% sure, but I almost could bet that is the problem.

So,
Buy a brand new usb and install arch there using the recent media. Read the article about systemd, because this time you are going to use it.

(by "normal use" I mean writing to them)

I use that without monitor, and without ssh connection. I ran the system and come back to it in a few months, to see what happens with the system in the last few months

Last edited by XaverOz (2012-11-23 04:35:10)

Offline

#10 2012-11-23 04:29:18

chris_l
Member
Registered: 2010-12-01
Posts: 387

Re: USB installation

XaverOz wrote:

I use that without monitor, and ssh connection. I ran the system and come back to it in a few months, to see what happens with the system in the last few months

I...uh... what?

ok, so you had an usb with arch, that you run on a pc without monitor, using ssh to connect to it, and months pass between checks you do to see if everything is ok... so is like a server were you only plug the usb, turn on the power and months can pass without you loggin in. I got it correctly?

hm, ok...
But that does not change the probability that your usb is just damaged.


"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Offline

#11 2012-11-23 04:34:49

XaverOz
Member
Registered: 2012-02-24
Posts: 18

Re: USB installation

chris_l wrote:
XaverOz wrote:

I use that without monitor, and ssh connection. I ran the system and come back to it in a few months, to see what happens with the system in the last few months

I...uh... what?

ok, so you had an usb with arch, that you run on a pc without monitor, using ssh to connect to it, and months pass between checks you do to see if everything is ok... so is like a server were you only plug the usb, turn on the power and months can pass without you loggin in. I got it correctly?

hm, ok...
But that does not change the probability that your usb is just damaged.

almost, system have not SSH connection. how it happened that usb damaged?

Offline

#12 2012-11-23 18:13:23

chris_l
Member
Registered: 2010-12-01
Posts: 387

Re: USB installation

XaverOz wrote:

almost, system have not SSH connection. how it happened that usb damaged?

ok, to answer the question: even if you don't use the pc at all,   daemons could be writing stuff on the usb, without you interacting (as long you keep it turned on. do you keep the pc on?)

And, do you have a swap partition on the usb? swap + little ram can kill your usb. if you are going to have a linux on usb, is better to not have swap at all.

and now... Im curious, no ssh and no monitor... what do you use that machine for? like a webserver? a cd player? a room heater?

Last edited by chris_l (2012-11-23 18:14:37)


"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Offline

#13 2012-11-24 16:54:43

XaverOz
Member
Registered: 2012-02-24
Posts: 18

Re: USB installation

chris_l wrote:
XaverOz wrote:

almost, system have not SSH connection. how it happened that usb damaged?

ok, to answer the question: even if you don't use the pc at all,   daemons could be writing stuff on the usb, without you interacting (as long you keep it turned on. do you keep the pc on?)

And, do you have a swap partition on the usb? swap + little ram can kill your usb. if you are going to have a linux on usb, is better to not have swap at all.

and now... Im curious, no ssh and no monitor... what do you use that machine for? like a webserver? a cd player? a room heater?

Swap is disabled. 64 mb ram on board i think thats enough for system on that runs 1 little Python programm. that machine part of my embedded system

Offline

#14 2012-11-25 12:30:34

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,060
Website

Re: USB installation

Small usb flash drives mostly use flash memory of little quality, which is fine for usual applications but dies quickly under constant writes. There are alternatives with long lasting flash memory (slc flash memory), but they come at a higher price point.

Last edited by teateawhy (2012-11-25 12:31:08)

Offline

Board footer

Powered by FluxBB