Sponsored Content
Operating Systems Linux Repeated corruption running linux on USB flash drive Post 302625449 by mij on Tuesday 17th of April 2012 07:45:34 PM
Old 04-17-2012
Repeated corruption running linux on USB flash drive

I have a HP Proliant N40L server and in the internal USB socket I have a 16GB HP v195b flash drive on which I have a full copy of Debian installed from a copy of the DVD1 ISO image.

In as far as installation and operation goes my setup works okay, but I keep experiencing corruption of the file system on the flash drive. Originally I used a 4GB flash drive (same brand and model but bought from a different supplier) but needed more space so upgraded. Both drives have experience this problem with corruption, so I can rule out it being just a unlucky experience with bad flash drive.

In order to reduce writing to the flash drive I have it formatted in Ext2, and mount bind various directories to a hard disk. This allows me to have a standard setup, but if the hard disk fails or is not present it can in an emergency run solely from the flash drive. From my fstab file those binds are:

Code:
/mnt/internal/os/home                     /home               bind    defaults,bind                      0       0
/mnt/internal/os/etc/network/run          /etc/network/run    bind    defaults,bind                      0       0
/mnt/internal/os/tmp                      /tmp                bind    defaults,bind                      0       0
/mnt/internal/os/var/tmp                  /var/tmp            bind    defaults,bind                      0       0
/mnt/internal/os/var/cache                /var/cache          bind    defaults,bind                      0       0
/mnt/internal/os/var/lib                  /var/lib            bind    defaults,bind                      0       0
/mnt/internal/os/var/log                  /var/log            bind    defaults,bind                      0       0
/mnt/internal/os/var/lock                 /var/lock           bind    defaults,bind                      0       0
/mnt/internal/os/var/mail                 /var/mail           bind    defaults,bind                      0       0
/mnt/internal/os/var/run                  /var/run            bind    defaults,bind                      0       0
/mnt/internal/os/var/spool                /var/spool          bind    defaults,bind                      0       0
/mnt/internal/os/var/swap                 /var/swap           bind    defaults,bind                      0       0

Recently the corruption became so bad to be unusable so I rebuilt the server from scratch. As part of this I did a full read and write surface scan of the USB which did not find any hardware faults. Since then the server had been left running constantly yet the corruption has reoccurred.

Has anyone experienced anything like this? Searching the web has not given me any similar examples, nor have I been able to find anyone having a problem with the v195b flash drives.

Are there other obvious directories I should relocate to the hard drive. I realize doing this there will come a point when running from the USB becomes pointless, but I want the flexibility to be able to swap disks easily. Or at least I will do once prices drop to their original levels.

Is there anything obvious I am missing that could be the cause? As it does not seem to be a hardware fault, nor a loss of power while writing, I cannot see any reason why this should be happening. I do wonder if enabling journaling would resolve the problems, but that would not be ideal for a flash drive.

Any help or advice would be greatly appreciated.
 

9 More Discussions You Might Find Interesting

1. Solaris

USB flash Drive

Hello all.. I have a Verbatim 2 GB flash drive. I also have Solaris 10 running on my workstation. If I am in the Windows environment, it detects the flash drive. But when I plug it while I am in solaris, nothing happens. How will solaris 10 detect my flash drive? What do I have to do? any... (4 Replies)
Discussion started by: vr76413
4 Replies

2. UNIX for Dummies Questions & Answers

USB flash drive is not mounting what to do...?

hello forum.. i am using RHEL 4.0 and my system is dual boot.normally the usb flash drive should be auto mount , but in my system i am unable to mount the drive plz help... i am a new user so plz give me in detail. thank u in advance. (5 Replies)
Discussion started by: manoranjan
5 Replies

3. SCO

mounting USB floppy drive /Flash drive in OSR 6.0

Can anybody help me out to mount USB flash /floppy drive in sco openserver 6.0 . (5 Replies)
Discussion started by: sureshdrajan
5 Replies

4. UNIX for Dummies Questions & Answers

Does HPUX 10.2 or 11.i support any USB flash drive?

Where can I get a driver that support usb flash drives for my unix machines. I need a solution to transfer data easily for techs. I am running C3750 and c8000 HP equipment. Or is there a way to mount them and use them without adding drivers? thanks! (0 Replies)
Discussion started by: jkend12
0 Replies

5. Solaris

removable usb flash drive

# rmformat Looking for devices... 1. Logical Node: /dev/rdsk/c0t0d0p0 Physical Node: /pci@0,0/pci-ide@1f,1/ide@0/sd@0,0 Connected Device: HL-DT-ST DVD+-RW GWA4164B E113 Device Type: DVD Reader/Writer 2. Logical Node: /dev/rdsk/c2t0d0p0 Physical Node:... (26 Replies)
Discussion started by: seyiisq
26 Replies

6. Ubuntu

USB flash drive/keyfob will not automount

I am working on an Ubuntu Linux 8.10 system that I do not want to reboot. For some reason, USB flash drives (mass storage devices) now no longer automount. I want to restore that functionality without rebooting. I can manually mount and unmount these things by doing: cd /media sudo mkdir thing... (4 Replies)
Discussion started by: ropers
4 Replies

7. UNIX for Dummies Questions & Answers

SCO 5.0.5 & USB flash drive

Can someone help me with instructions on how to access a USB flash drive in SCO Unix 5.0.5? I need to copy ASCII text files that have been zipped onto the USB drive for transfer to a Windows computer. (0 Replies)
Discussion started by: jlodata
0 Replies

8. Boot Loaders

How to install grub on USB flash drive?

I wanna install grub on my flash drive for rescue usage. My computer installs winxp, and I have fedora12 installed in vmware. I did like this: step1: format the flash drive as FAT in winXP. step2: in fedora12, mount the flash drive on /media/flash step3: excute the command: grub-install... (10 Replies)
Discussion started by: vistastar
10 Replies

9. UNIX for Advanced & Expert Users

how to increase cylinders on USB Flash Drive

Hello All, I faced a unique issue. I have written a script for transferring backup data on my host machine to a USB Flash drive. The Flash drive must be of 16GB size. So, my script creates two primary partitionon the USB flash drive. I require approx 5900 cylinders for the first partition on... (8 Replies)
Discussion started by: Pkumar Sachin
8 Replies
VNDCOMPRESS(1)						    BSD General Commands Manual 					    VNDCOMPRESS(1)

NAME
vndcompress, vnduncompress -- compress/uncompress file system images to/from cloop2 format SYNOPSIS
vndcompress [-cd] disk/fs-image compressed-image [blocksize] vnduncompress [-cd] compressed-image disk/fs-image DESCRIPTION
The vndcompress program compresses an existing file system image into a cloop2 compatible compressed file system image. An optional block- size can be given. If omitted, the default of 64kB is used. The vnduncompress command decompress a cloop2-compressed file system image back into a regular image. The file system images that can be handled are not limited to any specific file system, i.e. it is possible to handle images e.g. in ISO 9660 or UFS/FFS format. File system images in the cloop2 format are intended to be used with the vnd(4) driver in compressed mode as configured by the -z option of the vnconfig(8) program, and later mounted with the appropriate -t option to mount(8). OPTIONS
The following options are available: -c Always compress, even if the program was started as vnduncompress. -d Always uncompress (decompress), even if the program was started as vndcompress. EXIT STATUS
The vndcompress and vnduncompress utilities exit with one of the following values: 0 The operation was performed successfully. 1 An error occurred. EXAMPLES
To compress an existing CD-ROM file system image, run the following commands: # vndcompress netbsd.iso netbsd.izo Note that the resulting compressed image cannot be mounted directly via NetBSD's vnd(4) and mount_cd9660(8) commands any longer. Instead, you will have to use the -z option of vnconfig(8). The following example decompresses an existing CD-ROM file system image that was compressed in the cloop2 format into a regular file that can then be mounted: # vnconfig vnd0 KNOPPIX.iso # mount -t cd9660 -o ro /dev/vnd0d /mnt # vnduncompress /mnt/KNOPPIX/KNOPPIX /var/tmp/knoppix.iso # umount /mnt # vnconfig -u vnd0 # # vnconfig vnd1 /var/tmp/knoppix.iso # mount -t cd9660 -o ro /dev/vnd1d /mnt # ls /mnt .rr_moved cdrom floppy lib opt sbin usr bin dev home mnt proc sys var boot etc initrd none root tmp vmlinuz # umount /mnt # vnconfig -u vnd1 As an alternative, if your vnd(4) was compiled with VND_COMPRESSION, you can use vnconfig(8) to access the cloop-compressed image directly, e.g., # vnconfig vnd0 KNOPPIX.iso # mount -t cd9660 -o ro /dev/vnd0d /mnt # vnconfig -z vnd1 /mnt/KNOPPIX/KNOPPIX # mount -t cd9660 -o ro /dev/vnd1d /mnt2 # ls /mnt2 .rr_moved cdrom floppy lib opt sbin usr bin dev home mnt proc sys var boot etc initrd none root tmp vmlinuz # df /mnt /mnt2 Filesystem Size Used Avail Capacity Mounted on /dev/vnd0a 692M 692M 0B 100% /mnt /dev/vnd1a 1.9G 1.9G 0B 100% /mnt2 # umount /mnt2 # vnconfig -u vnd1 # umount /mnt # vnconfig -u vnd0 Note how the 1.9GB big filesystem on /mnt2 is mounted from the compressed file stored on the 692MB CD mounted on /mnt. To create a com- pressed file system image of an existing directory and mount it, run: # makefs -t ffs include.fs /usr/include # vndcompress include.fs include.fs.cloop2 # vnconfig -z vnd0 include.fs.cloop2 # mount -o ro /dev/vnd0a /mnt # ls /mnt To undo the steps, run: # umount /mnt # vnconfig -u vnd0 # rm /tmp/include.fs.cloop2 # rm /tmp/include.fs SEE ALSO
gzip(1), vnd(4), mount(8), mount_cd9660(8), vnconfig(8) AUTHORS
The vndcompress utility was written by Florian Stoehr <netbsd@wolfnode.de>. The vndcompress manual page was written by Florian Stoehr <netbsd@wolfnode.de> and Hubert Feyrer <hubertf@NetBSD.org>. BSD
December 12, 2005 BSD
All times are GMT -4. The time now is 06:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy