Skip to contentSkip to conversation

Problem copying device files to an LVM volume

linux-lvm Don Williams 2 participants 2 messages Jan 16, 2002

lore
Share & tools
lore
#0 lore raw

Hello all,

When I copy device driver files files via NFS to a LVM volume they are "interpreted" instead of copied. The
result is that when the copy hits the sda driver it starts copying the entire contents of /dev/sda drive! Instead fo the /dev/sda file itself.

The file that it's trying to copy is from Tom's Rescue CD kit. The dev files are sources files for creating a
bootable rescue CD.

My configuration is:

debian linux 3.0, Kernel v2.4.17 Using ReiserFS 3.6.x (I also tried using the EXT2 fs with identical results)

The SOURCE dir is about 5GB in size. I'm trying to copy that to a 50GB LVM volume via the network
(NFS) . However it consumes the whole 50GB. If I remove the offending directories it returns to the proper size.
Suggestions?

Regards,

Don Williams

Storage Computer Corporation

(603)880-3005 x115

The output of the copy looks like this:

cp: writing `/lvm2/src/trccs-0.8.1r2/_system/_cd/var/dev/sdb': No space left on device

/nas/src/trccs-0.8.1r2/_system/_cd/var/dev/sdc' -> /lvm2/src/trccs-0.8.1r2/_system/_cd/var/dev/sdc'

cp: cannot open `/nas/src/trccs-0.8.1r2/_system/_cd/var/dev/sdc' for reading: No such device or address

/nas/src/trccs-0.8.1r2/_system/_cd/var/dev/sdd' -> /lvm2/src/trccs-0.8.1r2/_system/_cd/var/dev/sdd'

cp: cannot open `/nas/src/trccs-0.8.1r2/_system/_cd/var/dev/sdd' for reading: No such device or address

/nas/src/trccs-0.8.1r2/_system/_cd/var/dev/sde' -> /lvm2/src/trccs-0.8.1r2/_system/_cd/var/dev/sde'

cp: cannot open `/nas/src/trccs-0.8.1r2/_system/_cd/var/dev/sde' for reading: No such device or address

/nas/src/trccs-0.8.1r2/_system/_cd/var/dev/sdf' -> /lvm2/src/trccs-0.8.1r2/_system/_cd/var/dev/sdf'

cp: cannot open `/nas/src/trccs-0.8.1r2/_system/_cd/var/dev/sdf' for reading: No such device or address

/nas/src/trccs-0.8.1r2/_system/_cd/var/dev/sdg' -> /lvm2/src/trccs-0.8.1r2/_system/_cd/var/dev/sdg'

cp: cannot open `/nas/src/trccs-0.8.1r2/_system/_cd/var/dev/sdg' for reading: No such device or address

/nas/src/trccs-0.8.1r2/_system/_cd/var/dev/sdh' -> /lvm2/src/trccs-0.8.1r2/_system/_cd/var/dev/sdh'

cp: cannot open `/nas/src/trccs-0.8.1r2/_system/_cd/var/dev/sdh' for reading: No such device or address

/nas/src/trccs-0.8.1r2/_system/_cd/var/dev/rtc' -> /lvm2/src/trccs-0.8.1r2/_system/_cd/var/dev/rtc'

  corpnas:~# df

Filesystem 1k-blocks Used Available Use% Mounted on

/dev/sda1 2667848 634816 2033032 24% /

/dev/sda3 1776120 124360 1651760 8% /var

/dev/sda4 4254908 68664 4186244 2% /local/home

/dev/raid7/lvm2 51198432 51196436 1996 100% /lvm2 ** DESTINATION ***

garfield-int:/home 24409984 3448808 20961176 15% /home

garfield-int:/nas 37100944 5842216 31258728 16% /nas *** SOURCE DIRECTORY ***

/dev/raid7/lvm1 51198432 2153480 49044952 5% /lvm1

corpnas:~#

#1 lore raw
Quoted 5 lines · Don Williams

When I copy device driver files files via NFS to a LVM volume they
are "interpreted" instead of copied. The

result is that when the copy hits the sda driver it starts copying the entire contents of /dev/sda drive! Instead

1) you should not post in html to mailing lists, fix you MUA
2) this is not an LVM related question but an UNIX related one
3) never use cp to copy special files, use cpio or tar instead as in cd /source/dir
find . -xdev -print0 | cpio -0padumv /destination/dir
4) nfsv2 does not support mknod syscal (AFAIR), so you should either be sure you are using nfsv3 or you better use cpio on a rsh pipe

	sourcehost# cd /source/dir
	sourcehost# find . -xdev -print0 | cpio -0oadumv | rsh desthost "cd /destination/dir && cpio -iadumv"

L.

Signature · 6 lines
Luca Berra -- [email protected]
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \