Tag Info

Hot answers tagged

17

Normally I would suggest a solution such as "hook up the 2nd hard drive using an external enclosure, boot from a linux CD, then use a command such as 'dd if=/dev/sda of=/dev/sdb bs=1G', but since you want to use the same technique for work, I have what may be a better solution. All of my servers and laptops get imaged at work using Clonezilla. There are ...


16

There's a tool called blkid (use it as root or with sudo), # blkid /dev/sda1 /dev/sda1: LABEL="/" UUID="ee7cf0a0-1922-401b-a1ae-6ec9261484c0" SEC_TYPE="ext2" TYPE="ext3" you can check this link for more info


14

Such an utility is zerofree. From its description: Zerofree finds the unallocated, non-zeroed blocks in an ext2 or ext3 file-system and fills them with zeroes. This is useful if the device on which this file-system resides is a disk image. In this case, depending on the type of disk image, a secondary utility may be able to reduce the size of the disk ...


9

Use mdadm, check the manpage. However, I will list one gotcha here. If you do this and really want reliability, you should make sure your master boot record is copied to both drives. By default it will likely only get copied to one drive. If that drive dies, you cannot boot from the other drive, even though all your data is safe. To copy the mbr to both ...


7

The simplest way to do this would be to overwrite the entire drive with zeros. dd if=/dev/zero of=/dev/sdX bs=1M Just know that once you execute that, there's no going back. As soon as the command finishes, and you get back to a shell prompt, nothing will work and the box will be extremely unhappy. It might also be safer to background that operation by ...


7

The walk is over the different software components (drivers) that handle the device; this corresponds by and large to the hardware devices and buses that are involved in connecting to the device. This is mostly unrelated to the physical arrangement of the devices: most of them are inside the same chip anyway. Taking this example from the top: First we ...


7

It's preferable to have some commonly recognized descriptors (meta-data) and MBR does quite stand as such a descriptor. Even GPT uses old MBR-based partition table to indicate its presence. Indeed you lose some diskspace but it's rather negligible meanwhile advantage of understanding what's on the disk (and where) is self-evident.


6

Yes you can use dd to skip the blocks. A="file1" B="file2" BLOCKSIZE=512 # default bs for dd size_b=$(stat -c "%s" "$B") skip_blocks=$((size_b / BLOCKSIZE)) dd if="$A" of="$B" skip=$skip_blocks seek=$skip_blocks bs=$BLOCKSIZE The important parameters here are skip as well as seek: skip: skip BLOCKS ibs-sized blocks at start of input seek: skip ...


6

“Input/output error” indicates something that shouldn't happen somewhere in the input/output stack. The intended meaning is a hardware failure: your hard disk is failing. Often this error turns up in cases where the problem is a software bug or a misuse of a special-purpose filesystem. But here, you're reading from a system directory, so a hardware failure ...


5

Really finding something that works for you is the best option. I always create a new mount point either /data or /storage depending on my mood. any non transient data I think I might need but is just cluttering up /home/ gets moved there, as well as shared data. as far as how do I organize data: /storage/movies/<big pile-o-moviex ...


5

Before doing anything of this sort back up your data to separate media and verify the backup via sha1sum. The process from there would look like Break the RAID1 mirroring so that one of the drives is free Add the third drive to your system Create a degraded RAID5 out of the new drive and the one freed from the RAID1 Copy the data over to the RAID5 volume ...


5

Before we discuss the specifics regarding pdflush, kjournald, andkswapd`, let's first get a little background on the context of what exactly we're talking about in terms of the Linux Kernel. The GNU/Linux architecture The architecture of GNU/Linux can be thought of as 2 spaces: User Kernel Between the User Space and Kernel Space sits the GNU C Library ...


5

There is a special option in rsync: --remove-source-files This tells rsync to remove from the sending side the files (meaning non-directories) that are a part of the transfer and have been successfully duplicated on the receiving side. Note that you should only use this option on source files that ...


5

The short answer No, it's probably not malevolent. It appears Iceweasel writes its preferences file after every keystroke. The long answer (how to find out) The same thing happens here. There is a way to determine exactly what's going on, by using the kernel's block-access dump feature. All of the below is done as root: First, you need to stop the ...


4

If you're looking for advanced filesystems for general-purpose computers in the Linux world, there are two candidates: ZFS and BTRFS. ZFS is older and more mature, but it's originally from Solaris and the port to Linux isn't seamless. BTRFS is still under heavy development, and not all features are ready for prime time yet. Both filesystems offer per-file ...


4

You should realize that when you boot a virtual machine, it sees the virtual disk as if it was a physical device and, as I understand from your description, the system you boot resides on the disk. So look from the point of view of your normal system: You've got a bigger disk but have the old-sized partition on it. Certainly, you must resize it. But not ...


4

sfill from secure-delete can do this and several other related jobs. e.g. sfill -l -l -z /mnt/X UPDATE #1 There is a source tree that appears to be used by the ArchLinux project on github that contains the source for sfill which is a tool included in the package Secure-Delete. https://github.com/BlackArch/secure-delete Also a copy of sfill's man ...


4

If one is interested only in block storage devices, one can use lsblk from util-linux package: $ lsblk -o KNAME,TYPE,SIZE,MODEL KNAME TYPE SIZE MODEL sda disk 149.1G TOSHIBA MK1637GS sda1 part 23.3G sda2 part 28G sda3 part 93.6G sda4 part 4.3G sr0 rom 1024M CD/DVDW TS-L632M Many other columns available. ;-)


4

RHEL6 LVM Admin Guide According to the RHEL 6 Logical Volume Administration Guide it's recommended that if you're going to use an entire drive as a physical volume in a LVM volume group, that you should still partition it: excerpt from the guide "RHEL6 Logical Volume Manager Administration LVM Administrator Guide" 2.1.2. Multiple Partitions on a Disk ...


4

You could try quota if your sysadmin has set that up. Also see the output of df -h . (straight after logging in) which will tell you how much disk space is available on the filesystem where your home directory resides. Note however that this space is for the entire filesystem and not just for you. Failing that, it'll just be an agreement between you and ...


4

A NAS is a storage device connected to a network. Its purpose is to serve files to clients using some file sharing protocol like NFS, SMB/CIFS, AFS and the likes. A SAN is a network interconnecting storage (arrays) to clients. Its purpose is to provide block level access to disk devices (LUNs). iSCSI is clearly a low level protocol so belongs to the SAN ...


3

Actually I found the answer eventually here: lvm2 Faq They are identified by uuids always even if you create them using device names and so are resilient if devices are renamed due to renumbering of devices I found that I needed to reboot when I changed drive numbers by changing usb devices to have the new positions used by lvm, running vgscan, lvscan or ...


3

From Wikipedia: For a while, both LVM and EVMS were competing for inclusion in the mainline kernel. EVMS had more features and better userland tools, but the internals of LVM were more attractive to kernel developers, so in the end LVM won the battle for inclusion. In response, the EVMS team decided to concentrate on porting the EVMS userland tools to ...


3

It looks like you are using Veritas Volume Manager on that box. So from what I can tell there, you need to apply a Sun disklabel to the new disks first and then add them to VxVM. Format each disk and label it first: # format san_vc0_5 format> label format> Proceed? yes Then you should be able initialize each disk and add it to Veritas via: # ...


3

WARNING: e2fsck will likely harm a mounted partition You've just modified your disk (partition) size; You'll need to do the following to modify you fs size (providing that you are using ext* fs: e2fsck -f /dev/<partition> resize2fs /dev/<partition> <size> HTH


3

After increasing the size of the underlying device, you must as well increase the size of the file system and, if so, everything in-between (partitions, LVM stuff etc.). If you don't have any if them, and your file system is ext[23], you can just use resize2fs /dev/... in order to increase up to the auto-determined size.


3

You have a couple options: Start the EBS boot instance with a larger root EBS volume. Here's an article wrote describing how to do this: http://alestic.com/2009/12/ec2-ebs-boot-resize Attach extra EBS volume(s) to the instance. Here's an article I wrote for Amazon describing best practices with an example using a MySQL database: ...


3

I like to split my data into two central folders: One (I call it normally /heap) with recoverable data which I don't have to backup (everything which is just a replication from a central server) and one (I use /data) for the rest. This makes automated backup mach easier than having to carry a list of directories which are under backup. That also means I ...


3

Your first task would be to connect both disks to an existing Linux system or connect the new disk to the original system. You must be very careful since it is very simple to copy the blank disk on top of the good disk! To end up with the boot sectors and all, you would do something like: dd if=/dev/hdx of=/dev/hdy Where hdx is your 40G disk and hdy is ...


3

QEMU comes with the qemu-img program to convert between image formats. qemu-img convert -f qcow2 -O raw my-qcow2.img /dev/sdb



Only top voted, non community-wiki answers of a minimum length are eligible