Tag Info

Hot answers tagged

39

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


27

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 ...


26

In /dev/disk/by-uuid there are symlinks mapping each drive's UUID to its entry in /dev (e.g. /dev/sda1)


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 ...


13

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 ...


10

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 ...


10

If one is interested only in block storage devices, one can use lsblk from widely-available 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 It lends itself well to scripting with ...


10

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 ...


9

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 ...


9

I've used LVM2 defragmenter before. It is not the simplest or best written, but it does the trick.


9

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.


8

“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 ...


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

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 ...


7

UPDATE So, I really didn't think I would be researching NTFS this morning, but, thanks mostly to @AndrewMedico's comments below, I learned something. The truth is file streams are weird, and they confuse me, but apparently it gets deeper. Behaving in a way very like NTFS file streams, Transactional NTFS commits file changes to some alternate cache until ...


6

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 ...


6

You want rsync: rsync -a --append "$A" "$B"


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

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

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 ...


5

You should use /mnt in your case as it is on the second partition which has free space. You do not want to allow the root (/) partition to get full as you will run into trouble. For example, during the next system update your package manager may download many packages and crash while trying to install them, simply due to the lack of disk space. The ...


5

In my personal experience, "duplicate PV" is usually caused by the system having multipath access to a particular SAN LUN but LVM hasn't been configured to filter out the block devices for the individual paths. The device mapper name even looks like a WWNN/WWPN (although I don't have enough experience with SLES to know if that could be something else). Not ...


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

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


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

The program that "caused" it (really, its caused by bad hardware, it'd be more appropriate to say "the program that was the victim of it") may not even exist anymore. E.g., send off a write, and then exit. The write will sit in the kernel buffers until the kernel performs writeback. At which point an I/O error may occur. When the program does still exist, ...


4

You could trawl through the output of lshw and extract details about devices in the disk or tape class (and maybe others - storage class gives you details on storage controllers, scsi, sata, sas, etc). e.g. lshw -class disk -class tape The -short option gives a nice compact summary. e.g. on my home zfsonlinux server/workstation/experiment-box (no tape ...


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

Putting your zpool as files on an existing file system means you're relying on that file system to provide consistency (which sounds dangerous at best) and also that ZFS can't take good advantage of caching. I'm not sure how well ZFS would handle the transfer from files to physical devices; the file system itself probably wouldn't have any real complaints, ...



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