1

I am not new to linux, but I am new to the underlying guts of it, and I don't know anything about LVM or device-mapper. I'm trying to troubleshoot a livecd mounting its live-rw (dm-0) file system as read only during operation, and it's been frustrating to put it mildly.

I've discovered that dmsetup status will display some numbers - I think snapshot size, but I'm not sure:

[root@localhost ~]# dmsetup status
live-osimg-min: 0 4194304 snapshot 1272/1272 16
live-rw: 0 4194304 snapshot 7568/1048576 40

I've found that the far right numbers, the "7568/1048576" seem to determine the length of time my livecd has to live before it gets mounted read-only and dies. These numbers always start at the same amount and tick up as more activity is performed on the file system - regardless of the root partition's size. Commands like "yum update" are particularly harsh on this number.

I can't find any documentation online that labels the fields and describes what they are - in classic linux fashion, they're just some floating integers on a black background with absolutely no explanation, as if to say "good luck!".

Does anyone know what these numbers represent, and how I can increase the "cap" from 1048576 to something much larger when building a CentOS 6.6 livecd?

1

The Linux kernel documentation of the snapshot DM target contains the answer to your first question:

The snapshot-merge and snapshot status lines end with: <sectors_allocated>/<total_sectors> <metadata_sectors>

The first two numbers (0 and 4194304 in your case) define the start and the length of the mapping in 512-byte sectors, but this is not specific to the snapshot target (it isn't strictly status info, but more like table info). Read the other files in the device-mapper documentation directory if you are interested.

The snapshot size ("cap") is determined by the size of the copy-on-write (COW) device given to the snapshot target. Check the target parameters via dmsetup table. Their documentation is in the same file, in short:

snapshot <origin> <COW device> <persistent?> <chunksize>

What your CentOS 6.6 LiveCD uses as a COW device and how to influence it, I don't know.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.